0

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
Zoredache
  • 130,897
  • 41
  • 276
  • 420
  • 1
    Create a new file, containing `` -- does it display a anything? – jscott Feb 24 '12 at 03:50
  • internal server error (500) capecraft.capturedhdtv.com/capes/site/phpinfo.php –  Feb 24 '12 at 03: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 03:58
  • You might do right by posting the tail of your error_log anyways – thinice Feb 24 '12 at 03:59
  • 3
    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 04:00
  • Your logs may not tell you anything, but are you certain they wouldn't tell us something? – Zoredache Feb 24 '12 at 04:02
  • I posted the logs, removed the IPs and usernames for security + my directory. (where the // is) Most file not found errors are from the minecraft mod that I am hosting, it can't find the player online after he/she logged off. Also, I don't have a host. The server was donated by a really nice person, he is renting me space on his. Neither of us can figure out the errors at this point –  Feb 24 '12 at 04:09
  • Your editing logs does very little here, because you left directory indexes on: http://capecraft.capturedhdtv.com/capes/ – devicenull Feb 24 '12 at 04:15
  • Yes, I know indexes were left on. This was to test some stuff. capecraft.capturedhdtv.com is actually the new subdomain. Edit: turned them off, thanks for reminding me to do that. Kinda forgot after a week of trying to get it working. –  Feb 24 '12 at 04:21
  • Thanks so much to devicenull for fixing it! I checked my www folder in the server and it was 777. –  Feb 24 '12 at 04:30

3 Answers3

12

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/ )

devicenull
  • 5,622
  • 1
  • 26
  • 31
  • Thank you my friend! I checked my public_html folder and it was 777. –  Feb 24 '12 at 04:30
1

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/
0

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.