Leader of the Pack in Miva Merchant Hosting, Zen Cart Hosting, Miva to Zen Cart Conversion and Custom Module Development and Programming    
Miva Hosting Zen Cart Hosting Dedicated Servers Non-eCom Hosting Reseller Program Modules Other Services  
Control Panel Support About Us Legal Notices


 
• Support Center - CGIWRAP •
• Safely Executing CGI programs from your CGI-BIN directory •

General Information

Cgiwrap is a gateway program that will allow you to run cgi scripts from your own cgi-bin directory. Your scripts are run under the control and protection of cgiwrap so you need not be worried about comprising the security of our web server or damaging files of other users. In addition, cgiwrap allows your cgi programs to run under your username rather than as the web server. This means that you can collect data and create files that are inaccessible by other users.

Setup Instructions

    The following are instructions for setting up your account to be able to use cgiwrap to execute cgi scripts. It is assumed that you are familiar with writing CGI scripts and HTML documents.

    In the following instructions, we'll assume your login name, home directory, CGI directory, script name and domain name are:
    • Login Name: joe
    • Home Directory: /home/joe
    • CGI Directory: /home/joe/www/cgi-bin
    • Name of Script: yourscript.cgi
    • Domain Name: domain.com

    Note: Use the name of the script you want to run instead of "yourscript.cgi".

    If you do not already have a cgi-bin directory set up, create one:

    • cd /home/joe/www
    • mkdir cgi-bin

    Install the script into your cgi-bin directory, and set the proper execution permissions on the file.

    • cp yourscript.cgi /cgi-bin/yourscript.cgi
    • chmod 755 /cgi-bin/yourscript.cgi

    The script is executed using the following URL:

    • /cgi-bin/cgiwrap/joe/yourscript.cgi, or
    • http://www.domain.com/cgi-bin/cgiwrap/joe/yourscript.cgi

    If you wish to see debugging output for your CGI, specify cgiwrapd instead of cgiwrap, as in the following URL:

    • http://www.domain.com/cgi-bin/cgiwrapd/joe/yourscript.cgi

    If the script is an nph- style script, you will need to run it using the following URL's:

    • http://www.domain.com/cgi-bin/nph-cgiwrap/joe/yourscript.cgi
    • http://www.domain.com/cgi-bin/nph-cgiwrapd/joe/yourscript.cgi

Troubleshooting

  • Make sure you've created a directory with the name 'cgi-bin' in your login directory. If your login name is 'joe' then the directory would be '/home/joe/www/cgi-bin'
  • Make sure the permissions for your cgi-bin directory and cgi program are set at 755.
  • If you're using a Perl script the first line of the script must read '#!/usr/bin/perl'. This allows your script to find Perl. (We use Perl 5.8 or better.)
  • If you want to use the sendmail program the correct location is '/usr/sbin/sendmail'.
  • Make sure you're calling your cgi program properly. A sample Form Action command would be <form action="cgi-bin/cgiwrap/joe/yourscript.cgi" method="GET">

 

   

- copyright © 1998-2013 Wolfpaw Hosting LLC., all rights reserved -