
Services Navigation

Example 4 - Sample Form

Steps to Run Scripts from UTS

  1. If you haven't already created a public_html directory in your logon directory, do so now. To create it, type:
    mkdir $HOME/public_html

  2. Within your public_html directory, create a cgi-bin directory. To do so, type:
    mkdir $HOME/public_html/cgi-bin

  3. Be sure to put all your PHP scripts in the cgi-bin directory
  4. The first line of the script must contain the following:
  5. Use the appropriate URL to execute a script:

    Where username is your user name and scriptname is the name of the script.


  1. You must own the script. To see the owner's user name, type:
    ls -l $HOME/public_html/cgi-bin/scriptname

  2. Your default group must own the file. To see a list of the groups you are a member of, type:

    Your default group should be the first one listed. To see the group ownership of the file, type:

    ls -lg $HOME/public_html/cgi-bin/scriptname

  3. The script must be executable. To make the program executable, type:
    chmod 755 $HOME/public_html/cgi-bin/scriptname

  4. Scripts must be located in your $HOME/public_html/cgi-bin directory.

  5. The file permissions may NOT have the setuid or setgid bits set.

  6. Scripts have a resource LIMIT of 10 CPU seconds.


This method is recommended for PHP scripts the need to save data to the local file system. This includes creating, modifying, and or deleting files and directories. By using this approach. The files you create have the appropriate user id. If you have questions about this approach, please make an appointment with a Teamweb consultant.



  Updated 2006 February 12
  Comments to