Please help newbie who is very frustrated - CGI and PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Rocknclothing
Forum Newbie
Posts: 3
Joined: Wed Jul 27, 2005 3:30 pm

Please help newbie who is very frustrated - CGI and PHP

Post by Rocknclothing »

I've been trying to install Leadhound lite affiliate software and first ran into a major problem. My hosting provider couldn't grant me shell access to run a CGI code. So finally, after much argument, they agree to run the code http://www.rocknclothing.com/cgi-bin/ge ... c_pages.pl.

and then he emails me back and says he is getting the following error: "I am running into this error when running that command for you:

: bad interpreter: No such file or directory."

The hosting providor said they found the CGI file before they ran the script, does anyone have any ideas why he's getting that error then?

Thanks,
Adam
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

My guess is the shebang is wrong... The first line in a script can indicate which interpreter should be used to execute it...

Code: Select all

#!/usr/bin/perl
Offcourse with "which perl" you can discover where the real path is ;)

Meaby that the following works too:

Code: Select all

#!/usr/bin/env perl
Post Reply