Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Feb 2003
    Location
    Canada
    Posts
    11

    Default Changing PHP's Server API

    i just tried to compile php with mhash enabled, and now php is running as Server API CGI instead of Apache, i tried to recompile php in WHM, but it's still running as CGI, does any one know how i can fix it so it goes back to Apache?

    cPanel.net Support Ticket Number:

  2. #2
    Member
    Join Date
    Oct 2002
    Location
    Egypt
    Posts
    391

    Default Re: Changing PHP's Server API

    Originally posted by phantasmp
    i just tried to compile php with mhash enabled, and now php is running as Server API CGI instead of Apache, i tried to recompile php in WHM, but it's still running as CGI, does any one know how i can fix it so it goes back to Apache?

    cPanel.net Support Ticket Number:
    phpsuexec is on by default. You have to use option 6 and uncheck phpsuexec

    OR use update Apache in WHM and uncheck phpsuexec

    cPanel.net Support Ticket Number:
    // Mahmoud
    http://www.cpanelplus.com

  3. #3
    Member
    Join Date
    Feb 2003
    Location
    Canada
    Posts
    11

    Default

    ok, i did that and recompiled, but now whenever i click on a link to a php file, the browser will download the file, i uncommented out

    LoadModule php4_module libexec/libphp4.so

    in the config file, but when i check the syntax i get this error

    [Sat Aug 9 00:38:41 2003] [error] Cannot remove module mod_php4.c: not found in module list

    cPanel.net Support Ticket Number:

  4. #4
    Member
    Join Date
    Feb 2003
    Location
    Canada
    Posts
    11

    Default

    nevermind, i fixed it

    cPanel.net Support Ticket Number:

  5. #5
    Member nitromax's Avatar
    Join Date
    Feb 2002
    Posts
    189

    Default

    Hi phantasmp,

    Would you mind posting what you did to fix this issue? I am having the same problem and haven't figured it out yet.

    Thanks in advance...

    cPanel.net Support Ticket Number:

  6. #6
    Member
    Join Date
    Feb 2003
    Location
    Canada
    Posts
    11

    Default

    in /etc/httpd/conf/httpd.conf i uncommented

    LoadModule php4_module libexec/libphp4.so
    and
    AddModule mod_php4.c

    cPanel.net Support Ticket Number:

  7. #7
    Member
    Join Date
    Mar 2003
    Posts
    32

    Default

    how do i force PHP to run as a cgi module instead of apache?

  8. #8
    Member
    Join Date
    Apr 2003
    Posts
    40

    Default Let me Get this straight

    Let me Get this straight. Please stop me when I am wrong.

    1. Out-of-the-box, CPANEL runs as an APACHE module.

    2. If you rebuild APACHE and add PHPSUEXEC support, it (w/o warning) changes PHP to run as a CGI.

    3. To get PHP to run as an APACHE module again, I have to uncheck PHPSUEXEC support and rebuild APACHE. I also have to manually edit httpd.conf to uncomment the PHP module lines.

    When my server was switched to use PHPSUEXEC the first time, it broke all of the PHP scripts. I had to manually change the file privs on all PHP files for some reason. Is this going to break things again if the process is reversed?

Similar Threads & Tags
Similar threads

  1. Replies: 1
    Last Post: 06-04-2011, 09:52 AM
  2. Changing main ftp password through api
    By Irritum in forum cPanel Developers
    Replies: 6
    Last Post: 02-24-2011, 09:36 AM
  3. Changing account password using PHP and XML-API
    By larwilliams in forum cPanel Developers
    Replies: 0
    Last Post: 11-30-2010, 06:15 PM
  4. Changing DocumentRoot via cPanel API?
    By Kadence in forum cPanel and WHM Discussions
    Replies: 13
    Last Post: 06-16-2009, 07:29 PM
  5. php server api changed:
    By admin0 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-09-2006, 08:14 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube