I'm on a Mac, and it has PHP 5.3.4 built in.
I downloaded the sources of PHP 5.3.6 and installed it via
./configure; sudo make; sudo make install
It is now installed in /usr/local/bin/php:
/usr/local/bin/php -v
PHP 5.3.6 (cli) (built: May 9 2011 12:04:28)
However when I run the php command, I still get old php version:
php -v
PHP 5.3.4 (cli) (built: Dec 15 2010 12:15:07)
The location is also different:
which php
/usr/bin/php
I can run the scripts with new PHP by specifying the full path, but how can I make it like
php5.3.6 hello_world.php
?
Thank you
sudo
when usingmake
. Onlymake install
might need rootpermissions to write to protected directories.