May 18th 2012
RT @Snetty: no apology from @Insight_UK either, their customer service is a joke, spend your money elsewhere is my recommendation

May 18th 2012
RT @Snetty: cancelled order with @Insight_UK 2 weeks after being paid in full they demand a letterhead and haven't even ordered from sup ...

May 18th 2012
RT @alanogden: going to introduce @madnexus to proper fish and chips for #fridaylunch @3dpixelnet @snetty

May 14th 2012
all servers are now upgraded to 1Gbit connections.

You are here: Home » FAQ » Perl & CGI Scripts

Perl & CGI Scripts

Useful Information

3DPixelNet path to Perl:

#!/usr/bin/perl

Perl & CGI scripts are simply alternative scripting methods to the more common PHP language, especially for home users.

Certain types of scripts are usually Perl or CGI; guestbooks, mailing list managers, some galleries and forums are common examples.

Unlike PHP, Perl/CGI scripts run from within a specific directory in the FTP structure.
Whereas PHP files (any any other files) are located in httpdocs, Perl/CGI files must be sited in the CGI-BIN directory. Perl/CGI scripts run inside httpdocs will not work.

Perl/CGI scripts usually contain instructions regarding exactly how to install the script. These must be followed precisely especially in regards to permissions.

Q: My Scripts Return An Internal Error (500) and will not run!

Perl/CGI scripts that fail will most likely return:

***Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.***

1. Firstly, take note in the installation instructions in your script whether you have uploaded the file correctly, in ASCII or BINARY formats. Binary formats are usually reserved for pictures, folders. ASCII format is reserved for text files (i.e. the actual Perl/CGI files themselves).

2. Ensure that the CHMOD Permissions are correct on files and folders to do with the script. Details of which will be found in your script instructions.

3. 3DPixelNet servers run a security measure called SUEXEC (SU_EXEC). It's an additional measure built into webservers in order to protect the server and your files. It runs additional permission checks against the scripts in the CGI-BIN before it will allow them to run. SUEXEC will prevent a script running if the folder within which it is contained, or is dealing with is CHMOD777. (Read Write Execute, Owner Public Group). Folders must be chmodded to 755 so that no writing into that folder can be done by anyone but the owner of the script. Directories specific to pictures, uploaded files that require write permissions will have to be chmodded 666.

4. If the script has a syntax error, generate a more useful error message by adding a -w to the initial perl path in the script. i.e.

#!/usr/bin/perl -w



Tell Someone About This Page