go ahead... be a heretic | |
PerlMonks |
Re: Perl CGI with SQLite Windows and IISby bliako (Monsignor) |
on Mar 20, 2018 at 11:25 UTC ( [id://1211304]=note: print w/replies, xml ) | Need Help?? |
Irrelevant to the DB issue but may make debugging easier: In your CGI program always print the HTTP headers before you do anything else.
in this way, any print statement (to STDOUT) from you or from a module you are calling will end up in the browser. Failure to print headers results in server response error 500 when anyone prints to STDOUT an innocent debug message. Another helpful thing will be to redirect STDERR to a server-side log file using:
In my experience, one may control own program's print statements but not 3rd party modules'. Poj's suggestion for using use CGI::Carp 'fatalsToBrowser';covers some of the cases I mentioned As per the DB problem in particular: you have to make sure that the DB itself but also the *directory* it resides in are writable by the OWNER-USER OF THE CGI script. Lastly, multiple access to a DB will initiate file-locking making the DB temporarily read-only. I am not acquainted with SQLite but there may be stale lock files somewhere?
In Section
Seekers of Perl Wisdom
|
|