SSI CGI Notes on Apollo
Home, Home on the Range Back to Tech Page
Control Panel - or direct links here.
My Favorites
MailCentral
WebMail
Mail Tool Settings
MySQL Database
My Installs (SimpleScripts)
Account Renewal
contact Us
Domain
DomainCentral
Register Domain
Registrar Transfer
Website
FTP
FileManager
Free 1 GB Cloud Storage
MOJO Marketplace
My Installs (SimpleScripts)
MySQL Database
ShopSite Starter
SimpleScripts
Visitor Statistics
WebSite Creator by CM4all
Weebly Drag and Drop Builder
WordPress
goMobi Site Builder
Email
MailCentral
WebMail
Change Catch-All
Mail Tool Settings
Manage Spam Filter
Marketing Services
Bing Ad Credits
Constant Contact
EmailBrain
Facebook Ad Credit
Free Toll-Free Phone Number
Free YP.com Listing
Google AdWords
TextToGo
Additional Tools
.htaccess Editor
Archive Gateway
CGI and Scripted Language Support
Disk Usage
FrontPage Extensions
Secure Server
Server Information
Web Cache Control Tool
Account Information
Account Renewal
BillingCentral
Change Account Info
Change Email Addresses
Change Password
Manage Subscriptions
Resend Account Info
Set Security Question
Site Profile
Update Billing Info

Tutorials [Main]

Common Tutorials
Configuring Outlook 2003 as your email client
Uploading files using File Manager
Transfer your domain to our registrar
Creating a mailbox

Knowledgebase Beta
Domain Registration and Services
Getting Started
Account Management
Building your Website
Email Management
Email: Microsoft Exchange
E-Commerce Services
Marketing & Promoting Your Site
Referral Programs
Reseller Programs
Scripting
Site Add Ons
VPS - Virtual Private Server
Website Content Management

How do I change my account password?
What are the FTP settings?
How do I configure Outlook?
How do I update my billing information?
What are your nameservers?
Support Tutorials 1
User Guides Index[Below]
Understanding Web Hosting
Managing Your Domain Name
Configuring Your Email
Designing Your Website
Selling Online
Managing Your Account
Finding Help Onsite

Domain Registration and Services
Adding Domains
Domain Redirect
Managing Domains
Nameserver Changes
Registrar Transfer
Renewal

E-Commerce Services
osCommerce

Email Services: Email Management
Mailboxes
Spam

Email Services: Microsoft Exchange
Exchange Mailboxes
Outlook

Email Services: Standard Mail
Email Client
Support Tutorials 2
Marketing Services: Site Creation
Drag and Drop Site Builder

Scripting
.htaccess
phpMyAdmin

VPS - Virtual Private Server
About VPS
ControlPanel
Database Management
Domains
E-Commerce
Files and Directories
Mail
SSH
Site Creation
Stats and Logs
VPS Resource Management

Web Site Management
Control Panel
FTP
FileManager Beta
IIS Administration Console
Joomla
WordPress

TOS
Support Tutorials 3
Account Management
Using Support

Site Add Ons
phpBB

Other Helpful coding and scripting sites
General CGI Sites
CGI Programming 101
How to Use Your CGI-BIN
Perl:
About Perl
Intro to Perl
The Perl You Need to Know
Perl Tutororial for Beginners
Python:
About Python
Python for Non-programmers
Python Tutorial
General Server Side Includes sites
Big Nose Bird's Server Side Includes Page
Apache Week
Wdvl.com
CGI Programming: Chapter 5 Server Side Includes

Information -List of tools for creating RSS files
Scripting

CGI/Perl ( 4 )
Location for uploading files and scripts, and basic tips
Perl modules installed on the Windows platform
Installed Perl modules on the UNIX platform
Using CGI

PHP/Python ( 5 )
PHP Scripting: Zend Optimizer and IonCube
Using PHP
Available PEAR packages
Available PEAR packages
ImageMagick definition and version

Windows Scripting Tools ( 3 )
ASP/.NET
Using CDOs
Using SSI (Server Side Includes)

MS Access ( 2 )
Connecting to a MS Access database
Using ADOs to connect to MS Access DB

MS SQL ( 4 )
Using MS SQL
Working with MS SQL Databases
Connecting to your MS SQL database
Using myLittleAdmin

MySQL ( 15 )
Importing MySQL tables using phpMyAdmin
Searching MySQL tables in phpMyAdmin
Modifying fields in MySQL database tables with phpMyAdmin
Inserting fields into MySQL database tables with phpMyAdmin
Deleting fields from MySQL database tables with phpMyAdmin
Exporting MySQL tables and databases with phpMyAdmin
Working with MySQL databases
Learning about MySQL databases and phpMyAdmin
Creating MySQL tables in phpMyAdmin
Renaming tables in a MySQL database with phpMyAdmin
Using MySQL
Deleting tables from a MySQL database with phpMyAdmin
Using phpMyAdmin
Querying MySQL databases using phpMyAdmin
Managing users in your MySQL database

Website Forms ( 3 )
Using phpFormGenerator
Form Email
Sendmail
Wiki :
Apache HTTP Server
Apache Software Foundation
Apache Incubator
Apache Attic
List of Apache modules
Free Software Foundation
Open Software Foundation
ApacheBench
Comparison of web server software
.htaccess
.htpasswd
IBM HTTP Server
Internet Cache Protocol
LAMP (software bundle)
List of Apache modules
List of Apache–MySQL–PHP packages
POSSE project
Reverse proxy
suEXEC
WAMP (software bundle)
Web accelerator
XAMPP
Proxy server
Embedded HTTP server
Comparison of application servers
Gunicorn (HTTP server)
Authorization
authentication
A .htaccess file is often used to specify security restrictions for a directory, hence the filename "access". The .htaccess file is often accompanied by a .htpasswd file which stores valid usernames and their passwords.
Rewriting URLs
Servers often use .htaccess to rewrite long URLs to shorter-more memorable ones.
Blocking - Use allow/deny to block users by IP address or domain
SSI
Enable server-side includes.
Directory listing
Control how the server will react when no specific web page is specified.
Customized error responses
Changing page shown when server-side error occurs, HTTP 404 Not Found or, to indicate to a search engine that a page has moved, HTTP 301 Moved Permanently.
MIME types
Instruct the server how to treat different varying file types.
Cache Control
.htaccess files allow server control caching by browsers & proxies to reduce bandwidth usage, server load, perceived lag.

Configuration file
Rewrite engine
IBM WebSphere Application Server
Proxies
Web proxies that support ICP include:
CACHEbox
Cisco [CacheEngine - Content Engine]
DeleGate
Harvest project
Traffic Server
Mirror Image - no page
MOWS
NetCache
Netscape Proxy Server
Novell [BorderManager FastCache]
ProxySG
Squid
SkyCache
HTCP
, designed as a successor to ICP, attempts to handle various problems found in ICP deployments.
Operating system
Comparison of operating systems
Linux Documentation Project
Virtual private server
Emulator
Unix shell
Form (HTML)
MySQL
Microsoft SQL Server
Microsoft Access
Python_(programming_language)
CPython
CMU Common Lisp
PERQ
PHP
Server-side scripting
Perl
CGI
Forms in HTML documents, the W3C's spec page for forms in HTML 4.

SSI & CGI

Server Side Includes or SSIs are commands or directives placed in an HTML file through the use of a comment line. You can update an entire site design, dynamically add the current time and date or the date a file was last modified, with a simple SSI command.

CGI, short for Common Gateway Interface, is a standard for allowing programs (scripts) to run on a Web server. It allows you to make your Web site more dynamic and interactive. CGI is not a programming language, but rather a standard that allows scripts to be written by other languages to run over the Internet. The CGI script receives the information from a Web form or a Web page, processes and formats that information and it results in a dynamic html file.

ApolloHosting allows you to write CGI scripts using Perl and Python .
How CGI & SSI work on ApolloHosting.
Check Error Logs - View the error logs generated by the scripts on your site.
Resend Settings E-mail Have the welcome e-mail resent to your primary e-mail address.
About SSI & CGI at ApolloHosting
ApolloHosting's PowerPack allows you to utilize both CGI and Server Side Includes. To ensure that your Perl scripts work smoothly, please refer to the following information before you get started:
Path to your Web directory:
/home/users/web/b1954/apo.sela1969
This is important, as most of your scripts will need to specify this location. For example, this is required if uploading files was a function that you'd like your script to do.
Recommended path: http://yourcompanyname.com/cgi-bin/yourscript.cgi
If you do not have a domain name, point to: http://yourusername.apollohosting.com/cgi-bin/yourscript.cgi
CGI Languages supported: Perl and Python
Required Server Side Includes filename extensions: .shtml
Required CGI extensions: .pl or .cgi for Perl scripts and .py for Python scripts
These are the extensions that your files must have or they will not work. For example, they would be yourscript.cgi or yourscript.pl
Using CGI
This article explains what CGI is, shows how to reach some common scripting tools, warns about some script restrictions, and guides through most common troubleshooting issues.
Make a selection to browse categories
Definitions
What is CGI
CGI stands for Common Gateway Interface. ApolloHosting lets you run CGI scripts written in a scripting language such as Perl, PHP, and shell scripts.
CGI allows you to add interactive and dynamic content to your Web page. You can have your own WWWBoard to let your users interact, run your own website poll or keep track of your visitors.

Java Servlets - definition and support
Java Servlets are like CGI scripts except that they are programmed in Java. Currently, ApolloHosting does not support Java Servlets.

CGI - Enhanced Script Library scripts The Enhanced Script Library contains a click-through counter tool and a Form Email script. Click here to see all available scripts.

Available file extensions for scripts
Perl scripts must have a .pl or .cgi extension.
PHP scripts can have the following extensions: .php, .phtml, .php3, .php4., and/or .php5
Python scripts must have a .py extension.
SSI files must have a .shtml or .shtm extension.
The path to Perl (UNIX platform only)

The path to Perl is: /usr/local/bin/perl

Note that ApolloHosting's CGI servers automatically direct your scripts to this path. You do not need to change the "#!" line at the top of your scripts.
How To
Host RSS files

Since RSS is a file format and not a scripted language, you can publish RSS files in your web directory directly. To automatically generate an RSS file based on your website's content, you can use a server-side script (CGI, PHP, Perl, or ASP) or the RSS file can be generated by a client application running on your local PC, or it can be generated by hand.
Information -List of tools for creating RSS files

Read Your CGI Error Log
When reading a CGI error log, the first thing to remember is that errors are appended to the end of the error log. You'll need to scroll down to the bottom of the log to see the latest entry.

NOTE: Error log entries are limited to approximately 500 characters. This limit is rarely hit, but if you find that one of your longer errors appears to be truncated, this may be the reason.

When your CGI application records an error in your log, there are a few pieces of information that are recorded along with it. Following is an example that has been broken down into further detail:

Sample error:

20120622T165202: apollohosting.com/file.php Parse error: syntax error, unexpected $end in /path/to/file.php on line 33

The first part of the log entry is the date and time that the error occurred (always shown in Eastern Time):
20120622T165202 = June 22, 2012 at 4:52:02 PM
Year: 2012
Month: 06
Day: 22
Time: 16:52:02 PM

The second part of the log entry is the URL to the file that generated the error:

apollohosting.com/file.php

The final part of the entry is the error itself:

Parse error: syntax error, unexpected $end in /path/to/file.php on line 33

If you're not sure what a particular error means, there's a good chance that you'll be able to find some more information about it by using a search engine such as Google or Bing, but you may need to remove the information that's specific to your site (such as your domain or the server path) to find useful results. Troubleshooting
Troubleshooting

My script worked fine yesterday, but now it says it can't find the path to my files. What happened?

As part of our ongoing system maintenance, we sometimes add new devices to help improve the performance of customer websites. As a result of the new hardware, customer CGI scripts (Perl, PHP) and databases that use "real" directory paths may cease to work.

If you are using real directory paths (paths that start with "/hermes/webxx/"), you need to replace them with the correct symbolic paths ("/home/users/web/"), which are fully compatible with our shared hosting architecture.

If you have any questions or need assistance updating your paths, please contact us, and we will assist you Why is my script returning a Server 500 error?

Explore the following possibilities to troubleshoot:


Does your account include CGI accessibility?
Did you call your script with the correct url?
Did you upload it to the correct directory?
Does your script expect values? If so, did you use the right method (POST/GET)?
If you edited path variables in the script, are they correct?
Are you sure you uploaded the script in ASCII mode? If not, you will have to upload them in ASCII mode to make them work.
It's possible that the .htaccess coding (if coded improperly) could be causing the 500 error.
Restrictions
Script restrictions
All scripts have the following run time and language support limitations:

Run time: All PHP/CGI/Perl scripts are limited to a 60 seconds run time. If your script does not complete during that time, it will be killed. ApolloHosting cannot allow custom scripts to impact the performance of other customer sites on our shared hosting platform.

Language support: ApolloHosting supports almost any Perl, PHP, or shell scripts. You cannot run CGI scripts written in C++, Visual Basic or some other language. For liability and cost reasons, ApolloHosting cannot help you write or troubleshoot your CGI scripts. If you need further help, we recommend that you contact a qualified developer/programmer for assistance.

Language support restrictions


ApolloHosting does not provide support for custom code or custom scripts. We assume that if a customer wants to use Perl, CGI, PHP, Python, ASP or any other scripting language, he/she has the necessary programming skills to manage these scripts. The tools we provide are meant only for advanced users and for users who are knowledgeable enough to manage their scripts using those tools.

If you have limited experience or knowledge about server-side scripting and troubleshooting custom code, we strongly recommend that you look into hiring a web developer to assist you. As your host, we are only responsible for hosting your files on our platform and providing the proper hosting environment (See our Terms of Service here).

There are, however, several exceptions in which we will consider troubleshooting your custom code/scripts. If your issues resulted from any of the following, we will do our best to assist you:

Platform Migration - In cases of upgrading or switching platforms. We will troubleshoot scripts which worked on the old platform prior to migration, but do not currently work on the new platform (Only within 2-3 weeks after migration);

FormMail.pl - We can attempt to troubleshoot individual copies of the generic FormMail.pl that is available from open source repositories on the Web. Yet we cannot troubleshoot this script if it has been extensively customized or if it is not the most recent version v1.92. Also, we cannot support other form processor script issues using our mail programs: sendmail and PHPMail. We recommend and will support our form processor script (For more information go to your PowerPack or click here).

ApolloHosting Servers - Scripts which worked for weeks/months and have no modifications done, but suddenly stopped working;

ApolloHosting Scripts – All server-side scripts which we provide as a part of your plan;

Fulfillment - If your plan includes access to CGI and/or other server-side scripting, but no scripts function on your account;