HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Trying to switch from mod_php to mod_fcgi (http://www.howtoforge.com/forums/showthread.php?t=48887)

ashleykaryl 19th September 2010 12:24

Trying to switch from mod_php to mod_fcgi
 
I have a server which seems to be working fine for the most part except with a wordpress install, where it is proving impossible to apply any updates either to plugins or wordpress itself. This became apparent as the server was being set up but the server manager I hired liked to go walkabout for extended periods and eventually disappeared.

I have just hired another server manager to look at this and he tells me this problem exists because the server has been set up using mod_php which he advises against and said it could be fixed by switching to mod_fcgi. After many hours of trying however, every time he attempts to fix this and restarts the httpd you see the "Internal Server Error" page with the error in the logs. He has tried changing the client limits.

He said:

"The fix is to use either:

suPHP
CGI
FastCGI

which run under the sites username. Any files made are made under your name, which resolves the plugin issue. The only PHP process that works on your server is mod_php, which, while fast, is not that secure as it runs under "apache".

FastCGI and CGI come up with the same issue:

[Sun Sep 19 05:06:45 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Sun Sep 19 05:06:45 2010] [error] [client 124.168.0.12] Premature end of script headers: phpinfo.php

suPHP also refuses to work."

Does anybody here know how to get this to work? It seems to be surprisingly tricky.

Thanks

Ashley

till 19th September 2010 13:47

Using php-fcgi is realy easy in ispconfig, you just have to select it in the website settings. Go to the website settings, select "php-fcgi" in the php settings and enable the "suexec" checkbox. Then click on save and wait a minute to get the changes applied.

If you get any errors with your php application, then you most likely uploaded the files with a wrong user, e.g. root. You have to chown all files to the website user and client group then. For details see error.log of the website.

ashleykaryl 19th September 2010 14:30

I just spoke to the server manager who tried this and said:


"done the swap to fcgi thing and this error:

[Sun Sep 19 05:06:45 2010] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Sun Sep 19 05:06:45 2010] [error] [client 124.168.0.12] Premature end of script headers: phpinfo.php"

Then he tried the suexec box with the same result.

BTW we are using ISPConfig Version: 3.0.2.2.

till 19th September 2010 14:36

1) Which tutorial did you use to install the server.
2) Most likely he created the phpinfo file under the wrong user. Please post the output of the command:

ls -la phpinfo.php

from within the website directory.

Quote:

Then he tried the suexec box with the same result.
This is not optional. php-fcgi and suexec should be enabled together.

ashleykaryl 19th September 2010 14:38

I didn't install it myself but it is running on Centos 64 bit and I'll try to discover the other information for you now.

ashleykaryl 19th September 2010 14:51

I am told phpinfo.php is not owned by root, it is owned under the correct web5:client1 permissions.

ashleykaryl 19th September 2010 15:20

OK here is the result of running that command:


Under /home/www/client1/web1/web

[root@liubliu web]$ ls -la phpinfo.php
-rw-r--r-- 1 web1 client1 21 Jul 5 21:55 phpinfo.php

Under /home/www/client1/web5/web

[root@liubliu web]$ ls -la phpinfo.php
-rw-r--r-- 1 web5 client1 16 Sep 19 03:04 phpinfo.php

ashleykaryl 20th September 2010 16:09

Anybody have any suggestions on how to fix this? :confused:

ashleykaryl 21st September 2010 13:56

We tried following the suggestion here but it didn't work.

I am really surprised this is proving so difficult. Since I am the only user on the server I am wondering why we can't do this at root level so that it corrects all users and sites automatically.

till 21st September 2010 14:10

I'am not sure what the problem on your system is at is really uncommon and I can not tell you more without checking the server setup. There are about 20 thousand new ispconfig 3 installs per month and as you see, there is nothing on this topic in the forum.

There must be a problem with the initial server install on your system. Most likely your system admin did not follow the installtion instructions from the perfect server tutorial closely when he installed ispconfig on your server. The tutorial that you used in post #8 is not for ISPConfig, so your system might not work if you use that.

The Tutorials that should be used to prepare your server for the ispconfig install are listed here:

http://www.ispconfig.org/ispconfig-3/documentation/


All times are GMT +2. The time now is 18:35.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.