"php: command not found" after changing PHP system files in OS X
Posted
by
Aurelien Porte
on Super User
See other posts from Super User
or by Aurelien Porte
Published on 2012-05-14T19:59:07Z
Indexed on
2012/12/08
11:17 UTC
Read the original article
Hit count: 408
I wanted to install Symfony on Mac OS X Lion. Apparently, as MAMP was already installed on my computer, there was a problem with the "timezone" field in the php.ini file. I can't remember exactly the error but basically, Symfony installation required a timezone like "Europe/Paris" but MAMP apparently changed that part.
Well, it's very vague but I've seen on the web that other people had the same issue. So I tried one of the solution I found (without success) but:
- It didn't work.
- I can not use the
php
command anymore ("-bash: php: command not found"). I can not remember the exact commands I did to go back.
Here are some potential relevant commands I found in my history and that correspond with the beginning of my problem, in this order:
sudo mv /usr/bin/php /usr/bin/php-old
sudo ln -s /Applications/MAMP/bin/php5/bin/php /usr/bin/php
rm /usr/bin/php-old
sudo cp php.ini.default /etc/php.ini
rm php.ini but I don't know anymor in which repertory I was.
sudo mv /usr/bin/php-old /usr/bin/php
© Super User or respective owner