لعل الكثير يسال ماذا أضع في ملفات cgi لكى يدعمها هذا الموقع ما الذي يحتاجه لكي يشتغل معي هذا البرنامج لك معلومات تتعلق بهذه الشركة .


Answers
Where is the Perl executable?
The Perl executable can be found in: /usr/bin/perl

The perl version is: 5.005_03



There's no cgi-bin directory?
The Freedom To Surf webservers allow you to place your Perl scripts anywhere on your website. A common place to put them is in a directory called cgi-bin although this is not necessary.



What file extension should my scripts have?
The webserver recognises a Perl script by its file extension. Your Perl scripts should be in a file ending with: .pl or: .cgi



What file permissions should my scripts have?
The file permissions are set automatically by the webserver so manual settings of file permissions should not be needed.

Perl scripts have their file permissions set to 755 or -rwxr-xr-x.

Note, manually chmoding your scripts to make them group or world writable will result in your scripts failing to run properly.



Where is my base directory?
Each website has its own base directory. Where possible always use relative filename mappings. If you *must* use a full path please derive from the DOCUMENT_ROOT environment variable in your script. This will ensure that your website works reliably even if it is moved to a different directory by Freedom To Surf

Here is a sample script which outputs your base directory:

#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "Document Root is: ";
print $ENV{'DOCUMENT_ROOT'};





What is the path for sendmail and date?
The path for sendmail is: /usr/sbin/sendmail

The path for date is: /bin/date

Hint: If ever sendmail seems to not send mail, but you don't get an error message, check in your f2s mailbox - bounced messages will often end up there.



My Perl Script isn't working! I keep getting Internal Server Error
There are many reasons why you might get this error. You should check each of the following is okay:

1) Have you uploaded the script in FTP ASCII mode
2) Does your script start with the line: #!/usr/bin/perl?
3) Does the script filename end in .pl or .cgi?
4) Ensure the script is not writable by others.
5) Ensure the directory the script is in is not writable by others.
6) Does the script output the correct content type as the first line output? (eg: print "Content-type: text/html\n\n"
7) Has your base path been set correctly?

If all these checks are okay then there is probably something wrong with the script. Please debug this in your own environment before placing on the Freedom To Surf webserver.



Are Server Side Includes (SSI) supported?
Yes. Your filename should end in .shtml for the SSI engine to take effect.



Where can I get more information about Perl?
A good point of reference is http://www.perl.com

To understand how a Perl script is executed on the Freedom To Surf webservers take a look at the Apache suexec documentation.

Some good places for free Perl scripts are: http://www.cgi-resources.com and http://www.hotscripts.com.