US: 1-941-4621-069
  
Cyprus: 3-572-2052-781

Go Back   ISPsystem.com Forums > ISPmanager > General technical discussion

Notices

Reply
 
Thread Tools
Old 11-02-2009, 10:59 PM   #1
Member
 
Join Date: Oct 2009
Posts: 71
Helmi is on a distinguished road
Default 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
Helmi is offline   Reply With Quote
Old 11-03-2009, 07:15 AM   #2
ISPsystem team
 
slava's Avatar
 
Join Date: May 2008
Location: ISPsystem
Posts: 588
slava is on a distinguished road
Default

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.
slava is offline   Reply With Quote
Old 11-03-2009, 07:19 AM   #3
Member
 
Join Date: Oct 2009
Posts: 71
Helmi is on a distinguished road
Default

I'm using Debian Lenny but i only have the option to choose cgi in ISP Manager
Helmi is offline   Reply With Quote
Old 11-03-2009, 08:26 AM   #4
ISPsystem team
 
slava's Avatar
 
Join Date: May 2008
Location: ISPsystem
Posts: 588
slava is on a distinguished road
Default

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.
slava is offline   Reply With Quote
Old 02-19-2010, 09:06 AM   #5
Member
 
Join Date: May 2008
Posts: 34
BeoNET is on a distinguished road
Default

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!
BeoNET is offline   Reply With Quote
Old 02-20-2010, 12:27 PM   #6
ISPsystem team
 
slava's Avatar
 
Join Date: May 2008
Location: ISPsystem
Posts: 588
slava is on a distinguished road
Default

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)
slava is offline   Reply With Quote
Old 02-20-2010, 06:24 PM   #7
Member
 
Join Date: May 2008
Posts: 34
BeoNET is on a distinguished road
Default

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.

Last edited by BeoNET; 02-20-2010 at 06:41 PM.
BeoNET is offline   Reply With Quote
Old 02-22-2010, 07:52 AM   #8
ISPsystem team
 
Join Date: Jan 2009
Posts: 111
GakcaT is on a distinguished road
Default

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.
GakcaT is offline   Reply With Quote
Old 02-28-2010, 09:42 PM   #9
Member
 
Join Date: Oct 2009
Posts: 71
Helmi is on a distinguished road
Default 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
Helmi is offline   Reply With Quote
Old 03-01-2010, 02:44 AM   #10
ISPsystem team
 
Join Date: Jan 2009
Posts: 111
GakcaT is on a distinguished road
Default

Write a request to our support team. We'll check it.
GakcaT is offline   Reply With Quote
Reply

Tags
debian, fastcgi

Thread Tools

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


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