Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Correct way to enable PHP SuExec

Discussion in 'General Discussion' started by Daniel15, Oct 27, 2006.

  1. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Palo Alto, CA (originally Melbourne, Australia)
    cPanel Access Level:
    Website Owner
    Twitter:
    Hi,
    I've been trying to enable PHP SuExec on a server, but I'm having a few problems. I compiled Apache and PHP via the 'Apache Update' option in WHM. All seems to be going well (Apache starts), but when I try to access a PHP file, I get an 'Internal Server Error' message. The error log states something like:
    Code:
    [Fri Oct 27 23:41:47 2006] [error] (8)Exec format error: exec of /usr/local/apache/htdocs/phpinfo.php failed
    [Fri Oct 27 23:41:47 2006] [error] [client 202.7.176.134] Premature end of script headers: /usr/local/apache/htdocs/phpinfo.php
    
    Since I have no experience with cPanel-based servers, I'm not sure what to do to fix this. Does anyone know?
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    166
    what does this give you?

    service httpd configtest
     
  3. Daniel15

    Daniel15 Well-Known Member

    Joined:
    Oct 7, 2006
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Palo Alto, CA (originally Melbourne, Australia)
    cPanel Access Level:
    Website Owner
    Twitter:
    Doesn't matter, I seem to have fixed it.
    I was running PHP as an Apache module for a while, but I wanted to try PHP SuExec again, so I ran /scripts/easyapache today. This time, it worked perfectly :)

    There's still one script (Cacti) that gives that error, though, but most hosted sites seem to be working fine :D
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice