in reply to Using Fcntl in CGI

You win. We haven't been able to guess what the problem is.

Why don't you go look at your error log or even use CGI::Carp qw(fatalsToBrowser) so you can actually see the error message, since that should usually be the first step when debugging a problem, not one of the last.

                - tye

Replies are listed 'Best First'.
Re: Re: Using Fcntl in CGI (20 questions)
by Avox (Sexton) on Apr 08, 2003 at 16:28 UTC
    Thanks for your reply. I'm not trying to be adversarial here. I'm relatively new to Perl and do not know all the debugging methods. But you are correct in that I should have checked the Apache error logs sooner. I apologize for that. Here is the log that is generated. note: I changed the IP's to x's. They are not that way in the log.
    [Tue Apr 08 11:23:34 2003] [error] [client x.x.x.x] Premature end of +script headers: c:/program files/apache group/apache/cgi-bin/process_ +results.cgi [Tue Apr 08 11:23:34 2003] [error] [client x.x.x.x] Can't locate XSLoa +der.pm in @INC at C:\perl5\lib/Fcntl.pm line 61. [Tue Apr 08 11:23:34 2003] [error] [client x.x.x.x] BEGIN failed--comp +ilation aborted at C:\perl5\lib/Fcntl.pm line 61. [Tue Apr 08 11:23:34 2003] [error] [client x.x.x.x] BEGIN failed--comp +ilation aborted at c:\PROGRA~1\APACHE~1\apache\cgi-bin\PROCES~1.CGI l +ine 2.
    I'm not trying to win anything. Just trying to get my work done. I really love perlmonks and respect all of you who frequent this site and make it such a wonderful community and resource. Thanks for all the help. I'm not trying to be a jerk or seem unappreciative.

      Oh, I didn't think you were trying to be adversarial or trying to "win" anything. It was just a (lame) joke in my part.

      So modify your script to report "@INC", $INC{"Fcntl.pm"}, and $INC{"XSLoader.pm"} and run it from the command line and run it from CGI (with the line that breaks it commented out -- it will report blank values for those last two items, that is okay).

      Then you'll know where the working version is loading XSLoader.pm from, which Fcntl.pm it is using (you already know from the above which Fcntl.pm the CGI script is using), and why one finds it and the other doesn't (because "@INC" will be different between the two).

      What to do next depends on what you find.

                      - tye
        AHA! For some reason, there are 2 perl installations on this machine (the other was on a different drive). And I pointed the scripts to the incorrect one. When pointing to the correct one, it loads just fine. Everyone- Thank you for all your help!