Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    2

    Default PHP as Apache module instead of CGI

    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. #2
    Member
    Join Date
    Aug 2002
    Posts
    1,120

    Default

    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. #3
    Registered User
    Join Date
    Aug 2006
    Posts
    2

    Default

    Quote Originally Posted by sparek-3
    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.
    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. #4
    Member
    Join Date
    Apr 2005
    Posts
    41

    Default

    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!

Similar Threads & Tags
Similar threads

  1. Install as apache module and NOT CGI.
    By pamamolf in forum Optimization
    Replies: 2
    Last Post: 12-21-2010, 06:49 PM
  2. Replies: 14
    Last Post: 03-30-2010, 11:10 AM
  3. make: *** [sapi/cgi/php-cgi] Error 1 on apache update
    By quicklyweb in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 09-27-2007, 08:32 AM
  4. Php as CGI and Module
    By spearhead in forum Database Discussions
    Replies: 17
    Last Post: 07-30-2007, 11:43 PM
  5. How to change PHP install to ISAPI Module instead of CGI?
    By jdearing in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 04-01-2007, 10:44 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube