Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am running nginx 1.0 on centos 5.6. I had php 5.1.6 installed and running and then decided to uninstall it and switch to php 5.3. I ran the following commands:

[user@server]$ /etc/init.d/nginx stop

[user@server]$ yum remove php php-*

[user@server]$ sudo yum install php53-cli php53-common php53-devel php53-gd php53-mbstring php53-mysql php53-soap php53-xml php53-xmlrpc php53-bcmath php53-snmp

[user@server]$ /etc/init.d/nginx start

Now, when I view the output of phpinfo() in a browser, it still reads 'PHP Version 5.1.6'.

What step(s) did I miss?

share|improve this question
2  
PHP does not run within Nginx, simply use your PHP init script to restart PHP and you should be good. –  Martin Fjordvald Aug 23 '11 at 23:49
    
@Martin F - Please post your comment as an answer so I can accept it. thanks! –  Mike Moore Aug 24 '11 at 5:59

2 Answers 2

up vote 2 down vote accepted

PHP does not run within Nginx, simply use your PHP init script to restart PHP and you should be good.

Other guy kinda hinted at the right thing, is it possible to split an acceptance?

share|improve this answer
    
I just had to run /etc/init.d/php-cgi restart and it was fine! –  Mike Moore Aug 24 '11 at 14:19

Are there some old php processes still running? Stop nginx, check for any php processes running (depends on how you're running php stuff under nginx), kill any and restart if it's a persistent PHP FPM and then try again?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.