Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th September 2010, 12:24
ashleykaryl ashleykaryl is offline
Junior Member
 
Join Date: Jul 2010
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
Sponsored Links
  #2  
Old 19th September 2010, 13:47
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,499 Times in 4,328 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 19th September 2010, 14:30
ashleykaryl ashleykaryl is offline
Junior Member
 
Join Date: Jul 2010
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.

Last edited by ashleykaryl; 19th September 2010 at 14:33. Reason: extra info supplied.
Reply With Quote
  #4  
Old 19th September 2010, 14:36
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,499 Times in 4,328 Posts
Default

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.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 19th September 2010, 14:38
ashleykaryl ashleykaryl is offline
Junior Member
 
Join Date: Jul 2010
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #6  
Old 19th September 2010, 14:51
ashleykaryl ashleykaryl is offline
Junior Member
 
Join Date: Jul 2010
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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

Last edited by ashleykaryl; 19th September 2010 at 15:14.
Reply With Quote
  #7  
Old 19th September 2010, 15:20
ashleykaryl ashleykaryl is offline
Junior Member
 
Join Date: Jul 2010
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #8  
Old 20th September 2010, 16:09
ashleykaryl ashleykaryl is offline
Junior Member
 
Join Date: Jul 2010
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Anybody have any suggestions on how to fix this?
Reply With Quote
  #9  
Old 21st September 2010, 13:56
ashleykaryl ashleykaryl is offline
Junior Member
 
Join Date: Jul 2010
Posts: 22
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #10  
Old 21st September 2010, 14:10
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,421
Thanks: 834
Thanked 5,499 Times in 4,328 Posts
 
Default

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/
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
fastcgi, permissions, php, user, wordpress blogs

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to switch KDE environment to GNOME in Suse? thongstele Desktop Operation 1 3rd May 2010 14:02
USB KVM switch slow mouse and keyboard mcardo Technical 0 2nd March 2009 04:25
Capability to switch between php4 and php5 cooljai Programming/Scripts 1 12th June 2007 13:09
Munin & snmp switch monitoring sgrichkosey HOWTO-Related Questions 2 26th September 2006 18:09
how to switch from proftpd to vsftp Cirox Installation/Configuration 4 19th March 2006 21:42


All times are GMT +2. The time now is 03:41.


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