Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I run a fairly popular website (I do not mean to brag, but I have 20,000 users who want access. I don't want to keep them waiting any longer.) and it has been down for almost a month while I try to find out what is wrong. Basically, I can't run any PHP. It all happened after we moved my account to a CPanel so I could manage things myself without the help of my web admin. I love having CPanel access, but I can't run any php.

I have re-uploaded the site, restored the 1.3TB database, made new subdomains, changed ownership, fixed permissions, made everything perfect in CPanel. Still, I only get a 500 error when running the site. No PHP works at all, not even a simple echo.

I made new .php files and tried and still no go. When I run the site in WAMP and XAMPP it works (I guess) I don't see the site, it just complains about the database not found because the $database variable is set for localhost.

My web admin and I have tried EVERYTHING. HTML works fine. I am pretty much stuck here. If you want to see the 500 error for yourself: capecraft.capturedhdtv.com/capes/site/demo.php.

Any solutions would be VERY appreciated. Also, we have tried things like remove .htaccess.

Also, my logs tell me absolutely NOTHING AT ALL. The error_log in FTP tells me just mistakes I made a long time ago during setup, like 404.shtml not existing because I forgot to copy it. The Error Log in cpanel tells me nothing relating to my issue. Just how files don't exist that people are trying to access, example a picture that isnt on the server (not relating to the website at ALL)

CPanel Log: Where you see .png and a missing IP, or part of a directory, I removed it for security purposes.

[Fri Feb 24 03:35:14 2012] [error] [client ] File does not exist: /home//public_html/capes2/404.shtml
[Fri Feb 24 03:35:14 2012] [error] [client ] File does not exist: /home//public_html/capes2/.png
[Fri Feb 24 03:35:13 2012] [error] [client ] File does not exist: /home//public_html/capes2/404.shtml
[Fri Feb 24 03:35:13 2012] [error] [client ] File does not exist: /home//public_html/capes2/.png
[Fri Feb 24 03:35:10 2012] [error] [client ] File does not exist: /home//public_html/500.shtml
[Fri Feb 24 03:35:10 2012] [error] [client ] SoftException in Application.cpp:357: UID of script "/home//public_html/capes/site/sup/tests/action-acceptance.php" is smaller than min_uid
[Fri Feb 24 03:35:09 2012] [error] [client ] File does not exist: /home//public_html/capes2/404.shtml
[Fri Feb 24 03:35:09 2012] [error] [client ] File does not exist: /home//public_html/capes2/.png
[Fri Feb 24 03:35:09 2012] [error] [client ] File does not exist: /home//public_html/capes2/404.shtml
[Fri Feb 24 03:35:09 2012] [error] [client ] File does not exist: /home//public_html/capes2/.png
[Fri Feb 24 03:35:06 2012] [error] [client ] File does not exist: /home//public_html/capes2/404.shtml
[Fri Feb 24 03:35:06 2012] [error] [client ] File does not exist: /home//public_html/capes2/J.png
[Fri Feb 24 03:35:01 2012] [error] [client ] File does not exist: /home//public_html/capes2/404.shtml
[Fri Feb 24 03:35:01 2012] [error] [client ] File does not exist: /home//public_html/capes2/.png
[Fri Feb 24 03:34:57 2012] [error] [client ] File does not exist: /home//public_html/capes2/404.shtml
share|improve this question
1  
Create a new file, containing <?php phpinfo(); ?> -- does it display a anything? –  jscott Feb 24 '12 at 3:50
    
internal server error (500) capecraft.capturedhdtv.com/capes/site/phpinfo.php –  Austin Walhof Feb 24 '12 at 3:53
1  
You're going to have to find out why your error_log isn't showing the errors to start with. There's a high probability during your move that CPANEL isn't pointing you to the right error log cause those 500's ARE going into a log somewhere. Is there still a possibility of having SSH access to follow a more raw troubleshooting process? –  thinice Feb 24 '12 at 3:58
    
You might do right by posting the tail of your error_log anyways –  thinice Feb 24 '12 at 3:59
2  
Talk to the hosting company and ask for the server logs. Until you can see what is being logged you and we can only guess and guessing is not what we do. –  John Gardeniers Feb 24 '12 at 4:00
show 5 more comments

3 Answers

Honestly? Hire someone to manage your server. If you have a 1.3 TB database, cPanel is not for you. Given the amount of data, you're going to need a pretty optimized MySQL server in order to get anywhere near acceptable performance. cPanel is not exactly ideal for very large websites (it severely limits the amount of serverside settings you can change without breaking other things).

However, your actual problem is probably file permissions. cPanel configures PHP in a way where it won't run if permissions are too open (this is a perfectly reasonable thing to do on a shared server, which is what cPanel is designed for). CHMOD all your files to 644 and all directories to 755 (see http://djlab.com/2009/06/cpanel-suphp-chmod-all-files-644-and-all-folders-755/ )

share|improve this answer
    
Thank you my friend! I checked my public_html folder and it was 777. –  Austin Walhof Feb 24 '12 at 4:30
add comment

your whm has a settings called minimum uid the default value for it is 500 and in linux every user has a unique number called uid once you creating an account to use the cpanel for example fareed this account uid will be 500 and the next time will be set to 501 and so. for any user you can check the user uid using this ssh command:

id -u username

for a security reason whm configured apache server to not execute any php script in a file has an owner with a uid less than the minimum uid witch is set to 500 in whm.

so if you upload your site files using scp/ftp using the root user for example all these files ownership is set to root,so check this user uid if its less than 500 (btw root user uid is 0 by default) change the owner uid to something more than 500 using this ssh command:

usermod -u 1000 username

or change the files ownership to another user using this ssh command:

 chown -R username:username  /home/username/public_html/
share|improve this answer
add comment

A simple way to first check whether the PHP interpreter is working correctly is by running it on the command line,

php yourphpscript.php

If the above command throws the output of the script then it's pretty much confirmed that your PHP interpreter is working fine.

Secondly, the internal server error definitely will get logged into the Apache error_log. The snippet you've provided does not seem to indicate any instance of the internal server error.

A better approach would be to run a tail with the -f option to follow the log file, then access your website URL. Any error/message that gets logged would show up on the screen,

tail -f /path/to/apache/error_log 

A 500 Internal Server Error can also occur due to an incorrect entry in .htaccess.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.