I have been running this program on a win nt server with Omni Httd server (a shareware server) for over a year with no problems.
I need to make the database public, so I uploaded it to our webserver:
www.espcorp.com/dbman/db.cgi
I specified the path to perl and that was the only Mod I made.
I am getting the following error: CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
Bareword found where operator expected at c:\webserver\espcorp.com\www\dbman\db.cgi line 50, near "unless ($db_setup =~ /^[A-Za-z0-9]+$/) { die "Invalid" (Do you need to predeclare unless?)String found where operator expected at c:\webserver\espcorp.com\www\dbman\db.cgi line 51, near "require "" (Might be a runaway multi-line "" string starting on line 50) (Missing semicolon on previous line?)Scalar found where operator expected at c:\webserver\espcorp.com\www\dbman\db.cgi line 51, near "require "$db_setup" (Do you need to predeclare require?)String found where operator expected at c:\webserver\espcorp.com\www\dbman\db.cgi line 52, near "require "" (Might be a runaway multi-line "" string starting on line 51) (Missing semicolon on previous line?)Bareword found where operator expecte
_____________________________
Below is the code around line 50
_____________________________
# If you run into problems, set $db_script_path to the full path
# to your directory.
$db_script_path = "c:\webserver\espcorp.com\www\dbman\";
# Load the form information and set the config file and userid.
local(%in) = &parse_form;
$in{'db'} ? ($db_setup = $in{'db'}) : ($db_setup = 'default');
$in{'uid'} ? ($db_uid = $in{'uid'}): ($db_uid = '');
# Required Librariers
# --------------------------------------------------------
# Make sure we are using perl 5.003, load the config file, and load the auth file.
eval {
unshift (@INC, $db_script_path);
require 5.003; # We need at least Perl 5.003
unless ($db_setup =~ /^[A-Za-z0-9]+$/) { die "Invalid config file name: $db_setup"};
require "$db_setup.cfg"; # Database Definition File
require "auth.pl"; # Authorization Routines
}
if ($@) { &cgierr ("Error loading required libraries.\nCheck that they exist, permissions are set correctly and that they compile.\nReason: $@"); }
# If we are using benchmarking, then we start a timer and stop it around &main. Then we print the difference.
if ($db_benchmark) { $t0 = new Benchmark; }
eval { &main; }; # Trap any fatal errors so the program hopefully
if ($@) { &cgierr("fatal error: $@"); } # never produces that nasty 500 server error page.
# Stop the timer and print.
if ($db_benchmark) { $t1 = new Benchmark; print "<h6>Processing Time: " . timestr(timediff($t1, $t0)) . "</h6>"; }
# Display debugging information if requested.
&cgierr("Debug Information") if ($db_debug);
exit; # There are only two exit calls in the script, here and in in &cgierr.
I am also attaching the complete db.cgi file for review.
Can anyone see what is wrong. I have been working on this for hours with no resolve.
Thanks
Erick
I need to make the database public, so I uploaded it to our webserver:
www.espcorp.com/dbman/db.cgi
I specified the path to perl and that was the only Mod I made.
I am getting the following error: CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
Bareword found where operator expected at c:\webserver\espcorp.com\www\dbman\db.cgi line 50, near "unless ($db_setup =~ /^[A-Za-z0-9]+$/) { die "Invalid" (Do you need to predeclare unless?)String found where operator expected at c:\webserver\espcorp.com\www\dbman\db.cgi line 51, near "require "" (Might be a runaway multi-line "" string starting on line 50) (Missing semicolon on previous line?)Scalar found where operator expected at c:\webserver\espcorp.com\www\dbman\db.cgi line 51, near "require "$db_setup" (Do you need to predeclare require?)String found where operator expected at c:\webserver\espcorp.com\www\dbman\db.cgi line 52, near "require "" (Might be a runaway multi-line "" string starting on line 51) (Missing semicolon on previous line?)Bareword found where operator expecte
_____________________________
Below is the code around line 50
_____________________________
# If you run into problems, set $db_script_path to the full path
# to your directory.
$db_script_path = "c:\webserver\espcorp.com\www\dbman\";
# Load the form information and set the config file and userid.
local(%in) = &parse_form;
$in{'db'} ? ($db_setup = $in{'db'}) : ($db_setup = 'default');
$in{'uid'} ? ($db_uid = $in{'uid'}): ($db_uid = '');
# Required Librariers
# --------------------------------------------------------
# Make sure we are using perl 5.003, load the config file, and load the auth file.
eval {
unshift (@INC, $db_script_path);
require 5.003; # We need at least Perl 5.003
unless ($db_setup =~ /^[A-Za-z0-9]+$/) { die "Invalid config file name: $db_setup"};
require "$db_setup.cfg"; # Database Definition File
require "auth.pl"; # Authorization Routines
}
if ($@) { &cgierr ("Error loading required libraries.\nCheck that they exist, permissions are set correctly and that they compile.\nReason: $@"); }
# If we are using benchmarking, then we start a timer and stop it around &main. Then we print the difference.
if ($db_benchmark) { $t0 = new Benchmark; }
eval { &main; }; # Trap any fatal errors so the program hopefully
if ($@) { &cgierr("fatal error: $@"); } # never produces that nasty 500 server error page.
# Stop the timer and print.
if ($db_benchmark) { $t1 = new Benchmark; print "<h6>Processing Time: " . timestr(timediff($t1, $t0)) . "</h6>"; }
# Display debugging information if requested.
&cgierr("Debug Information") if ($db_debug);
exit; # There are only two exit calls in the script, here and in in &cgierr.
I am also attaching the complete db.cgi file for review.
Can anyone see what is wrong. I have been working on this for hours with no resolve.
Thanks
Erick