FAQ Wysardry
Frequently Asked Questions

Answers to frequently asked questions about the Spaceports CGI-BIN server.



Home / FAQ / CGI-BIN FAQ

Back | Next

General questions

  1. What features are available on the CGI-BIN server?
  2. What flavour of UNIX does Spaceports use?
  3. What modules are installed for Perl, PHP and MySQL?
  4. What are the limitations of the CGI-BIN server?
  5. How do I use a forum or other large script?

Errors

  1. How do I see Perl script errors?
  2. What does [an error occurred while processing this directive] mean?
  3. I don't have a public_html folder, what do I do?
  4. Why do my Perl scripts send me to the Spaceports page?
  5. I get the message "Can't build data connection: Permission denied" when trying to use FTP , what do I do?
  6. Why don't my links from (some other host) work?
  7. Why doesn't my URL redirection work?

Permissions (CHMOD)

  1. What settings should I use to CHMOD files?
  2. What settings should I use to CHMOD directories?
  3. What is CHMOD?

System Paths

  1. What is the URL for my CGI-BIN account?
  2. What is the absolute path for my CGI-BIN account?
  3. What is the absolute path for my website account?
  4. What is the absolute path for use with SSI?
  5. Where is sendmail?
  6. Where is the system date?
  7. What is the path to Perl?

Perl CGI

  1. What version of Perl does Spaceports use?
  2. Where can I find Perl scripts?
  3. Where can I find Perl tutorials?
  4. Should I use .pl or .cgi for Perl scripts?
  5. Where is my CGI-BIN directory?

PHP

  1. What version of PHP does Spaceports use?
  2. Where can I find PHP scripts?
  3. Where can I find PHP documentation?
  4. Where can I find PHP tutorials?
  5. Should I use .php3 or .php for PHP documents?

MySQL

  1. What is MySQL?
  2. How do I get a MySQL database?
  3. Can I have more than one database?
  4. How much space does it have?
  5. How do I upload data into it?
  6. What settings do I use?
  7. Where can I find out more about MySQL?

SSI

  1. What is SSI?
  2. How do I name documents that use SSI?
  3. Where can I find SSI tutorials?

General questions

Q: What features are available on the CGI-BIN server?

A: Perl CGI, PHP, SSI and MySQL

Back to FAQ


Q: What flavour of UNIX does Spaceports use?

A: FreeBSD

Back to FAQ


Q: What modules are installed for Perl, PHP and MySQL?

A: Inquisitive aren't you?  Fortunately, there are ways to find this out for yourself using a script called Perldiver or the phpinfo function.  See my System Info page for further details.

Back to FAQ


Q: What are the limitations of the CGI-BIN server?

A: You are limited to 10Mb and/or 1000 files (which cannot be upgraded).  You cannot link to any files stored there from a site outside of Spaceports.

All forms of sending mail via the servers has been disabled due to abuse.

Back to FAQ


Q: How do I use a forum or other large script?

A: Choose one that stores the data in a MySQL database.  Place static files (such as images) on the 'planet' servers wherever possible.

Back to FAQ


Errors

Q: How do I see Perl script errors?

A: By inserting the following code in the second line of your scripts any internal errors will be printed to the browser window. Do not put anything before the line defining the path to Perl.

use CGI;
use CGI::Carp qw/fatalsToBrowser/;

For a slightly more complex error trapping routine that uses a log file, see my page here.

Back to FAQ


Q: What does [an error occurred while processing this directive] mean?

A: If you are getting this message on the CGI-BIN server it can mean one of two things:-

  1. You are using an incorrect banner code - the correct code can be found on the CGI-BIN Banner page.  The CGI-BIN and 'planet' servers use different code.
  2. You are using SSI (Server Side Includes) incorrectly. The most likely problem is an incorrect path.

Back to FAQ


Q: I don't have a public_html folder, what do I do?

A: Simply create one in your root directory using your FTP client and set the permissions to 755 (drwxr-xr-x).

Back to FAQ


Q: Why do my Perl scripts send me to the Spaceports page?

A: Unless you have some sort of error trapping in your script, this is where you will be sent by default whenever there is an error.

See my page on CGI script troubleshooting.

Back to FAQ


Q: I get the message "Can't build data connection: Permission denied" when trying to use FTP , what do I do?

A: You must set your FTP client to connect in passive (PASV) mode.

Back to FAQ


Q: Why don't my links from (some other host) work?

A: You cannot link to any files on the CGI-BIN server from a site outside of Spaceports (including Web based email sites and search engines).  There is an anti-leech script and a firewall to prevent it.

This is to prevent bandwidth theft (use of the services by another site without paying for them).  It's actually a good thing for you too, as it prevents other sites using your scripts and taking you over the bandwidth limit.

If you're trying to link from your 'planet' site, then check the URL you are using.  The servers are case sensitive, so myscript.cgi and MyScript.cgi are not the same.

Back to FAQ


Q: Why doesn't my URL redirection work?

A: The server recognises the request as coming from a non-Spaceports domain and refuses it.

Your main site should not be on the CGI-BIN server in any case, so point your redirection service to a suitable page on your 'planet' site and link to your dynamic pages from there.

See the previous question and answer.

Back to FAQ


Permissions (CHMOD)

Q: What settings should I use to CHMOD files?

A: Use the following settings:-

.cgi and .pl files 755 (RWX R-X R-X)
.htm and .html files 777 (RWX RWX RWX)
log and image files 666 (RW- RW- RW)

Note: HTML, log and image files are still accessible at either 777 or 666.

Back to FAQ


Q: What settings should I use to CHMOD directories?

A: Use the following settings:-

Directories containing scripts 755 (RWX R-X R-X)
Directories not containing scripts 777 (RWX RWX RWX)

Note: Directories not containing scripts can also be set to 666, but you may have problems accessing them.

Back to FAQ


Q: What is CHMOD?

A: Every UNIX file and directory has Read, Write and eXecute permissions associated with it which control what can be done with it and by whom.

CHMOD is an abbreviation for CHange MODe. For more information see my page on file permissions.

Back to FAQ


System Paths

Q: What is the URL for my CGI-BIN account?

A: http://cgi-bin.spaceports.com/~username/

Replace 'username' with your username.

Back to FAQ


Q: What is the absolute path for my CGI-BIN account?

A: This depends on when you signed up for your CGI-BIN account:-

Before end July, 2000: /home/username/public_html/

Between end July, 2000 and middle February 2002: /home2/username/public_html/

After middle February 2002: /home3/username/public_html/

Replace 'username' with your username.

Back to FAQ


Q: What is the absolute path for my website account?

A: /home/username/public_html/

Replace 'username' with your username.

Back to FAQ


Q: What is the absolute path for use with SSI?

A: /~username/

Replace 'username' with your username. This is the absolute path to your root directory.

Back to FAQ


Q: Where is sendmail?

A: /usr/sbin/sendmail

However, it was disabled in August 2001 due to abuse.

Back to FAQ


Q: Where is the system date?

A: /bin/date

Back to FAQ


Q: What is the path to Perl?

A: /usr/bin/perl or /usr/local/bin/perl

Back to FAQ


Perl CGI

Q: What version of Perl does Spaceports use?

A: Perl Version: 5.00503

Back to FAQ


Q: Where can I find Perl scripts?

A: Try www.hotscripts.com and cgi.resourceindex.com

Back to FAQ


Q: Where can I find Perl tutorials?

A: If you've advanced beyond the basics covered in the script and CGI sections, try www.perl.org and www.bignosebird.com

Back to FAQ


Q: Should I use .pl or .cgi for Perl scripts?

A: Either extension will work - the server treats both the same way.

Back to FAQ


Q: Where is my CGI-BIN directory?

A: The whole server is a CGI-BIN!  You do not need to create a special directory within it.

You must upload your files within the public_html folder (or a folder within that) for them to be accessible from the Web however.

Back to FAQ


PHP

Q: What version of PHP does Spaceports use?

A: PHP Version: 4.1.2

Back to FAQ


Q: Where can I find PHP scripts?

A: Try www.hotscripts.com and php.resourceindex.com

Back to FAQ


Q: Where can I find PHP documentation?

A: See the PHP Manual.

Back to FAQ


Q: Where can I find PHP tutorials?

A: Try www.php.net and www.phpwizard.net

Back to FAQ


Q: Should I use .php3 or .php for PHP documents?

A: Use the .php file extension.

Back to FAQ


MySQL

Q: What is MySQL?

A: It is a database system designed for use with small to medium sized Web sites.  It is much faster and more efficient than using flat text files to store data.

Back to FAQ


Q: How do I get a MySQL database?

A: Log into your CGI-BIN account from the Spaceports main site and follow the link marked 'MySQL'.  Follow the onscreen prompts.

Back to FAQ


Q: Can I have more than one database?

A: No.  You can create as many tables as you wish inside it however (space allowing).

Back to FAQ


Q: How much space does it have?

A: Your database shares the 10 Mb space allowed on your CGI-BIN account.  It does not count towards the 1000 file limit though.

Back to FAQ


Q: How do I upload data into it?

A: The easiest way is to use a script such as phpMyAdmin or MySQLMan.

See the MySQL section for further details.

Back to FAQ


Q: What settings do I use?

A: Use the following as a guide:-

host:- localhost
database:- username
user:- username
password:- ??????

Replace 'username' with your username.  The password should be the same as for your CGI-BIN account if you didn't receive an email containing the info.

Back to FAQ


Q: Where can I find out more about MySQL?

A: If you've already read the MySQL section, visit www.mysql.com for further information.

Back to FAQ


SSI

Q: What is SSI?

A: SSI is an abbreviation for Server Side Includes.  They are special commands that can be given to a suitable Web server by placing them inside HTML documents.

See the SSI section for details.

Back to FAQ


Q: How do I name documents that use SSI?

A: Use the standard HTML filenaming conventions, but with a .shtml extension.

Back to FAQ


Q: Where can I find SSI tutorials?

A: If you've advanced beyond the basics covered in the SSI section, try www.bignosebird.com/ssi.shtml

Back to FAQ

Site Menu

Bravenet

Section Menu


Copyright © 2000-2003 Wysardry

Most recently updated on 11 May, 2003

Home / FAQ / CGI-BIN FAQ

Back | Next


Please feel free to contact us with any comments or suggestions
Frequently Asked Questions
FAQ Wysardry

This site is hosted by Spaceports