Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: David L on February 05, 2001, 01:59:33 AM
-
I am trying to migrate an up and running website over to an e-smith box but I'm running into problems with cgi. For the simplest possible case I created a perl script to spit out the env variables. It works fine. If I try to copy the entire contents of this script over to another with a different filename, I get:
[Sun Feb 4 14:38:16 2001] [error] (2)No such file or directory: exec of /home/e
-smith/files/primary/cgi-bin/calendar/webcal.cgi failed
[Sun Feb 4 14:38:16 2001] [error] [client 192.168.0.43] Premature end of script
headers: /home/e-smith/files/primary/cgi-bin/calendar/webcal.cgi
This is the exact same script that I just ran successfully from the exact same location with the exact same permissions.
I think I'm missing something painfully obvious but I don't know what.
-
David L wrote:
> [...]
> [Sun Feb 4 14:38:16 2001] [error] (2)No such file or
> directory: exec of /home/e
> -smith/files/primary/cgi-bin/calendar/webcal.cgi failed
> [...]
One possible cause (and there are quite a few :-) ) is an incorrect path to
perl in the #! line at the start of the script. Are you calling /usr/bin/perl ?
Gordon
-
Yes, all paths were correct (which perl). Acually got things working by including the -w swith on the shebang line. Know why that is?
btw, great product. I hope you guys do well.
Gordon Rowell wrote:
>
> David L wrote:
> > [...]
> > [Sun Feb 4 14:38:16 2001] [error] (2)No such file or
> > directory: exec of /home/e
> > -smith/files/primary/cgi-bin/calendar/webcal.cgi failed
> > [...]
>
> One possible cause (and there are quite a few :-) ) is an
> incorrect path to
> perl in the #! line at the start of the script. Are you
> calling /usr/bin/perl ?
>
> Gordon
-
David L wrote:
>
> Yes, all paths were correct (which perl). Acually got things
> working by including the -w swith on the shebang line. Know
> why that is?
That doesn't make any sense to me. Adding -w just turns on some warnings - it
should be on (as should "use strict") in all Perl programs, but it is _more_
likely to generate error output, not less.
> btw, great product. I hope you guys do well.
Thanks - keep those registrations rolling in :-)
Gordon
-
Did you migrate the programs from a Windows server machine? Might scripts still be in a DOS format (something to do with end of line characters), and not Unix based? Can someone take this info a step further? I have seen this, but it was so long ago I can't remember what the problem was. I'm a PHP man now! :)
-
Yes that could be part of the problem because originally I did most of the script editing on a windows machine then FTP'd them to a linux box. For the migration, they got FTP'd to a windows box then copied to e-smith using Samba.
Is there a way to ensure Unix text formats when using DOS based text editors to save your work?
Thanks for your input.
MIke Stoddart wrote:
>
> Did you migrate the programs from a Windows server machine?
> Might scripts still be in a DOS format (something to do with
> end of line characters), and not Unix based? Can someone take
> this info a step further? I have seen this, but it was so
> long ago I can't remember what the problem was. I'm a PHP man
> now! :)