ISPsystem.com Forums

ISPsystem.com Forums (http://forum.ispsystem.com//index.php)
-   General technical discussion (http://forum.ispsystem.com//forumdisplay.php?f=8)
-   -   PHP CGI vs. FCGI (http://forum.ispsystem.com//showthread.php?t=802)

Helmi 11-02-2009 10:59 PM

PHP CGI vs. FCGI
 
Hi,

you've built in apache with mod_php and php cgi support. Is there any special reason why you didn't add FCGI instead of standard CGI?

Thanks,
Frank

slava 11-03-2009 07:15 AM

FastCGI is more effective in terms of speed and consumes less memory.
PHP CGI (not FastCGI) starts a separate process for each call to the script, the process FastCGI already running and receiving data for processing.
FastCGI caches the data and does not waste system resources to run the new processes.

What operation system you have? CentOS Linux distro does not have FastCGI module and you can install FCGI manually.

Helmi 11-03-2009 07:19 AM

I'm using Debian Lenny but i only have the option to choose cgi in ISP Manager

slava 11-03-2009 08:26 AM

Try to install manually by this way:

Code:

apt-get install libapache2-mod-fcgid
a2enmod fcgid
/etc/init.d/apache2 restart

After installation edit ISPmanager configuration file /usr/local/ispmgr/etc/ispmgr.conf and add line
Code:

Option ForcePhpFCgid
Save config and restart ISPmanager by stop ispmgr process and open in web-browser again

Code:

killall ispmgr
Now you can choose FastCGI mode for WWW domains in the ISPmanager.

BeoNET 02-19-2010 09:06 AM

Hi,

I successfully compiled fastcgi module into apache and it loads perfectly. Also I've add option in Control panel so FastCGI is now available option in my WWW domains. The problem is when I try to change/add FastCGI WWW domain in Control panel the following error appears:

Code:

Stopping httpd:                                            [FAILED]
Starting httpd: Syntax error on line 1022 of /etc/httpd/conf/httpd.conf:
Invalid command 'FCGIWrapper', perhaps misspelled or defined by a module not included in the server configuration
                                                          [FAILED]

On line 1022 in httpd.conf is this code:

Code:

</Directory>
      Options +Includes +ExecCGI
       FCGIWrapper /var/www/proba/data/php-bin/php .php
      FCGIWrapper /var/www/proba/data/php-bin/php .php3
      FCGIWrapper /var/www/proba/data/php-bin/php .php4
      FCGIWrapper /var/www/proba/data/php-bin/php .php5
      FCGIWrapper /var/www/proba/data/php-bin/php .phtml
</Directory>

Anu ideas?

I use CentOS 5 and ISPManager PRO

Thanks!

slava 02-20-2010 12:27 PM

Quote:

I successfully compiled fastcgi module into apache and it loads perfectly
What module you install? You need install mod_fcgid (not mod_fastcgi, because this modules are different)

BeoNET 02-20-2010 06:24 PM

Quote:

What module you install? You need install mod_fcgid (not mod_fastcgi, because this modules are different)
Slava,

I was wrong, I've installed mod_fastcgi! Now I installed mod_fcgid following steps from http://en.ispdoc.com/index.php/Insta...n_CentOS_Linux

Everything works fine except one thing. When I change php to PHP via FastCGI for some domain and apply changes Apache for some reason failed to restart, then I must manually restart with /etc/init.d/httpd restart command, then everything works again. When restarting apache FAILED to stop but successfully starts, sending you a log.

After restarting apache:
Code:

Stopping httpd:                                            [FAILED]
Starting httpd:                                            [  OK  ]

Apache error log:
Code:

[Sat Feb 20 16:41:23 2010] [notice] caught SIGTERM, shutting down
[Sat Feb 20 16:41:25 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Sat Feb 20 16:41:25 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Sat Feb 20 16:41:28 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Sat Feb 20 16:41:31 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Sat Feb 20 16:41:35 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Sat Feb 20 16:41:38 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Sat Feb 20 16:41:41 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Sat Feb 20 16:41:44 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Sat Feb 20 16:41:47 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Sat Feb 20 16:41:47 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Feb 20 16:41:52 2010] [notice] Digest: generating secret for digest authentication ...
[Sat Feb 20 16:41:52 2010] [notice] Digest: done
[Sat Feb 20 16:41:52 2010] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations

One more thing. When you edit user permissions in Control Panel there is PHP как FastCGI not PHP as FastCGI option. My default language is English! Everyting else is fine.

GakcaT 02-22-2010 07:52 AM

Quote:

Originally Posted by BeoNET
One more thing. When you edit user permissions in Control Panel there is PHP как FastCGI not PHP as FastCGI option. My default language is English!

Thanks for the information! I'll fix it.

Helmi 02-28-2010 09:42 PM

Problems activating php as fast cgi
 
Hi,

i've got isp manager installations on quite some machines now. I've enabled Fast CGI on nearly all of them. All are Debian Lenny installations which are up to date.

On some machines i already saw problems when activating php as fast cgi on a domain. I've setup the user (owner of the domain) to have the rights but everytime i setup php as cgi or as fast cgi ips manager keeps to load and load and i have to kill -9 it to get it back. The Fast CGI or CGI param doesn't get set. I can set php as apache module without any problems.

Until now i couldn't manage to reproduce the problem but I've now got one machien where i can't get it working. I can do what i want but can't set one of the domains to fast cgi.

Can you help?

Frank

GakcaT 03-01-2010 02:44 AM

Write a request to our support team. We'll check it.


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

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.