Problem getting cgi script to work with apache?
jvian10 at charter.net
Mon Jun 19 19:47:40 UTC 2006
On Mon, 2006-06-19 at 11:49 -0700, Knute Johnson wrote:
> >>Add the following line to the top of your script:
> >Yes I'm sorry I actually had that in the script and took it out to
> >test and didn't put it back before I posted. It doesn't work with it
> Paul, et al:
> I am really screwed up here. It did need the #!/usr/bin/perl but
> that wasn't what was causing my problem. Seems there is some file
> incompatibility with my script file that I downloaded from my BSD
> server. When I copied the file with VIM it got smaller and now works
> just fine. I don't know what the problem is but it works now. I've
> noticed similar problems going the other way, moving files to the BSD
This sounds like the problem with a dos formatted text file vs a *nix
formatted text file. In the dos file each line ends with <CR><LF> and
in the *nix file it ends with <LF> only.
These differences make a big difference in many situations, and as I
recall, HTML and perl are two of those places.
A quick test of that can be done with a simple "dos2unix test.pl" or to
go the other way, "unix2dos test.pl" If the line endings are the
problem this command should fix it (or break it) depending on which way
I do not know how BSD handles files but it may be that it does use the
dos type line end formatting on text files.
> Thanks for the help,
> Knute Johnson
> Molon Labe...
More information about the users