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.

PHP Internal Server Error

Discussion in 'General Discussion' started by KomodoHost, May 26, 2004.

  1. KomodoHost

    KomodoHost Member

    Joined:
    Mar 1, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    I've been having a problem on a cPanel server regarding PHP uploads. Whenever a user uploads a PHP file the server gets a 500 error.

    I submitted a bug report to the PHP developers, but they haven't got back to me:
    http://bugs.php.net/bug.php?id=28362


    Any ideas?
     
  2. alex042

    alex042 Well-Known Member

    Joined:
    Sep 13, 2003
    Messages:
    76
    Likes Received:
    0
    Trophy Points:
    6
    I used to get these when I had phpsuexec installed. To fix this, I had to run /scripts/fixsuexecscripts for every script or sometimes every page of every script after I got the error.
     
  3. KomodoHost

    KomodoHost Member

    Joined:
    Mar 1, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Thank you for your reply, alex042. As per your suggestion, I tried running /scripts/fixsuexeccgiscripts, however, it hasn't seemed to correct the problem. I too am running phpSuExec.

    Anyone have any suggestions as to how to correct this without disabling phpSuExec?
     
  4. erwinfa

    erwinfa Well-Known Member

    Joined:
    Jun 14, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    0
    How about chmod 755 ?
     
  5. KomodoHost

    KomodoHost Member

    Joined:
    Mar 1, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    No, it's nothing wrong with permissions or file ownership. The problem only lies with file upload with phpSuExec.
     
  6. icanectc

    icanectc Well-Known Member

    Joined:
    Mar 10, 2003
    Messages:
    344
    Likes Received:
    0
    Trophy Points:
    16
    make sure users are not using .htaccess files with PHP_VALUE that will not work in phpSUEXEC.

    also php files should be uploaded in an ASCII format and chmoded to 755 or they will not run properly.
     
  7. KomodoHost

    KomodoHost Member

    Joined:
    Mar 1, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    It's nothing wrong with the script configuration. The files are uploaded correctly, have the correct ownership and permission. The problem only occurs when uploading a file using a PHP script. Other then that, there are no other problems with PHP.

    You can see the sample for yourself at:
    http://www.komodohost.com/uploadbug.php
     
  8. positive

    positive Member

    Joined:
    Mar 29, 2003
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    any solution for this?
     
  9. linux-image

    linux-image Well-Known Member

    Joined:
    Jun 8, 2004
    Messages:
    1,192
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    Root Administrator
    make the folder to which u upload the file 777 and try.
     
  10. Skie

    Skie Active Member

    Joined:
    Mar 27, 2003
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    I'm running phpsuexec and I've had this problem several times. File permissions need to be set differently then if you're not running phpsuexec. Specifically, other users CAN NOT have write access to the php files. In rare cases, even the user himself can't. Setting the scripts to chmod 755 should fix the problem. I've also noticed that sometimes .htaccess will have commands inside it that don't seem to work as they should. If that's the case, you'll get the Internal Server Error as well. Either comment out everything in .htaccess, or rename the file and try again.
     
Loading...

Share This Page