MIT SIPB Script Services for Athena

How do I debug my scripts? keeps per-user error logs on each server to assist with debugging recalcitrant CGI scripts. Here are some ways you can convince your scripts to give you more information:

  • You can view error logs in real time using the ‘logview’ command on a Scripts server. Note that you need to be SSH’ed into the server that is serving your website, and not necessarily server. You can determine what server you are being load-balanced to by checking the bottom of and looking for “You are currently connected to” server.
  • If you have a PHP script that is failing with no error output, you likely have error reporting turned off. Open or create a php.ini file in the same directory as the script, and in it ensure that “display_errors = on” and “error_reporting = E_ALL ^ E_NOTICE”. This will cause errors to be displayed on the web page.
  • If you have some script that you know is writing information to stderr that you want to see, you can often run it directly from the command line via SSH to scripts and see if it outputs anything interesting. Nota bene: the configuration of the command line may be subtly different than that invoked from the web, for example, php from the command line will not load a php.ini file in the directory; you’ll need to manually add it with -c
  • If your FastCGI script is not working and you’re getting error messages like:
    [Fri Oct 29 20:31:04 2010] [notice] mod_fcgid: process
      exit(communication error), terminated by calling exit(), return code: 121
    this probably means your index.fcgi is lacking the executable bit. You can set it using chmod a+x index.fcgi.
© 2004-2013, the SIPB project.
These pages may be reused under either the GFDL 1.2 or CC-BY-SA 3.0.
Questions? Contact

You are currently connected to