--- Ryan Davis <[EMAIL PROTECTED]> wrote:
> Curtis+List,
>
> I checked out the CGI::Safe.pm module, and so far, I'm having the same
> problem. The script goes to "Just about to get your resume!"; then quits.
> I don't have access to server logs, so I don't know what is going on. I
> think my server is running Apache, and I've been snooping to try and find
> the config files (I got a >find / -name httpd.conf going right now)
>
> Is there anything perlish wrong here? It works on Activestate/Apache/Win98,
> so I think it must be a server thing, but I dunno.
What do you mean by "then quits"? Does it silently fail? Does it hang? Does it
return an error
message?
Wild guess: Recently (like, two days ago), I had a problem with a script that worked
fine on a
Windows box but then mysteriously 'hung' on a Linux box. It was caused by the same
problem that I
had for my recent question about my script dying when I turned off warnings: Windows
and Unix
have different line endings. Since you mentioned that you had successfully run this
on a Win98
box, I'm wondering if this is the problem.
Windows recognizes \12\15 as the end of line characters (\r\n). Unix is looking for a
\15 (\n).
If you have shell access to your server, enter the following:
cat -vet script.cgi | more
This will display the end of line characters as a dollar sign. If you see a ^M before
the dollar
sign, then you know you have DOS line endings. Here's an example:
#!/usr/bin/perl -wT^M$
If you see that ^M, (ctrl-M, a.k.a. ASCII 12, a.k.a. \r), you can eliminate it with
the following
in-place edit:
perl -pi -e 's/\r//g' script.cgi
Just make sure to back up your script, first.
To prevent this in the future, make sure you FTP your scripts to the server in ASCII
mode, not
binary. ASCII mode will fix the line endings for you.
If this doesn't resolve the problem, let us know.
Cheers,
Curtis Poe
=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]