|
To resolve an "Internal Server Error" accessing the ftpdiag.cgi script:
-
Check transfer mode (ASCII vs. binary)
Your CGI script must be uploaded in ASCII mode (not binary mode or automatic mode). With most FTP programs you need to choose ASCII mode explicitly. If you use WS_FTP, it is right in front of you on the transfer screen. Cute FTP users click here.
DiscusWare suggests that you delete the ftpdiag.cgi script from your server, then select ASCII mode with your FTP program, and then upload the file again. Once the file is uploaded, don't forget to set permissions.
-
Check file permissions (unix servers)
File permissions must be set to 0755 (rwxr-xr-x) on this CGI script. If you need assistance consult How to change permissions using WS_FTP, Cute FTP, and other programs.
-
Check the Perl path
This should be on the top line of your script, and it will look like this:
#!/usr/bin/perl
Make sure it's correct for your server. It's a typical feeling among unix server administrators that any server not having Perl in /usr/bin/perl is seriously misconfigured.
Your server might use the path of /usr/local/bin/perl, or something else. Ask your web host or consult their documentation if you are not sure about this. It's almost always the case that if #1 above did not solve the problem, it's a problem with the Perl path.
It is possible that your server has an FTP server that does not correctly convert line endings when ASCII mode is used. Sometimes changing the path to perl to /usr/bin/perl -- (that's /usr/bin/perl followed by a space and then two dashes) will help work around this problem.
-
Check the integrity of the file
Your ftpdiag.cgi script should start with the path to Perl on the first line (see previous step). Now scroll to the end of the file. Make sure that the file does not appear to be "cut off". For your reference, the size of the ftpdiag.cgi file is approximately 19 kB. The first line of the file should be #!/usr/bin/perl (or whatever Perl path you used). If the file is a jumble of unrecognizable text, it is possible that you did not rename the downloaded file ftpdiag.zip and then extract it with a zip program.
-
Check for rogue .htaccess files
Apache servers with improperly configured .htaccess files can produce Internal Server Errors when you attempt to access any files in the directory.
Temporarily remove any .htaccess files that may be in that directory (save them to put back later). If the script now works, the problem is with your .htaccess
file.
-
Run the script from the command line
If you have telnet access, "cd" to the directory that contains the script and run the script from the command line by typing:
./script_name.cgi
(Then again, if you have telnet access, ask yourself why you are running the FTP setup procedure...)
-
Check your server's error log
Access your server's error log (you may have to contact your web host). Look for any clues to why the script is failing.
The only way that DiscusWare can provide support for this error is if there is a problem with the Perl code of the Discus script. This problem would be apparent in errors being displayed in the final two steps above. If a problem with the Perl code is indicated, please contact DiscusWare Support with the exact text of the server's error log relating to the problem.
|