-
-

Menu
Home
-
ASCII Character Set
-
Beatles Programmers Album
-
Change UNIX Password
-
Color Tester
-
Free CGI Scripts
-
HTML Tag List
-
Internet Explorer Bug
-
ISO-Latin-1 Character Set
-
Links
-
Managing Shell Utilities
-
Netscapes Bad Rap
-
PDF Maker
-
Please Your I.T. Dept
-
RGB to HEX Converter
-
Server-Side Includes
-
Technical Books
-
UNIX man Pages
-

-
Scott Crevier's Webmaster Resources
Web Scripts
Download/Install Tips

  1. Download filenames that end with ".tar" must be unzipped using the UNIX 'tar' program. The best way to do that is to run the following command:

        tar xvf filename

    Also, if you're going to use this on a Windows machine, recent versions of WinZip are able to unzip a tar file.

  2. All scripts are pre-configured to use perl in the following location:

          /usr/local/bin/perl

    However, some servers have perl installed in some other directory. Another common location is:

          /usr/bin/perl

    If your server has perl in a different directory, just change the first line of the script accordingly.

  3. Many problems are due to a configuration on your web server that won't allow CGI scripts to run. This is usually because the account you have just does not allow you to run your own CGI scripts. A good way to test this is to create and test a very simple CGI script first (before you try to get any of my scripts to run). Create a simple text file named "test.cgi". The contents of that file should be 4 simple lines as follows, depending on what platform you're using:

    Windows:
    #!c:\perl\bin\perl.exe
    print "Content-type: text/plain\n\n";
    print "Hello world!";
    exit(0);

    UNIX:
    #!/usr/local/bin/perl
    print "Content-type: text/plain\n\n";
    print "Hello world!";
    exit(0);

    The first line of the file must refer to the location of Perl as it is installed on your server. The first lines in the above two examples reflect common locations for Perl on the Windows and UNIX platforms. Of course you should adjust those locations to match your specific configuration.

    After you create the file, go to the corresponding URL in your browser. For example, if you have your own custom domain name, and you put the above file in the main directory of your site, then the URL would be:

          www.yourcustomname.com/test.cgi

    Or if your site is on someone else's server, like maybe your ISP's server, then the URL may be something like one of these:

          hometown.yourcustomname.com/yourname/myhomepage/test.cgi
          home.new.rr.com/yourname/test.cgi

    Your browser must show the words "Hello world!" in order to confirm that you can successfully run CGI scripts.

  4. Some problems are due to improper file permissions, especially on UNIX systems. On such systems, you must set the appropriate file permissions for the script to execute properly. My best suggestion for finding out what permission level you should use is to contact your provider. Or if you want to just try something, you could run one of the following commands:

          chmod 705 test.cgi

          chmod 777 test.cgi

    You'll have to have telnet access to your account to run the above commands. Now, I don't recommend using 777 permanently, but it should be okay for troubleshooting purposes.

    If you only have FTP access, check your FTP program documentation for how to set permissions. For example, in WS_FTP Pro, you simply right click on the file name, select "chmod", and check the boxes according to the following example:

    setting UNIX file permissions

  5. Many web servers are configured so that all CGI scripts must be run from under the 'cgi-bin' directory structure. So, if that's the case, make sure you install the script in the right place. For example, you could create a directory called 'calendar' which would make the URL something like this:

          www.yourcustomname.com/cgi-bin/calendar/test.cgi

  6. Another suggestion is to simply read the actual error message you see in your browser, and act accordingly. I'm surprised by how many people ignore error messages. If it tells you there is a permission problem, there probably is. If it tells you that there is a configuration problem, there probably is. If it tells you to contact their webmaster, you probably should (after running the above tests first).

  7. And that leads to my final suggestion. Contact your provider for assistance. After all, any good web host provider will support their customers' efforts to build successful web sites. Perhaps their web site has some troubleshooting tips that will help you setup CGI scripts on your site. Of course I am always willing to assist if there is a true problem with my own scripts, so please contact me if you think that's the case. But 99% of all inquiries I receive are due to a configuration issue (which I cannot control).

 



-
smcNet Copyright © 1997-2024 Scott Crevier
www.webmaster.crevier.org
De Pere, Wisconsin, USA
Powered by Perl