HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   ISPConfig3: FastCGI not working after upgrading to 5.2.9 (http://www.howtoforge.com/forums/showthread.php?t=32773)

Polk 24th March 2009 02:52

ISPConfig3: FastCGI not working after upgrading to 5.2.9
 
Hi,

I have updated PHP to 5.2.9 from
http://www.dotdeb.org/2009/03/11/php...kaged-at-last/

After the update FastCGI is not working anymore when I switch it in ISPConfig3. but when I use CGI it's working fine. Any ideas what could change and how to enable both modes?

OS: Debian Lenny(5) x64.

PS: Is dotdeb.org a good source to update PHP and Mysql anyway?

Hope you can help.
thanks.

till 24th March 2009 09:09

Maybe the php package that you used is just a php-cgi without fastcgi support compiled in. If you run php-cgi -v then the fcgi binding should be mentioned in the output. example:

# php-cgi -v

PHP 5.2.6-1+lenny2 with Suhosin-Patch 0.9.6.2 (cgi-fcgi) (built: Jan 26 2009 22:35:55)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Polk 24th March 2009 09:15

Yes, I get this:

PHP 5.2.9-0.dotdeb.1 with Suhosin-Patch 0.9.7 (cgi-fcgi)

So that means the switch in ISPConfig3 will not work anymore? I guess I get now FastCGI when setting in ISPC3 is CGI and when I switch to FastCGI nothing is working. Any ideas how to fix the ISPC3 mappings?

till 24th March 2009 09:21

Quote:

Originally Posted by Polk (Post 177029)
So that means the switch in ISPConfig3 will not work anymore?

No.

Quote:

I guess I get now FastCGI when setting in ISPC3
I'am sure thats not the case. fcgi and cgi are very different technics and are configured differently, so you can not get fcgi when you selcted cgi.

Which is the exact error message that you get when you use fastcgi?

Polk 24th March 2009 17:23

I don't get anything. Just a 403 error page from ISPC3.

Actually now I was playing with it and i think it's not working on only one domain, but works on all the other domains i add on the server. But, when i do "<?php phpinfo();?>", despite my settings CGI or FastCGI, the result is the same.

Code:

Build Date        Mar 8 2009 12:20:47
Server API        CGI/FastCGI
Virtual Directory Support        disabled
Configuration File (php.ini) Path        /etc/php5/cgi
Loaded Configuration File        /etc/php5/cgi/php.ini
Scan this dir for additional .ini files        /etc/php5/cgi/conf.d
additional .ini files parsed        /etc/php5/cgi/conf.d/gd.ini, /etc/php5/cgi/conf.d/imagick.ini, /etc/php5/cgi/conf.d/imap.ini, /etc/php5/cgi/conf.d/mcrypt.ini, /etc/php5/cgi/conf.d/mysql.ini, /etc/php5/cgi/conf.d/mysqli.ini, /etc/php5/cgi/conf.d/pdo.ini, /etc/php5/cgi/conf.d/pdo_mysql.ini

Now, Can you tell me what ISPC3 actually does exactly when we switch to CGI and FastCGI. What does it do technically and where can I look to make sure it does what it needs to do?
Thanks

till 24th March 2009 17:25

The error messages are in the error log of the website. Please open the log and post the last error messages.

Quote:

But, when i do "<?php phpinfo();?>", despite my settings CGI or FastCGI, the result is the same.
Thats always the case as phpinfo is not able to show the differences between the two modes.

Polk 24th March 2009 17:30

Wow, you are fast. Thanks for your replies. I get a lot of these:

Code:

[Mon Mar 23 11:57:04 2009] [error] [client IP] Premature end of script headers: info.php
[Mon Mar 23 11:57:05 2009] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Mon Mar 23 11:57:05 2009] [error] [client IP] Premature end of script headers: info.php
[Mon Mar 23 11:57:19 2009] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Mon Mar 23 11:57:19 2009] [error] [client IP] Premature end of script headers: info.php


till 24th March 2009 17:35

This looks like a problem with the php binary that you installed, it simply does not seem to support the fastcgi mode. You can either install the php binarys from debian again or you try to compile your own binaries. The php binraies from debian are secure and up to date even if they are not the bleeding edge release, but if you need a stable system it is highly recommended to use the official debian binaries.

If you want to know more about how fastcgi is configured, take a look in the vhost file of the website in /etc/apache2/sites-enabled/

The difference of cgi and fcgi is that for cgi a instance of php is started when a page is requested and for fcgi php runs in some kind of daemon mode which is faster when you have a lot of requests.

Polk 26th March 2009 07:24

Till,

I'm now even more confused. I found something strange.
I have 3 domains on the Debian Lenny server.

1 domain works with CGI and FastCGI setting in ISPC3
2 domain works only with CGI and when i switch to FastCGI it stops working
3 domain does not work with neither CGI nor FastCGI.

The domains were added in the order listed.

Could you point me into the right direction. How to find an issue and fix it for new and existing domains?

Thank you.

till 26th March 2009 09:26

Take a look at the vhost configuration file as I suggested above.


All times are GMT +2. The time now is 06:50.

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