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.

500 Internal Server Error With PHP Scripts/Files

Discussion in 'General Discussion' started by TorchServers, Aug 3, 2010.

  1. TorchServers

    TorchServers Active Member

    Joined:
    Jul 28, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    I have 12+ years experience in enterprise level IT, but with Windows-based servers... so please bear with me.

    I am trying to migrate 8 websites from one of my old CentOS 5.5 VPSs that was running ISP Manager over to my new CentOS 5.5 VPS that is running cPanel/WHM. All of the files and scripts were running fine on the retired server under ISP Manager, but are now dead on arrival on the new server.

    I have all of the files moved over, the databases created and the various settings config files edited, but when I navigate to any PHP run script like WordPress I get a 500 Internal Server Error. I can navigate and use HTML files just fine, but it's the PHP files that throw up.

    Some of the PHP scripts I'm running are WordPress, Simple Machines Forum, vBulletin, HostBill, Magento and a few "one off" PHP scripts like simple shopping carts and mailing lists. I also have no problem navigating and using any part of cPanel or WHM.

    To initially move the files over in a quick manner I TAR'd them on the original server, and then used WGET to download them on the new server... from there I uncompressed them and CHMOD'd them based on their recommended settings. I had used this method in the past without much issue, and it was certainly faster than using FTP as I moved about 70,000 files total.

    Checking the PHP settings on my server via WHM it seems to be running PHP5 with suphp as the handler, the settings can be viewed HERE. The basic PHP Configuration Editor settings can be viewed HERE... and nothing seems out of the ordinary.

    Now as stated, I am a Linux and PHP novice but I can manage my way around a server. I also have PHP scripts running just fine on another server with cPanel that has the same specs and image, so I'm figuring that this is all a permissions issue. I've read some of the other topics on this but replies are all over the place so I'd prefer answers that seem to be inline with my current situation.

    Any and all help is greatly appreciated, and I'll be happy to provide further information if needed... as this is a huge priority with me as I have so many websites down at the moment.

    EDIT: I forgot to mention that I did NOT copy over the old .htaccess files, and I have confirmed that .htaccess files aren't the problem, as I've deleted them and still have the problem.
     
    #1 TorchServers, Aug 3, 2010
    Last edited: Aug 3, 2010
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    tail or chevk your error log

    /user/local/apache/logs/error_log
     
  3. TorchServers

    TorchServers Active Member

    Joined:
    Jul 28, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    What I see in the logs when I visit a WordPress installation is... "Mismatch between target UID (510) and UID (501)"

    Code:
    [Tue Aug 03 20:04:13 2010] [error] [client 98.195.78.211] SoftException in Application.cpp:422: Mismatch between target UID (510) and UID (501) of file "/home/user/public_html/index.php"
    EDIT: I've seem to have gotten it working, although I have some further permission errors to work through.

    Using chown +R user:user /home/user/public_html/ seems to do the trick for the most part, as found in this post.
     
    #3 TorchServers, Aug 3, 2010
    Last edited: Aug 3, 2010
  4. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    /srcipts/chownpublichtmls would have down the trick
     
  5. TorchServers

    TorchServers Active Member

    Joined:
    Jul 28, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Thanks! I ran that just to be sure I did them all.
     
  6. TorchServers

    TorchServers Active Member

    Joined:
    Jul 28, 2010
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    I seem to still be having permission issues all over my server... my "time saving" technique has turned out to be a nightmare on this cPanel server. While I can now access the index.php of my WordPress and other scripts any time I click any links I get 404 file not found errors.

    I ran the EasyApache updated and the chown script and am still having issues... I'm kind of at wits end. Any new script I install from scratch works just fine with the exception of IonCube Loader, but all of the ones I copied over fail.
     
  7. danissch

    danissch Registered

    Joined:
    Apr 26, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Are you runing Suphp and you have enabled mod_userdir?

    if that correct see this thread to see if you resolve it:

    500 Internal Server Error with PHP file

    See you..
     
  8. danissch

    danissch Registered

    Joined:
    Apr 26, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    If you are running Suphp and you have issues with mod_userdir see this thread:

    http://forums.cpanel.net/showthread.php?p=850632
     
Loading...

Share This Page