PDA

View Full Version : cgi and perl


Premium Hamatachi redded
29 May 2003, 02:54 PM
does anyone know why .cgi extension doesn't work on some server while .pl works? what's the difference between them? on my pc .cgi works but .pl doesn't work. why? is it because my pc is windows and the server is unix?

HiJazzey
29 May 2003, 03:30 PM
Hamatachi,

I've never used perl scripts in Windows, so I don't know how it works there for sure. I would imagine the perl interpreter would have the extensions associated with it (like .doc is associated with word), so when a file with the extension is executed it is passed on to the interpreter. But like I said, I don't know for sure.

As far as Unix is concerned, the extension doesn't matter. As long as the file permissions enable execution and the interpreter's path on the first line of the code is correct, it should run. You could call the file "premium.hamatachi" and it would still work.

The extension only matters to the web server, and then only depending on how it is set up. PM me if you need any specific help.

Premium Hamatachi redded
29 May 2003, 06:17 PM
i contacted my server twice already. they said .cgi works and told me the path but it never works.. i will ask them again. .pl is working fine so it's actually o.k. but i just want everything to work perfectly.

Iranian-Striker
29 May 2003, 07:45 PM
Moved.