[ Contents | << Previous | Next >> ]
Here are some possible problems, and what you might check to fix them. Every server is setup somewhat different, so it is impossible to anticipate all problems.
When relevant, where the error shows up--in a web browser, the Apache logs, or when run on the command line--is in [brackets].
The directory where the CGI scripts are installed is not setup as a CGI directory. Ask your system admin where to put CGI scripts. It should be a ScriptAliased directory.
The directory is not ScriptAliased; see above.
(Nor does .pl have a CGI handler, but I strongly recommend using ScriptAliased directories rather than a .pl handler, for security reasons.)
(After fixing the Apache configuration, you may have to quit your web browser to clear the problem.)
This is a fairly generic error--you will need to look in the Apache logs or run the script from the command line to see a more specific error message.
prompt> tail -f /var/log/apache/error.log [Thu Dec 5 20:50:13 2002] DBI->connect(database=calendar3;host=localhost) failed: Access denied for user: 'kalendus@localhost' to database 'calendar3' at Kalendus.pm line 83 [Thu Dec 5 20:50:13 2002] Can't connect to MySQL database: Access denied for user: 'kalendus@localhost' to database 'calendar3' prompt> cd cgi-bin/calendar/ prompt> ./month.pl [Thu Dec 5 20:48:23 2002] DBI->connect(database=calendar3;host=localhost) failed: Access denied for user: 'kalendus@localhost' to database 'calendar3' at Kalendus.pm line 83 ... [Thu Dec 5 20:50:37 2002] Can't connect to MySQL database: Access denied for user: 'kalendus@localhost' to database 'calendar3'
The scripts do not have execute bits set.
prompt> ls -l month.pl -rwxr-xr-x 1 mgates www 6.6k Nov 25 23:21 month.pl
The permissions are typically as shown above, -rwxr-xr-x. The last three letters in particular must be r-x. Use 'chmod 755 month.pl' to fix it if necesary.
Perl is not installed at /usr/bin/perl. Locate where perl is installed.
prompt> which perl /usr/bin/perl
The #! (shee-bang) line at the top of each .pl file must match that location.
The listed Perl module has not been installed. Ask your system admin to install it. See the Perl setup.
The hostname in cgi-bin/calendar/KalendusConfig.pm does not exist in the DNS. See the MySQL setup. Try logging in with the mysql command line client:
prompt> mysql -h mysql.example.com -u kalendus -p calendar Enter password: ****
(MySQL host is not localhost.) The MySQL server is not running, or is not listening on the network port. Check with your system admin, or look in the MySQL documentation. See above.
(MySQL host is localhost.) The MySQL server is not running, or is not listening on the network port. Check with your system admin, or look in the MySQL documentation. See above.
The username and/or password in cgi-bin/calendar/KalendusConfig.pm is not correct. See above.
It successfully logged into the MySQL server, but the username does not have select priveleges to the 'calendar' database. See above.
It successfully logged into the MySQL server, but the database didn't exist. Either the database name in cgi-bin/calendar/KalendusConfig.pm is not correct, or the database was not created. See above.
Probably the mysql tables were not created. See the MySQL setup.
Probably the mysql tables were not populated with data. See the MySQL setup.
Either the static HTML files were not installed, or their location in cgi-bin/calendar/KalendusConfig.pm is not correct. If you load the page in a web browser and view the HTML source, you can see where it expects the files to reside:
<link rel="StyleSheet" type="text/css" href="/calendar/style.css" />
See the Apache setup.
Apache has not been setup to secure the cgi-bin/calendar/auth/ directory. Ask your system admin. If you are the system admin, consult the Apache documentation, especially the security tutorials. See the Apache setup.
Apache has not been setup to secure the cgi-bin/calendar/ directory. See above.