Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Bugs & Fixes 2 years ago
Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I have three installed versions of php on my Mac. When I check using phpinfo() via a web browser, the one that is being invoked is version 5.3.15. I would like to switch it to the installed instance that is version 5.4 for the apache module (not needed for the CLI).
The reason I would like to do this is because I have used MacPorts to install php_geoip, but it is for the 5.4 version.
Background
When I use "which" I see the following:
$ which -a php /opt/local/bin/php /usr/bin/php $ which -a php54 /opt/local/bin/php54
Then checking the version of each of these gives the following:
$ /opt/local/bin/php --version PHP 5.3.19 (cli) (built: Dec 15 2012 01:08:10) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans $ /usr/bin/php --version PHP Warning: PHP Startup: geoip: Unable to initialize module Module compiled with module API=20100525 PHP compiled with module API=20090626 These options need to match in Unknown on line 0 PHP 5.3.15 with Suhosin-Patch (cli) (built: Aug 24 2012 17:45:44) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with Xdebug v2.2.0-komodo, Copyright (c) 2002-2012, by Derick Rethans $ /opt/local/bin/php54 --version PHP 5.4.10 (cli) (built: Dec 20 2012 19:30:08) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
Please note that the CLI version checks are only being used to determine the version of each instance. It is actually the proper version of the apache module libphp5.so that I will ultimately need to get working.
As you can see from the above, there is an error message from the 5.3.15 instance which I believe comes from my efforts to try to load geoip.so, as follows:
; 2013-01-10 enable geoip extension="/opt/local/lib/php54/extensions/no-debug-non-zts-20100525/geoip.so"
In other words, I used MacPorts to install php_geoip, and as a part of that it installed the dependence of php54, because the version of geoip.so in the MacPorts ports tree needs php 5.4. I tried making the running php 5.3.15 load geoip.so from the php 5.4 instance, but it does not work, as the error message shows.
Next I tried switching the instance of php to version 5.4 by changing the LoadModule statement as shown here:
# 2012-10-28: enable php # LoadModule php5_module libexec/apache2/libphp5.so # 2013-01-13: change to more recent version of installed php - does not work LoadModule php5_module /opt/local/apache2/modules/libphp5.so
However, this prevents php from working at all.
So to solve my problem, I either need to get a php 5.3.15-compatible version of geoip.so, or cause my system to use the php 5.4 instance. Any guidance on either of these approaches is appreciated.
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.