cancel
Showing results for 
Search instead for 
Did you mean: 

cgi script and Perl5

jimjim
Dabbler
Posts: 10
Registered: ‎14-11-2009

cgi script and Perl5

Can  anyone  help ?
I  am attemptting to  run a  script,  "batchsetup.cgi" and i  need to  modify  the  first  line  of the script  to represent the path to Perl 5 on the server. The  syntax is  "#!/usr/local/bin/perl".  I have  played around  making  various  changes  to this  line, #!/.../perl --' etc etc but  when  I execute the  script in  a browser,  each  time the server returns,
CCGI encountered an error while attempting to execute this script:
Error Message: Exec format error
Error Number: 8
Permissions are  set at 755 and the  script  resides  in the sub directory  //cgi-bin /la.
Is  it me being stupid and the need to  get  more sleep?
Thanks Cheesy
1 REPLY 1
Gabe
Community Veteran
Posts: 767
Registered: ‎29-10-2008

Re: cgi script and Perl5

Hi jimjim,
The shebang should be #!/usr/bin/perl -w
The permissions should be 700 and, yes, anywhere under cgi-bin will do.
Quote from: jimjim
Is  it me being stupid?

No it isn't.  Smiley
Gabe