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.

Changing PHP's Server API

Discussion in 'General Discussion' started by phantasmp, Aug 9, 2003.

  1. phantasmp

    phantasmp Member

    Joined:
    Feb 19, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Canada
    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. mmkassem

    mmkassem Well-Known Member

    Joined:
    Oct 21, 2002
    Messages:
    390
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Egypt
    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:
     
  3. phantasmp

    phantasmp Member

    Joined:
    Feb 19, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Canada
    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. phantasmp

    phantasmp Member

    Joined:
    Feb 19, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Canada
    nevermind, i fixed it

    cPanel.net Support Ticket Number:
     
  5. nitromax

    nitromax Well-Known Member

    Joined:
    Feb 12, 2002
    Messages:
    189
    Likes Received:
    0
    Trophy Points:
    16
    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. phantasmp

    phantasmp Member

    Joined:
    Feb 19, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Canada
    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. wheimeng

    wheimeng Active Member

    Joined:
    Mar 4, 2003
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    how do i force PHP to run as a cgi module instead of apache?
     
  8. vicos

    vicos Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    62
    Likes Received:
    0
    Trophy Points:
    6
    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?
     
Loading...

Share This Page