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!


In reply to Cannot Connect To MySql db following reinstall of Apache2.2.11 by Milti

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.