in reply to IIS-CGI-DBI Errorless Errors

Are you sure the IIS environment has the DSN correctly defined? That would be my first hypothesis to prove or disprove.

If you're not seeing the "good", then either the connect() is dumping core or else you're going into the if block and hitting the exit. Maybe because there's no \n pm the print statement it's not getting flushed? (But I don't really believe that myself).

Try putting print LOG "1\n" before and after the connect() call to see if you're getting through that successfully.

You might also want to coniser a use CGI::Carp qw/fatalsToBrowser/. Is LOG being opened successfully? You're not testing to see whether it works or not, and since you are appending to the file (without datestamps I might add) you could be looking at stale information.

Good luck :)


print@_{sort keys %_},$/if%_=split//,'= & *a?b:e\f/h^h!j+n,o@o;r$s-t%t#u'

Replies are listed 'Best First'.
Re: IIS-CGI-DBI Errorless Errors
by Reverend Phil (Pilgrim) on Aug 08, 2002 at 04:57 UTC
    The machine (IIS Environment) should have the DSN defined correctly, as the script works as long as it's not called by the 'web user'. Also, the same DSN is accessable via ASP (though I personally haven't done that). Pardon the slackness and uncleanliness of the snippet of code - I knocked it down to the bare essentials really, and I know that the LOG part works because I do print 'Testing..' to the log prior to the connect call, and immediately attempt to print Good or Bad following that call. The log file ends up containing JUST the "Testing.." line, meaning that the code dies specifically on the connect call. I'm going to try error handling as suggested by one of the other posts here tomorrow, and hopefully that will solve things. Thanks for the input =)
    -=rev=-