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'm wanting to update the local version of PHP on my Mac.. i've been doing some digging and got a little confused.
If i run php -i from the terminal it says:
$ php -i phpinfo() PHP Version => 5.3.15 Configuration File (php.ini) Path => /etc Loaded Configuration File =>
I was sure i had 5.4 installed so ran phpinfo();
PHP Version 5.4.5 Loaded config file: /usr/local/php5/lib/php.ini
A problem i'm having is i can't seem to make any php.ini file work, i'm getting lots of
Notice: Undefined index:
errors, so error reporting is too high, but no matter how many php.ini files i find and edit it's not taking effect..
I have no idea which version of PHP is being used or why there is two.
Is it possible to disable or remove one of them so i know exactly whats going on, and then i can update it to a newer version?
Thanks,
You have two PHP-installations on your Mac. One of them is the default OS-X php whos binary is located under /usr/bin/php and the other one seems to be a kind of the liip one-line installer which is located under /usr/local/php5
/usr/bin/php
/usr/local/php5
When you call php -i on the command-line the MacOS-X default php under /usr/bin is called. And when you run a phpinfo()-script your WebServer calls the apache-module of the PHP located under /usr/local/php5.
php -i
/usr/bin
So when you want to remove one of your installations, I'd recommend removing the one under /usr/local/php5 as the otehr one is bundled with your OS and the files are located all over the filesystem and it's not that easy to get rid of everything related.
But if you want to upgrade your PHP installation you might simply call the one-line-installer from liip again which will install the new version in a new directory under /usr/local/ and link it against the /usr/local/php5-folder.
/usr/local/
And if you want to call those new binaries you can either adapt your $PATH-Variable so that /usr/local/php5/bin comes before /usr/bin or you simply call it directly usig the full path to the binary like /usr/local/php5/bin/php -i.
/usr/local/php5/bin
/usr/local/php5/bin/php -i
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 10 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 9 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.