Upgrading PHP version on Ubuntu
I'm tryin开发者_如何转开发g to upgrade the version of PHP installed on an Ubuntu server 10.10 from 5.3.3 to 5.3.6. I followed the instructions at http://wiki.helioviewer.org/wiki/Compiling_PHP_from_source_on_Ubuntu and all seemed to go well, but when I run phpinfo() it's still showing the old version. If I run php -version from the command line it says 5.3.6. What do I need to do to get Apache to use this version? Thanks
Make sure you restarted apache
This have to be on askUbuntu though
Restart Apache indeed
/etc/init.d/apache2 restart
However, I did had some problems in the past that the apache process got stuck in the memory after a recompile / or PHP upgrade. If you want to check if apache is still running after you've stopped it:
Stop Apache
/etc/init.d/apache2 stop
Look for apache processes
ps -A | grep apache
If you get a list with some apache2 processes it's not good, you can kill them with:
kill <PROCESS_ID>
For example:
kill 2389
Start apache
/etc/init.d/apache2 start
精彩评论