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 suEXEC always error 500

Discussion in 'General Discussion' started by ezak, Aug 21, 2007.

  1. ezak

    ezak Member

    Joined:
    Aug 20, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    I have my site and my forum
    and when I try to use PHP suEXEC support
    its give me error 500 internal server error
    and this happened only in php files
    and html works well

    the problem now is
    the default permission for folder is 755 and that should be writable
    and my site folder is 755 and not writable


    when I asked some friends
    they told me that I should use PHP suEXEC support
    and when I use its , its give me error 500 in any php files
    Note: even there are no .htaccess its give the same error


    how to slove this probem
    coz I don't want to make my folders 777

    thanks in advice
     
  2. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    so you are sure the permissions are correct and your script documentation says 755 will run fine? Check the owner of the files. PHPsuexec will need to run files as the account owner and not "nobody" if this is the case.

    Just a few adjustments, im sure you will be fine.
     
  3. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    With PhpSuexec, directory permissions of 755 will indeed be fine. That is so because with PhpSuexec, your PHP script executes as the user -- permission of 7 means read, write and execute for the user. You do not need to set anything else to give PHP write access.

    Two common permission/ownership problems that cause error 500:
    1. PHP scripts are may not be set writable or executable by others. Thus, set all PHP files to 644 (read only for group and world).
    2. Group ownership of the public_html directory (only the directory, not its contents) must be nobody. For example: chown username:nobody /home/username/public_html
     
  4. ezak

    ezak Member

    Joined:
    Aug 20, 2007
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    thanks for all who try to help

    but I tried ervery thing without any useful
    but after search at forum here I found the solution :D

    that I should disable Shell Fork Bomb Protection from security center :confused:

    I don't know what the relate with it :eek:
    but its solved my problem that I was lost hope to fix it
     
  5. Stefaans

    Stefaans Well-Known Member

    Joined:
    Mar 5, 2002
    Messages:
    451
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Vancouver, Canada
    Now that is interesting. We use PhpSuexec on all our servers and have Shell Fork Bomb Protection enabled :confused:

    I am glad you resolved the problem, illogical as the solution may seem ;)
     
Loading...

Share This Page