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.

Apache, php and suexec problem... URGENT

Discussion in 'EasyApache' started by KimBO, May 31, 2006.

  1. KimBO

    KimBO Well-Known Member

    Joined:
    Sep 2, 2004
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    6
    Hello!!

    After an update of apache from version 1.3.34 to 1.3.36 phpsuexec does not work longer...

    We have tried everything to get it back running... PHP 5.1.2 and PHP 5.1.4 and also 5.0.5... nothing... but all three version work as apache modul...

    After this message in WHM in apache-update
    * This is buildapache version 1.5.402 (for cpanel <= 10.9.3) (ap=1.3.36) *
    phpsuexec and/or (we tried both) be activated, we can not run any php script which are hosted on our server...

    In the suexec_log we found the following message:
    [2006-05-31 08:26:59]: info: (target/actual) uid: (user/user) gid:
    (user/user) cmd: index.php
    [2006-05-31 08:26:59]: error: file has no execute permission:
    (/home/user/public_html/index.php)


    How can we solv the problem? It is a little bit urgent, because all hosted sites with php does not work longer....

    Greetings...

    KimBO
     
  2. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    Have you tried php 4.2.2 complied as CGI phpsuexec?
     
  3. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    A bit of a hint perhaps - what are the permissions on the script? Perhaps it has no execute permissions?
     
  4. Renjith Rajan

    Renjith Rajan Member

    Joined:
    Aug 22, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Solution

    Its an old thread..still i am posting the solution...

    Problem:-

    After compiling phpsuexec you are getting 500 errors when accessing php files...

    apache error_log shows

    Premature end of script headers: /home/xxxx/public_html/index.php

    suexec_log shows

    info: (target/actual) uid: (xxxx/xxxx) gid: (xxxx/xxxx) cmd: index.php
    error: file has no execute permission: (/home/xxxx/public_html/index.php)

    Solution:-

    Check httpd.conf (/usr/local/apache/conf/httpd.conf ) and make sure that you have the line

    AddHandler application/x-httpd-php .php .php4 .php3

    Just before

    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php .phtml

    If it is not there, add it..the resulting lines should be

    AddHandler application/x-httpd-php .php .php4 .php3
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php .phtml

    Now..restart apache...

    Hope..it may help someone...
     
  5. lloyd_tennison

    lloyd_tennison Well-Known Member

    Joined:
    Mar 12, 2004
    Messages:
    698
    Likes Received:
    1
    Trophy Points:
    18
    I had the same thing happen, and I had done the update from easyapache and then it did not work. As a fluke, I tried recompiling from Whm and it did. No idea why, as I retried that as as fluke as easyapche also did not give me any options to upgrade php to any 5.0, (I left at 4.42 anyway to check and see if all 5.x problems were solved with Cpanel yet. I think so, but...)
     
  6. sag

    sag Registered

    Joined:
    Aug 4, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Yes! It worked :)
    AddHandler application/x-httpd-php .php .php4 .php3 was missing after enabling suexec.

    Thanks for your post.

     
  7. budway

    budway Well-Known Member

    Joined:
    Apr 16, 2003
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    Tought and Good call!!!


    Way to go Renjith Rajan! :)
     
  8. Sindorf

    Sindorf Member

    Joined:
    Aug 3, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    I just go this error after upgrading to Apache 1.3.39 + PHP 5.2.4 with phpSuExec and solved adding the missing "AddHandler" directive.

    Although almost a year has passed, I would like to thank you for your solution. :)
     
  9. big

    big Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    224
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    mine is
    Code:
        #
        # AddHandler allows you to map certain file extensions to "handlers",
        # actions unrelated to filetype. These can be either built into the server
        # or added with the Action command (see below)
        #
        # If you want to use server side includes, or CGI outside
        # ScriptAliased directories, uncomment the following lines.
        #
        # To use CGI scripts:
        #
    AddHandler application/x-httpd-php .php .php4 .php3
    AddType application/x-httpd-php .php
    AddType application/x-httpd-php .php4
    AddType application/x-httpd-php .php3
    AddType application/x-httpd-php-source .phps
    AddType application/x-httpd-php .phtml
    AddHandler cgi-script .cgi .pl
    AddType text/html .shtml
    AddType application/x-tar .tgz
    AddType text/vnd.wap.wml .wml
    AddType image/vnd.wap.wbmp .wbmp
    AddType text/vnd.wap.wmlscript .wmls
    AddType application/vnd.wap.wmlc .wmlc
    AddType application/vnd.wap.wmlscriptc .wmlsc
    and yet having this error? any other solution?
     
  10. dragon2611

    dragon2611 Well-Known Member

    Joined:
    Nov 30, 2003
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    Chmod -R 755 *.php on the affected site, worked for me. (checked one of the users scripts and it was set to 777 :eek: ) changed it and voilla fixed :D
     
  11. big

    big Well-Known Member

    Joined:
    Aug 12, 2001
    Messages:
    224
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    mine was fixed by removing APC because it doesn't work with phpsuexec :)
     
  12. nerbonne

    nerbonne Well-Known Member

    Joined:
    Aug 19, 2007
    Messages:
    52
    Likes Received:
    1
    Trophy Points:
    6
    YOU JUST SAVED MY ASS!

    Ok ok, sorry about the caps, but I owe you a lifetime of beer. Thanks.



     
Loading...

Share This Page