I have a cgi which calls a MySQL database. It runs perfectly on Windows Server 2003 with Apache 1.3. However on Windows Server with Apache 2.2 I get an Internal Server Error as follows:Bad file descriptor; don't know how to spawn child process: E:/Dirctory Name/cgiprogram.pl is not executable; ensure interpreted scripts have "#! first line.
Here's the beginning of the code:
#!C:/Perl/bin/perl -w use DBI; use CGI ':standard'; print "Content-type: text/html\n\n"; # constants my $dbh = DBI->connect('dbi:mysql:jobs_db','jobseeker','jobseekerpassw +d') or die "Connection Error: $DBI::errstr\n"; $sth = $dbh->prepare ("DELETE FROM jobs WHERE DateAdded < DATE_SUB(NOW +(), INTERVAL 30 DAY)"); $sth->execute (); my $pagesize = 5; # variables my $AccountID=param('AccountID'); my $locn= param('Country'); my $Function = param('Specialty'); my $reqpage = param('reqpage') || 1; if ($Function eq ""||$locn eq "Select") { print "The FORM is INCOMPLETE. Please Go Back And Fill In All Fields." +; } else { # connect to database my $dbh = get_dbh();
Why doesn't this run on the new server? Any insight will be sincerely appreciated.
In reply to Bad File Descriptor by Milti
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |