Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Cannot Connect To MySql db following reinstall of Apache2.2.11

by Milti (Beadle)
on Feb 01, 2019 at 18:50 UTC ( [id://1229255]=perlquestion: print w/replies, xml ) Need Help??

Milti has asked for the wisdom of the Perl Monks concerning the following question:

Apache running on Windows Server2012 suddenly crashed and had to be reinstalled. All my perl scripts ran perfectly previously. Now I have two major problems. First, none of the scripts that previously connected to my MySql database will connect. They all fail. I get an error message like this: Fri Feb 01 10:00:32 2019 error client 97.124.80.68 E:/Pinnacle/DiversityLink/cgi-bin/member_search_htm.pl is not executable; ensure interpreted scripts have "#!" first line, referer: http://www.diversitylink.com/cgi-bin/showmenu2.pl Fri Feb 01 10:00:32 2019 error client 97.124.80.68 (9)Bad file descriptor: don't know how to spawn child process: E:/Pinnacle/DiversityLink/cgi-bin/member_search_htm.pl, referer: http://www.diversitylink.com/cgi-bin/showmenu2.pl

Here are the first few lines of one script:
#!C:/Perl/bin/perl use strict; use CGI qw(:standard); print "content-type: text/html\n\n"; use DBI; my ($dbh, $sth); my $AccountID=param('AccountID'); my $PW=param('Password'); $dbh = DBI->connect('dbi:mysql:membersdb','member','memberpasswd') || +die "cannot open"; $sth = $dbh->prepare("SELECT AccountID,PW FROM memberid WHERE AccountI +D=? and PW =?");$sth->execute ($AccountID,$PW);
The MySql database is active and can be queried via remote access.

The second problem relates to calling PW protected files. None of the scripts are successful whereas they all worked previously. I get this error message: Fri Feb 01 11:46:03 2019 error client 97.124.80.68 user Milt not found: /diversitylink/_private/Global/USA/jobs-htm/createjobpostform_new.htm. Milt is definitely within the PW file for the _private folder that was called as well as the subsequent Accounts folder that is called.

I think the problems lie within the Apache httpd config but everything seems to be OK. Obviously I'm missing something. I'm pretty much a novice and would sincerely appreciate any assistance provided. I need to get these issues resolved as quickly as possible. Thanks!

Replies are listed 'Best First'.
Re: Cannot Connect To MySql db following reinstall of Apache2.2.11
by shadowsong (Pilgrim) on Feb 04, 2019 at 09:41 UTC

    Hi Milti

    Looks like you haven't "script aliased" the directory your cgi script lives in. Show us the output of the following command

    httpd -t -D DUMP_VHOSTS

    .. and depending on that, we can look at tweaking/confirming whether your apache2 config is legit

    Best regards,
    Shadowsong

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1229255]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2024-09-15 07:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (21 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.