AboutHostingCustomersSupportAdmin ToolsContact Us

Zymurgy Support: Using CGI Scripts

Support: Using CGI Scripts


Not currently customized

CGI, PHP and SSI

CGI is the most common way to make your web page do things like show a hit counter, or process a form. The FrontPage extensions run as a CGI, and if you are using FrontPage you may find that it can already do what you're looking for. Other alternatives to CGI include PHP and SSI. PHP is a scripting language that lets you embed programs into web pages. It is much faster than CGI, and relatively easy to learn. You can find more information on PHP from www.php.net. SSI (Server Side Includes) is great for doing things like showing todays date, and setting up headers and footers for your web pages. You can learn all about SSI here.

Installing your own CGI

To install a CGI onto your web site, just name the file either .cgi or .pl. The .pl extension is generally used for perl scripts. Then use your ftp client to enable the execute bit on the file's permissions, and make sure the group write permission bit is turned off. You may find the error logs found on the logs page helpful in debugging problems with your scripts. Keep in mind that when your browser says "Internal Server Error", it is usually the CGI itself that is generating the error.

The Windows command line ftp client uses the following syntax to set the correct permissions:
literal site chmod 755 myscript.cgi

Using CGI's Provided by Zymurgy

To create a hit counter for your site, simply visit our counter builder and tell it how you want your counter to work. It will supply HTML that you can cut and paste into your site.

To have the contents of a form emailed to you, simply set the form's action to http://www.zymurgy.ca/webtools/mailform.php and include the following hidden input fields:

<input type=hidden name=recipient value="userid@mydomain.com"> (Use the email address you want the form contents sent to. This address must be hosted by Zymurgy. Use a forwarder to send messages to other addresses.)
<input type=hidden name=from value="userid@mydomain.com"> (Who should this mail come from? Could be the same as recipient.)
<input type=hidden name=subject value="Form Email"> (Subject for email from this form)
<input type=hidden name=redirect value="http://www.mydomain.com/thanks.html"> (Where should we send people after they fill out the form?)

The HTML source for a simple form might look like this:

<form action="http://www.zymurgy.ca/webtools/mailform.php" method=post>
<input type=hidden name=recipient value="userid@mydomain.com">
<input type=hidden name=from value="userid@mydomain.com">
<input type=hidden name=subject value="Form Email">
<input type=hidden name=redirect value="http://www.mydomain.com/thanks.html">
Enter some text: <input type=text name=sometext>
<p>
<input type=submit>
</form>

 
Home | About | Hosting | Customers | Support | Admin Tools | Contact Us
© Copyright 2003. Zymurgy Systems Inc and its licensors. All rights reserved.