![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
MartNet WebMail MartNet WebAdmin Dialup Access Numbers Domain Name Management MartNet News / Status Info NOC / System Status Support Topics: MartNet WebAdmin Dial-up Virtual Hosting Web Site Construction Unix / Linux Internet Chat Game Server Services Misc. Stuff Policies / Legal ![]() FAQ's: MartNet WebAdmin Dial-up Virtual Hosting Game Server Services Misc. FAQ's Links: Privacy and Security Dial-up Web Development Unix / Linux Game Server Services Misc. Support Links ![]() MartNet Policies Billing Dept. ![]() |
Using CGI's at Martnet
A brief primer on where to put scripts. This page covers the following topics:
To use your own CGI's on any MartNet server, you need to use our CGI Wrapper, which means the URL that calls the script must follow Welcome to the Using YOUR custom written CGI's at MartNet Support Page. We have compiled this page specifically for MartNet customers who have Web Hosting accounts with us and are interested in writing their own scripts and programs for use with their Web Site. Failure to follow the guidelines and instructions on this page will result in the inability to run your CGI's. Please read through this page thoroughly before you begin writing your CGI's if possible. The running of (relatively) unrestricted CGI's on Martnet is made possible through the use of a separate CGI known as a wrapper. We have installed a wrapper called, simply enough, CGIWrap. This program is called like a "standard" CGI through a Web Page, and then runs your CGI, in the process it changes ownership of the process and permissions to the owner of the script (usually, CGI's need to be run as root or with other administrative privileges, which makes it possible for buggy programs to take down the system, or for an unscrupulous programmer to compromise the security of the system and wreak havoc...) Basically, the CGI Wrapper keeps your scripts from doing anything you would not normally be able to do from your Shell account. That's why we say you can run (relatively) unrestricted CGI's. Any program or script you write and can run within your Shell account should be accessible via the Web through the CGI Wrapper. The Wrapper software is necessary to protect the overall security and stability of our Servers, and it also provides extra debugging features which will help you get your scripts and programs running with a minimum of frustration usually associated with developing programs for use over the Web. Click Here to go to the official CGIWrap Web Page for additional information, source code, and other technical information on how the wrapper works. All of your CGI scripts must be in the correct directory or they will not be allowed to run. The scripts must be placed in the following directory (or within their own directory inside): your_user_name/public_html/cgi-bin
The cgi-bindirectory should have been created automatically when we first acivated your account. If it was not, or if you have deleted it, you will need to re-create the directory, either with your FTP program, of from the shell type: mkdir ~/public_html/cgi-bin The script must be set to be world readable AND executable in order for it to work properly. (most FTP clients do not let you set file permissions to be executable during upload) To set permissions correctly, type the following command: chmod 755 your_script_name.cgi Running your Scripts through the Wrapper: When referring to a script in your HTML code (or from within another script) you MUST start the script via our CGIWrap program, which in turn will start your script and allow it to run (if there is a problem with the script, CGIWrap will provide some feedback to let you know why the script couldn't run.) To run your script (through the wrappr,) be sure the URL that calls your script is in the following format: a href="/cgi-bin/cgiwrap/your_user_name/YOUR-SCRIPT.cgi"
Using the Wrapper to debug your scripts: CGIWrap also has an advanced debugging mode that is very useful when you are developing your CGI's. To use the debugging mode, change the URL that calls the script to the following: a href="/cgi-bin/cgiwrapd/your_user_name/YOUR-SCRIPT.cgi"
CGI Wrap provides a wealth of informationabout what your script is trying to do / access/ etc. It does not, however, provide as much information as a good set of programming tools. If you can't get your script to run (even using CGIWrap's debug mode) we recommend you try to get the script running from within a shell using all of our available GNU Development Tools. If you don't know what GNU Development tools are, or how to use them, there are many good books, Web Sites, etc. about programming CGI's in perl,C, C++, and many other languages. Just don't get discouraged. Keep in mind that people go to school for years and still have problems debugging their software...
![]() ![]() ![]() ![]() ![]() Home | Services | Support | Members | Software | Contact ![]() |
Copyright 1996 -
2015 MartNet Communications LLC. All Rights Reserved.
![]() |