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.

PHP as Apache module instead of CGI

Discussion in 'EasyApache' started by floopjack, Sep 10, 2006.

  1. floopjack

    floopjack Registered

    Joined:
    Aug 29, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Greetings,

    It seems that cpanel calls PHP as a CGI instead of Apache module. The problem with this that we're running into is performance -- with about 10 concurrent Horde users, the server (which is dedicated to a single site) slows to a crawl. Looking at process info via top, the problem is with many php processes being spawned from httpd.

    So the questions are -- 1) why has PHP been buit this way with cpanel/whm, and 2) how can I have PHP called as a module instead? I see the module is loaded in the httpd.conf, but it's not getting used -- the CGI is instead.

    Thanks.
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,381
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The webmail service runs off of its own webserver software. I assume it is Apache, and it may even be the same webserver that CPanel and WHM runs off of. The httpd.conf file in /usr/local/apache/conf/httpd.conf or /etc/httpd/conf/httpd.conf only controls the port 80 regular HTTP webserver. Any changes you make to it will not be reflected by the backend webserver(s).

    To my knowledge there is not a way to make adjustments to the backend webservers. If you are having issues with the backend webserver and PHP processes you might consider opening a ticket with CPanel or your license provider. If the mailboxes you are dealing with are quite large, and you are using the mbox mail format, then you might consider switching to maildir which might offer some performance increase.
     
  3. floopjack

    floopjack Registered

    Joined:
    Aug 29, 2006
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Yup, it looks like webmail (at least horde+imp) run via cpsrvd instead of httpd. I guess it will be ask CPanel, or maybe set up a standalone apache and php setup on a different port and change the redirect from the standard cpanel webmail ports to others.
     
  4. johny_gjx

    johny_gjx Active Member

    Joined:
    Apr 15, 2005
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Your KeepAlive setting will however affect the number of those processes regardless of that backend. Quick fix (before cPanel helps you) may be to reduce the timeout a little bit. Apache group suggests 5!
     
Loading...

Share This Page