CISE Help & Resources

suexec

When to use suexec

The suexec method has is a bit harder to debug, but it is more flexible.

If the CGI script is not going to be run from a users' home directory (i.e. it is in class or research space), or if the script will not be placed in a cgi-bin directory, the cgiwrap will not work and the suexec method must be used.

How to use suexec

  1. A CGI script may be anywhere in public_html hierarchy. Every script must named something that ends in .cgi, and the permissions on every script must be 755.
  2. The URL to run a script is simply the path to the script. For example, if the file public_html/adir/ascript.cgi is a CGI script, the URL to run it would be:
    http://www-pub.cise.ufl.edu/~foo/adir/ascript.cgi
    
    where foo is your username.
  3. CGI scripts must emit the appropriate header(s). One of the most common bugs is to forget the Content-type: text/html header (or whatever type is appropriate). Scripts that do not sent this header will cause an Internal Server Error, as the server has no idea what it's to send. Also, remember a blank line after your headers. Better yet, use the CGI perl module, which takes care of most of this for you.
  4. Once you're sure your script is secure, and that it isn't going to leave around CPU-eating children, you can refer to it directly through www.cise.ufl.edu rather than www-pub.cise.ufl.edu. Keep in mind that you have no direct shell access to www.cise.ufl.edu, so you may wish to keep it on www-pub permanently.

Info for Students

Info for Faculty & Staff

Industrial Advisory Board