Uninstall php and nginx or fix setup

Posted by jreed121 on Server Fault See other posts from Server Fault or by jreed121
Published on 2012-11-18T07:31:47Z Indexed on 2012/11/18 11:09 UTC
Read the original article Hit count: 497

Filed under:
|
|
|

First off, I'm a huge linux noob - sorry... I'm trying to setup nginx with php-fpm on debian and I'm pretty sure that I've completely screwed it up. nginx seems to be running fine because I can it it from a web browser and it load the stock "Welcome to nginx!" page. I'm not so sure about php-fpm though. When I try something like

# restart php-fpm

I get:

bash: restart: command not found

First off php-fpm some how got installed as php5-fpm when I do root@server:/etc/init.d# ls, which seems to contradict every tutorial and help doc I've read (supposed to be 'php-fpm').

I can restart it with this:

service php5-fpm restart

And just enter the package name 'php5-fpm' I get this:

root@server:~# php5-fpm
[17-Nov-2012 23:15:36] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525/suhosin.so' - /usr/lib/php5/20100525/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
[17-Nov-2012 23:15:36] ERROR: An another FPM instance seems to already listen on /var/run/php5-fpm.sock
[17-Nov-2012 23:15:36] ERROR: FPM initialization failed

The root for nginx is /usr/share/nginx/html, when I try to navigate to a .php file in there with my web browser, it tries to download the file instead of interpret it. I would like this folder to be in my user's home directory ie: /home/administrator/www or /home/nginx/www. I know in order to do this I need to modify nginx.conf, but I find that configuration file difficult to understand. I suppose the fact that my .php scripts aren't being handled is my bigger problem anyways.

When I try to see what running on port 9000 (php-fpm default port) with lsof -i :9000 it returns nothing - I guess indicating that it isn't listening. then I head over to vim /etc/php5/fpm/php-fpm.conf and there is no where to designate a port number.

  • So should I just uninstall everything and start from scratch? If so,
  • how do I clean it all up? Any suggestions for a tutorial once I'm
  • ready to try again? Should I attempt to troubleshoot this mess?
  • If so where should I start?

Sorry guys, I'm feeling pretty stupid and lost right now. I'm not sure what my next steps are in trying to resolve this issue are. I realize that this is a horrible question for this type of Q&A site, but I'd really appreciate any guidance.

© Server Fault or respective owner

Related posts about php

Related posts about nginx