One of the most common errors when working with CGI scripts is the "500 - Internal Server Error" message. This can be for any number of reasons, the most common of which are outlined below.
Problem: Path to perl is incorrect.
Solution: Set the path correctly. For our systems, either of the following will work.
#!/usr/bin/perl
#!/usr/local/bin/perl
Problem: Permissions on the script are incorrect.
Solution: Set the script permissions to 755. Supporting data files may need different permissions, depending on the script; please check the documentation for the script for how permissions should be set for these files.
Problem: Directory where the script resides is world-writeable.
Solution: Change the permissions on the directory to 755 (rwxr-xr-x). This includes the /public_html directory for your account, no matter what any script\'s installation instructions might indicate (that is, do not set your /public_html to 777).
Problem: The script tries to write data to a file, but generates a "permissions denied" error.
Solution: Check the settings of the destination file or directory. In general, setting the permissions to 644 (rw-r--r) will be sufficient for most scripts. Check the documentation for the script to verify how the permissions should be set.
Problem: Filenames were changed from mixed-case to lower-case during uploading.
Solution: Upload using a different client that will preserve case.
Problem: Internal server error messages continue after the above items have been checked.
Solution: <a href="https://secure.hostmatters.com" target="_blank">Open a ticket</a> directly or via email to <a href="mailto:support@hostmatters.com">support@hostmatters.com</a>
- 0 Пользователи нашли это полезным