The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Permanent changes to PHP.CONF

Discussion in 'General Discussion' started by legalbrr, Feb 6, 2010.

  1. legalbrr

    legalbrr Member

    Joined:
    Nov 1, 2009
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    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!
     
  2. phinsup

    phinsup Active Member

    Joined:
    Jun 25, 2003
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Did you ever figure this one out? I'd like to know!
     
  3. SherifBuzz

    SherifBuzz Member

    Joined:
    Dec 2, 2010
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    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
     
Loading...

Share This Page