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.

404 Not Found error

Discussion in 'General Discussion' started by BenMadd, Jul 15, 2017.

  1. BenMadd

    BenMadd Registered

    Joined:
    Jul 15, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Melbourne
    cPanel Access Level:
    Root Administrator
    Hi lads,

    accidentally, I have removed some accounts from our CPanel but luckily could restore them from backup.

    Now I am getting 500 internal server error. Weird!

    Once I have checked the Apache error log, I found the following error:

    SoftException in Application.cpp:602: Could not execute script "/home/****/public_html/index.php"

    Caused by SystemException in API_Linux.cpp:465: chdir() failed: No such file or directory

    Premature end of script headers: index.php

    File does not exist: /home/****/public_html/500.shtml

    just for letting you know that I have changed the permission and all that stuff but no luck!

    Please help as they going to kill me.

    Cheers
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,629
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    A similar thread here:
    suPHP 500 Internal Error

    File permissions and owner of the files and directories should be checked.
     
  3. BenMadd

    BenMadd Registered

    Joined:
    Jul 15, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Melbourne
    cPanel Access Level:
    Root Administrator
    Hi Peter,

    Yes, I have read that thread but didn't help at all. as I have changed all the permission on PHP files. but no luck.

    would you please give more information to be specific that how can I rectify this issue.

    Thanks

    I have done the following as well but ...

    1. logged in as root type
    chown -R username:username /home/USERNAME/public_html/
    2. stil as root type:
    chmod -R 0755 /home/USERNAME/public_html
     
    #3 BenMadd, Jul 15, 2017
    Last edited by a moderator: Jul 15, 2017
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Hello,

    Run these:

    Code:
    chown -R username: /home/username/public_html
    find /home/username/public_html/ -type f -exec chmod 644 {} \;
    find /home/username/public_html/ -type d -exec chmod 755 {} \;
    chmod 755 /home/username/public_html
    Just make sure to replace username with the cPanel username

    If the problem persists, please:

    Code:
    tail -f /usr/local/apache/logs/error_log
    then refresh the page in your browser and provide the error
     
  5. BenMadd

    BenMadd Registered

    Joined:
    Jul 15, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Melbourne
    cPanel Access Level:
    Root Administrator
    Hi Jcats,

    Thanks for your response. I have tried all the recommendations but still no luck: as requested please find the following:

    Sun Jul 16 09:11:47 2017] [error] [client 124.181] SoftException in Application.cpp:602: Could not execute script "/home/advances/public_html/index.php"

    [Sun Jul 16 09:11:47 2017] [error] [client 124.181] Caused by SystemException in API_Linux.cpp:465: chdir() failed: No such file or directory

    [Sun Jul 16 09:11:47 2017] [error] [client 124.181] Premature end of script headers: index.php

    [Sun Jul 16 09:11:47 2017] [error] [client 124.181] File does not exist: /home/advances/public_html/500.shtml
     
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    588
    Likes Received:
    88
    Trophy Points:
    153
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Can you provide output:

    Code:
    ls -lah /home/advances/public_html/
     
    BenMadd likes this.
Loading...

Share This Page