legalbrr

Member
Nov 1, 2009
9
0
51
Hello,

After a lot of tests, I decided myself that the best way to handle PHP was through Fast Cgi (mod fcgi).

Unfortunally, cPanel/WHM doesn't help a lot with configurating/customizing the way it works. The first problem, is that if a PHP script takes more than 40 seconds to execute, a 500 Error is thrown to user (but the php script continues running).

Ok, so I had a little research and found that it can be customized with some MOD_FCGI directives. I found to add these directives to /usr/local/apache/conf/php.conf.

But I believe that, everytime I update apache or make any kind of configuration, the PHP.CONF will be replaced by the default and I'll lose my custom settings.

So, the question is:
- How to make permanent changes to PHP.CONF while using php_fcgi?

The directives I added to php.conf were:
Code:
  IdleTimeout 300
  MaxProcessCount 200
  DefaultMinClassProcessCount 1
  DefaultMaxClassProcessCount 25
  IPCConnectTimeout 20
  [B]IPCCommTimeout 600[/B] [COLOR="Red"](This is the line that solved my problem)[/COLOR]

  IdleScanInterval 120
  ProcessLifeTime 900
  BusyTimeout 300
  BusyScanInterval 120
  ErrorScanInterval 3
  ZombieScanInterval 3
I searched a lot and found nothing. Hope you guys can help me.

Thanks!
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
38
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Another option would be to try an include at /usr/local/apache/conf/includes such as pre_main_global.conf possibly. If you do try out the include and it works, then you would need to distill the change, rebuild Apache and restart Apache:

Code:
cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak110525
/usr/local/cpanel/bin/apache_conf_distiller --update
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart