Infinity Hosting – Scripts

Domain Hosting and Scripts

What scripts are available for my Domain Web hosting plan?

CGI FAQs

  1. What is CGI?
    CGI stands for Common Gateway Interface. CGI programs are run on the web server to enhance the abilities of web pages, thus making them less static. Example CGI programs are counters, email forms, and shopping cart programs.
  2. How do I get to CGI access?
    Your cgi access has already been activated when your account was set up.
  3. How do I go about using my CGI scripts?
    To use start using your cgi access, put your scripts in your /cgi-bin directory located in your home directory. You may also use sub directories that branch off of your cgi-bin directory if you need.

      • To call your script from a browser or an html page, use the following syntax:
        http://www.yourname.com/cgi-bin/scriptname.cgi
    • To call your script SECURELY from a browser or an html page:
      http://secure.iinet.com/yourname.com/cgi-bin/scriptname.cgi
  4. What language do my CGI scripts need to be in?
    Our server currently supports scripts written for Perl 5.8.3.
  5. Does Infinity Internet provide any CGI scripts?
    Yes! FormMail and Counter scripts are available.

    1. Click My Account and login
    2. Under Domain Tools, choose “Add FormMail” or “Add a Counter” for your domain
  6. Where can I find more CGI programs to use on my site?
    The CGI RESOURCE INDEX has over 1500 cgi resources.

    NOTE: Infinity Internet does not provide any technical support for scripting

  7. What is the difference between CGI and JAVA?
    CGI is a scripting language that is run locally on the server and uses the servers resources to run your program. Java is a programming language that runs on almost any platform. Java is either embedded as a script in the web page itself or it is a compiled program that is downloaded and run locally on the users computer.
  8. Why am I getting a “Premature end of Script Header” or other errors?
    The major error you will see when calling your script will be the infamous “Premature end of script Headers” error. To fix this, check the following:

    – Make sure that you are calling Perl correctly (#!/usr/local/bin/perl) for our servers. Many times scripts you might optain through an online depository might call Perl with a (!#/usr/bin/perl). You will find this line usually at the very top of your script.

    – Be sure that you uploaded your cgi script(s) in ASCII mode, NOT binary. CGI scripts are text files that need to be uploaded in ASCII format.

  9. My script is asking for a baseurl or basdir; what are they?
    Many scripts need to know the working directory, (the directory that your script executes in) or the URL of your script.

    BASEDIR

    On Infinity Internet, your base directory is /home/username/public_html/cgi-bin

  10. http://www.yourname.com/cgi-bin/scriptname.cgi
  11. My script needs to know where sendmail is?
    Sendmail is located at /usr/lib/sendmail

PHP FAQs

  1. What is PHP?
    Short for PHP: Hypertext Preprocessor, an open source, server-side, HTML embedded scripting language used to create dynamic Web pages.

    In an HTML document, PHP script (similar syntax to that of Perl or C ) is enclosed within special PHP tags. Because PHP is embedded within tags, you can jump between HTML and PHP (similar to ASP and Cold Fusion) instead of having to rely on heavy amounts of code to output HTML. And, because PHP is executed on the server, the client cannot view the PHP code.

    PHP can perform any task that any CGI program can do, but its strength lies in its compatibility with many types of databases. Also, PHP can talk across networks using IMAP, SNMP, NNTP, POP3, or HTTP.

  2. How do I go about using my PHP scripts?
    PHP scripts can reside anywhere in your home directory and should not be placed in your /cgi-bin directory To call your script from a browser or an html page, use the following syntax:

    • http://www.yourname.com/script.php
  3. Where can I find PHP tutorials and scripts?