PDA

View Full Version : Internal Server Error



Ericsson
August 30th, 2005, 16:01
I get the error,

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@site.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/1.3.33 Server at www.imguploads.net Port 80
What normally causes this? I uploaded an image hosting script I it came up...

Yellowmc
August 30th, 2005, 16:25
Maybe the permissions on the folder.

Ericsson
August 30th, 2005, 16:34
Its in the public_html folder....

Yellowmc
August 30th, 2005, 16:38
You may have uploaded the script in the wrong mode, If its perl it should be ASCII.

Ericsson
August 30th, 2005, 16:51
Its in PHP, ive uploaded it before and it worked fine.

Yellowmc
August 30th, 2005, 16:54
I found this:

1. Location

Did you upload your scripts into the right place? This is not as obvious as it may seem. Some servers are configured to run your CGI scripts anywhere. Others will only run it when it is installed in a particular directory. It is not just a matter of creating a "cgi-bin" directory - for example, some hosts configure the server so that it will run scripts only from a particular directory outside the web directory structure (for security reasons). Your web page will still call the script "/cgi-bin/script.pl" but the server maps it to the actual directory. You will have to upload it in the right directory, regardless of what your web page calls it. Find out such information from your web host's documentation.
2. File Upload Mode

Did you upload your Perl script in ASCII mode? Your FTP client may have uploaded the script in binary mode if you did not take any special action. Perl scripts are ASCII files, and since different operating systems have different ways of representing the end of line character (eg Unix uses a line-feed, Windows uses a carriage-return and line-feed pair), it is important that you set the uploading method to ASCII, so that line-end translation is performed.

Re-upload the script, this time making sure that it was uploaded in Text or ASCII mode. If you are using a Windows FTP program like WS_FTP, make sure that the radio button "ASCII" is selected and not "Binary" or "Auto". Do not use any auto-detection options since the FTP program might assume the extensions you are using for your scripts are for binary files.
3. File Permissions

Did you change the permissions on your script so that it can be executed on your web server? In most cases, simply uploading the Perl script to the server does not necessarily mean that it can run. On Unix web servers (like Linux, BSD, Solaris, etc), it is necessary to change the file permissions to indicate to the operating system that the file may be executed. If you have a Unix FTP client, set the permission ("chmod") of the file to 755, which allows the script to be executed by everybody. If you are using WS_FTP from Windows, right click the file that you've just uploaded and choose "chmod". You will be presented with a dialog box where you should check "Read, Write, Execute" for the owner, "Read, Execute" for the group and everyone else.
4. Check Modifications

If you actually had to modify the script to configure it, did you introduce new errors into the script? If you are not the author, get another copy of the original script (prior to your changes) and compare it with your current script. Perhaps you forgot to place a semi-colon (";") after a particular variable assignment. Or perhaps you added special reserved characters in your double-quoted strings - for example if your double-quoted string (strings enclosed in the " quote character) has a "$" or "@" embedded in it, make sure that it is preceded with a backslash, ie, use "\$" to get a "$", and "\@" to get a "@".

http://www.thesitewizard.com/archive/servererror.shtml

Canuckkev
August 30th, 2005, 20:46
Try checking to see if your server collects an "error_log" file (or view the actual server logs, if available).

Most likely it's an error with the PHP script. Although, it would have to be on a high level, if PHP can't even print out it's own error message. Maybe it's a bigger problem higher up with how your server is set up then.

gVeR
August 31st, 2005, 05:38
I Think PHP is down!

Ericsson
August 31st, 2005, 11:21
All other sites worked.
I tried uploading it a few ways but it never worked...

Fixed.
It was the .htaccess file.

ksspk
October 12th, 2005, 22:33
All other sites worked.
I tried uploading it a few ways but it never worked...

Fixed.
It was the .htaccess file.

Ericsson:
I'm kind of having the same problem. I'm not sure if the problem is with the apache web server or not. Can you tell me what the issue was with the .htaccess file?

Thanks,

coloroom
October 12th, 2005, 22:35
Glad to hear you fixed the problem Ericsson. You should disclose how you fixed it to the other members on the board.

lindz
October 28th, 2005, 06:00
hi all,

i got the same problems, and it's made wondering for some time untill i google it and brought me here :-) . Actually i was doing some testing with my upload script and after several times of uploading/changing my cgi script, i encountered this error =( . then i read:


Yellowmc:
....Did you upload your Perl script in ASCII mode? Your FTP client may have uploaded the script in binary mode if you did not take any special action. Perl scripts are ASCII files, and since different operating systems have different ways of representing the end of line character (eg Unix uses a line-feed, Windows uses a carriage-return and line-feed pair), it is important that you set the uploading method to ASCII, so that line-end translation is performed.

yeah, a few times i use ftp while changing the script but now when i tried using SSH2 transfer proctocol everything has been change, my script doesn't work anymore. After i read mr yellows comments above it seems to be ok now(now i'm using FTP instead of SSH). thats it !!! :classic2:

ryza
October 28th, 2005, 06:13
sounds like a htaccess error

try delete the hidden file named .htaccess

Tree
October 28th, 2005, 08:31
Or just make sure that the correct permissions and stuff are set. .htaccess files are important, and shouldn't be deleted randomly.

Dub
October 28th, 2005, 15:09
Usually you can find what is causing this error by reading your Error_Log (In cPanel)