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 gives me 500 Internal Error

Discussion in 'General Discussion' started by Emil_RDW, Apr 26, 2011.

  1. Emil_RDW

    Emil_RDW Member

    Joined:
    Apr 26, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hello everybody,

    I'm having a strange problem. I have 2 almost identical websites and I want to run a simple CAPTCHA php image generating file for the contact/suggest sections. On one site it works great, php loads a random image. The problem is the other website. Every time I try to run any PHP it gives me Internal Error. I've double checked everything and I am running out of options! I've double checked .htacess but that's not it.

    The server error log shows this:

    Code:
    [Tue Apr 26 08:35:24 2011] [error] [client 66.0.144.147] File does not exist: /home/fullertr/public_html/index.php, referer: http://www.fullertransmission.com/captcha/
    [Tue Apr 26 08:35:24 2011] [error] [client 66.0.144.147] SoftException in Application.cpp:357: UID of script "/home/fullertr/public_html/captcha/securimage_show.php" is smaller than min_uid, referer: http://www.fullertransmission.com/captcha/
    
    Here is an example:

    Working: /http://www.spicertransfercase.com/captcha/securimage_show.php
    Not Working: /http://www.fullertransmission.com/captcha/securimage_show.php

    I've checked permissions, but that's not it either..

    Any help on that error message?

    Thank you
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Assuming you have to edit a config file for this, you might check those settings for the captcha.
     
  3. Emil_RDW

    Emil_RDW Member

    Joined:
    Apr 26, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Update: well a little Google goes a long way. Apparently it's a Permission issue where the file is owned by root and it's not supposed to be.

    Some other website said to run this:

    chown username:groupname filename.php

    but since I've used cPanel for about a day, i dont really know how to do that... :/

    any help on that?
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Securimage PHP Captcha | FAQ
     
  5. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:

    Do you have root access? If yes you could run that command from SSH. If not you'd need to ask your host to set owner for you. Short of that, delete the files the same way you uploaded them to this account. Then re upload them logged in as that user.
     
  6. Emil_RDW

    Emil_RDW Member

    Joined:
    Apr 26, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I do have root access so I should be good to go. I just don't see anything in cPanel that says SSH for me to click on
     
  7. Emil_RDW

    Emil_RDW Member

    Joined:
    Apr 26, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Well I think I figured it out!

    I went in to cPanel and change the PHP handler from suPHP to CGI and now it works great!!

    Thanks a lot Infopro for the great help!
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Not sure I would have taken that route.
     
  9. Emil_RDW

    Emil_RDW Member

    Joined:
    Apr 26, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    What would be the difference?
     
  10. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Why would you want files owned by root on a user account?
     
  11. Emil_RDW

    Emil_RDW Member

    Joined:
    Apr 26, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Good point. I guess I'll have to work on that and change them. Thanks for the input!
     
  12. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I wouldn't suggest using CGI, which is slower and less secure than suPHP. Since it's a permissions issue, you should simply log into root SSH using a client like putty (PuTTY Download Page) and then run the command:

    Code:
    cd /home/fullertr/public_html/captcha/
    chown fullertr:fullertr securimage_show.php
    That's all you would need to do if it is simply a permissions issue.
     
  13. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    I've posted this before for users not sure or uncomfortable using SSH. Of course you'd need to use SSH to actually install it, but once you have it installed changing owner on a file can be done via WHM pretty easy.
    ConfigServer Explorer
     
  14. Emil_RDW

    Emil_RDW Member

    Joined:
    Apr 26, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Thank you! This is what I was missing! I wasn't aware of Putty! I logged in, changed it back to suPHP, and of course I got 500 Internal error again, so with putty I ran those lines of code and it works!

    ::sigh:: I feel better now! :)

    Now I have a question, I noticed that now, I have to manually do that for every new php file I add. Is that right? There's no global way to change it once?

    Thanks again guys! Infopro you too for showing me why I shouldn't use the CGI way!
    -Emil

     
    #14 Emil_RDW, Apr 26, 2011
    Last edited: Apr 26, 2011
  15. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    How are you adding these files? If by FTP client, you should check your settings.

    You're certainly welcome. :)
     
  16. Emil_RDW

    Emil_RDW Member

    Joined:
    Apr 26, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    I'm actually working in DreamWeaver that's connected to the server
     
  17. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    You should be connecting to the appropriate site using the cPanel username/password and not logging in using root when uploading files. If you log in as root, you are going to upload files as root.
     
  18. Emil_RDW

    Emil_RDW Member

    Joined:
    Apr 26, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    hmm.. yeah that makes sense! I just started yesterday with this company and some things were already set up so I'm still trying to figure this all out...

    Thanks!
     
  19. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Don't use root login for anything unless you absolutely need to. Good rule to live by. ;)
     
  20. cruz2011

    cruz2011 Registered

    Joined:
    May 5, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem /http://www.3arabgames.com/vb/
     
Loading...

Share This Page