spacer spacer
HOME > support > FAQ > Scripts
side decoration

What is the difference between .pl and .cgi?
How can I see the PHP configuration on the server?
My Perl or CGI doesn't work
How do I set permissions on executable files?
What path do I have to use for my Perl/CGI files?
How do I upload Perl scripts?


What is the difference between .pl and .cgi?

There is no difference. Perl files can be saved with either of these extensions.

How can I see the PHP configuration on the server?

If you would like to know how PHP is configured on your server, follow the steps provided below:

Step 1: Create a file named phpinfo.php with your favorite HTML editor and enter one simple line that looks like the following:

<?phpinfo();?>

Step 2: Save the file and upload to your hosting account's public_html directory.

Step 3: Point your web browser to the file you just uploaded by going to:

http://www.yourdomain.com/phpinfo.php

Upon loading completion of the above page, you should see PHP's internal configuration complete with which modules were compiled in and the options and other parameters available to you.

My Perl or CGI doesn't work

If your script fails to work, please make sure of the following things before you email for support:
  • The path in your perl script is set to #!/usr/bin/perl
  • Your Perl or CGI script file is executable
  • Make sure you have uploaded the files in ASCII mode. If you do not do this, then every line will end with ^M (the DOS end of line character) and the server cannot interpret the script


How do I set permissions on executable files?

Perl scripts need to be executable in order to run them on the server. You can do this using the FTP software you use to upload your files. Upload the files in the usual way, then perform the following on the uploaded file:

In WS_FTP: right click on the file and choose "FTP commands", then "SITE". Type in:
chmod 755 filename.pl
and press OK.

In CuteFTP: right click on the file and choose "Change File Attributes". In the manual section type 755 and press OK.

In Fetch: click on the file; choose "Remote", "Set Permissions"; for Owner tick all three boxes, for Everyone tick Read and Search/Execute; press OK.

In Anarchie: click on the file; choose "FTP", "Send FTP Command"; type in:
site chmod 755 filename.pl
and press OK.

What path do I have to use for my Perl/CGI files?

With Tektonic Hosting, you can put your Perl or CGI files in any directory you want, as long as the files have a .pl or .cgi extension. Remember to make your files executable. If you are using a subdirectory for your CGI files, make the directory executable too.

It is considered good practice to put your scripts in a directory called 'cgi-bin'. You can create such a directory under your 'public-html' directory. This way the 'cgi-bin' sub-directory will reside in your web root directory.

How do I upload Perl scripts?

Perl scripts are uploaded in the same way as any other file you have on your web site: by using FTP software such as WS_ftp or Cute FTP for PC or Fetch or Anarchie for Mac. However, once the files have been uploaded you will need to set them so that they are executable.

Make sure to upload the files in ASCII mode. If you do not do this, the file will be uploaded in ms dos format and every line will end with ^M (the DOS end of line character). The server will not be able to interpret the script, and it will fail.

 
bottom holder
Tektonic Network
Terms of Use | Privacy Policy | Site Map

Home | About Us | Contacts | Services | Login | Support

Tektonic Hosting © 2005. All rights Reserved