13.4. Basics

To avoid those “Doh!” moments, make sure that

  • Your program has the execute bit set on Unix systems. The penalty for missing this one is a 403 Forbidden error, which is likely to make you think that the Web server can't get into the enclosing directory instead.

  • Your program has the correct #! line at the beginning. Getting it wrong will earn you a 500 Server Error.

Both of these problems are instantly detected by running the program from the command line on the Web server itself. If that works but you still get an error when coming through a Web browser, the permissions for the Web server user are set up incorrectly; contact the Web server administrator.

Get Perl Debugged now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.