osenouci

Member
Feb 21, 2013
6
0
1
cPanel Access Level
Root Administrator
I am using WHM 11.34.1 (build 7) on a vps running centos 5.3. I have created an account and uploaded a website to it. When I upload a file using PHP file the server lays out error 500.

I have checked the file permissions but nothing so far.I have no idea why the access log is not being written to.

CGI/FastCGI

I have done more checks on it and it seems like the file is being uploaded successfully however when the script that moves it is called, meaning when the form url is called I am getting error 500.

This is really strange.
 
Last edited:

osenouci

Member
Feb 21, 2013
6
0
1
cPanel Access Level
Root Administrator
The upload starts and when the file gets submitted to PHP script that handles moving the file, I get the error 500. The script that handles the upload is located on on same page as the script that handles moving the file.
 

osenouci

Member
Feb 21, 2013
6
0
1
cPanel Access Level
Root Administrator
I have looked for mod_suphp in phpinfo() and there are no traces for it. However I have noticed that the directory permissions were named after the user account that I created using cpanel.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
I have looked for mod_suphp in phpinfo() and there are no traces for it. However I have noticed that the directory permissions were named after the user account that I created using cpanel.
Look what is the "Server API" in phpinfo.
 

osenouci

Member
Feb 21, 2013
6
0
1
cPanel Access Level
Root Administrator
I have done more checks on it and it seens like the file is being uploaded successfully however when the script that moves it is called, meaning when the form url is called I am getting error 500.
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
CGI/FastCGI
Means you use suPHP, and there should not be problems with file/directory rights if owner/group is the cPanel user and files are 644 and directories 755.

- - - Updated - - -

Sounds like you are not running SuPHP to me.
Really?
All our servers run suPHP and Server API = CGI/FastCGI.
 

LDHosting

Well-Known Member
Jan 19, 2008
93
2
58
cPanel Access Level
Root Administrator
Well:



That's what that sounds like to me.
Or the script requires a PHP module that is not installed, or the script runs out of memory, or the script reaches the PHP max_execution_time, or the script is killed by CSF or similar, or there is a .htaccess problem, or 1 of 100 other different reasons.

Error 500 is a generic error message. Without checking the Apache error logs (/usr/local/apache/logs/error_log), any suggestions are basically guesswork.
 
Last edited:

osenouci

Member
Feb 21, 2013
6
0
1
cPanel Access Level
Root Administrator
I have found the problem. My initial problem was that there was nothing written in the access error logs. I have finally managed to solve this. Apparently GD was not installed. I have recompiled PHP with GD and it worked like a charm.

Thanks for all of ya for trying to help. It was a pleasure.
 

Infopro

Well-Known Member
May 20, 2003
17,113
507
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Or the script requires a PHP module that is not installed, or the script runs out of memory, or the script reaches the PHP max_execution_time, or the script is killed by CSF or similar, or there is a .htaccess problem, or 1 of 100 other different reasons.

Error 500 is a generic error message. Without checking the Apache error logs (/usr/local/apache/logs/error_log), any suggestions are basically guesswork.
'Sounds like', is guesswork. Nothing more. Thank you for straightening me out though. You are correct, it could be 1 of 1000 things. And, with no mention of trying to upload images in this thread:
..Apparently GD was not installed.
We only had 999 more reasons to go, to figure it out. We were almost there! :p