PDA

View Full Version : perl script and its extension



biliards
05-10-2008, 05:17 PM
Hi all,
I'm newbie. I would use my perl script (in reality my perl script is a system with ten perl script that they are called from more web pages). It run in /cgi-bin and /scgi-bin.
In hostmonster, my perl script run only .pl extension and if I rename my perl script from 'myscript.pl' to 'myscript' then it does not run.
Why do my script run only .pl extension?
Is there mode to do run my script without extension?
regards,
biliards

r2b2
05-11-2008, 03:49 PM
Probably because Apache is set to recognise .pl files as Perl scripts.

Why not just call your file myscript.pl - using file extensions is always useful anyhow for recognising what type of file something is...

biliards
05-12-2008, 12:18 AM
thanks, now I test how to modify apache conf..

Why not just call your file myscript.pl
it is simple: they are not my package..:D

biliards
05-12-2008, 08:57 AM
I'm sorry but from my cpanel I find only Apache Handler.
In this page I do not know how to configure that files without extension are perl script.
Can you help me?

linFox
05-12-2008, 09:40 PM
You can use the ForceType directive to force any file to be served as a certain content type.

If you want every file in a certain directory to be served as perl files, in a file called .htaccess in that folder, add the line:
ForceType application/perl

For specific files, use a filter, eg:
<Files filenameorpattern>
ForceType application/perl
</Files>

biliards
05-13-2008, 12:42 AM
thanks linfox for your replay.
I resolve with .htaccess in that folder adding 'ForceType application/perl'
regards,
biliards