Ultratron FAQ - Frequently Asked Questions

Here are answers to some frequently asked questions. This section is updated frequently, so feel free to check back often for helpful hints and tips. If you have a question which is not answered here, please let us know.

Programming

Back to Unsolicited Commercial Email (UCE or SPAM)
Forward to Security



1. What is a shell account?

A shell account gives you the ability to access a command line on the server to type commands in directly. For the Unix-savvy, this can be helpful for such things as manually running CGI scripts or custom-installing packages. To access your shell account you must use a client program such as Telnet or Secure Shell (highly recommended over Telnet for security reasons).

[ Contents | Top ]



2. How do I enable Server Side Includes in my directory?

Go to the directory in which you will be including SSI scripting and create a file called .htaccess which includes the following:

  Options indexes includes execcgi
  XBitHack on
Then make sure the file is marked as executable using a shell command such as "chmod 755 index.html" or using your FTP client to set the file's mode (file permissions) to 755 (may also look like rwxr-xr-x).

[ Contents | Top ]



3. How do I handle scripts which require the REMOTE_HOST environment variable?

Our webservers do not do reverse DNS lookups for every HTTP request because that would bog down the performance of the servers. If you have a PERL CGI script which requires this variable be set, include the following code snippet which will set it for you:

  use Socket;
  unless ($ENV{REMOTE_HOST} && $ENV{REMOTE_HOST} ne $ENV{REMOTE_ADDR}) {
     my $ipaddr = $ENV{REMOTE_ADDR};
     $ENV{REMOTE_HOST}  = gethostbyaddr(inet_aton($ipaddr), AF_INET);
     $ENV{REMOTE_HOST} = $ENV{REMOTE_ADDR} unless $ENV{REMOTE_HOST};
  }

[ Contents | Top ]



4. How can I troubleshoot a CGI script I am writing?

Probably the best way is to execute it directly from a command shell and see what error(s) are produced. If this is not possible, or if you are not familiar with UNIX, run the script from a browser, and when you see the familiar error page, take a look at the last few lines of your error.log file to see what errors were reported. It's a good idea to take a look at this file periodically anyway, because it may point out error on your website that may be easily overlooked.

[ Contents | Top ]



Any questions? Email support@ultratron.net.