( 5 months ago )
I just upgraded to PHP 5.4.11 from 5.3.15 following this link. After upgrading I ran php -v but it shows me following output.
Zafars-MacBook-Pro:php-5.4.11 zafar$ php -v
PHP 5.3.15 with Suhosin-Patch (cli) (built: Jul 31 2012 14:49:18)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
which says PHP 5.3.15. Then I issue this command /usr/local/bin/php -v which shows following output
Zafars-MacBook-Pro:/ zafar$ /usr/local/bin/php -v
PHP 5.4.11 (cli) (built: Jan 26 2013 20:10:19)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
Which shows PHP 5.4.11. When I issue which php it shows me this path /usr/bin/php. I tried following to solve this issue.
- I went to /usr/bin/php and rename that php file to php_OLD.
Now I made a symlink in "/usr/bin/" to "/usr/local/bin/php" file using following command
sudo ln -s /usr/local/bin/php /usr/bin/php
Now I issued php -v command which worked and showed new version of php.
** But when I created phpinfo.php file with phpinfo(); function. It still uses older version of PHP i.e. PHP 5.3.15. why and how can I solve this problem?**