This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Can't use DBI and mod_perl together in Cygwin.

I've traced my problem to the TCP/IP stack. The code below gives:

"Can't get tcp protocol by name at /var/www/htdocs/groups/Purch/bin/secure/test.cgi line 12"


use CGI;
use Net::Ping;

$query = new CGI;

print $query->header;

print "&lt;html&gt;&lt;head&gt;&lt;pre&gt;\n";

$p = Net::Ping->new('tcp');
print "$host is alive.\n" if $p->ping("panther2");
print "$host is not alive.\n" if !$p->ping("panther2");

print "&lt;/pre&gt;&lt;/head&gt;&lt;/html&gt;\n";

The DBD code that won't work from within Apache works fine from the command line:

  $DBH = DBI->connect("Apache::DBI::Oracle:",q{uid/password@(DESCRIPTION=
    (CONNECT_DATA=(SID=databaseSID)))}, "");

When this code is called from within the Apache process (within Cygwin), I invariably get a 12545 error. Again, the DBI apis work fine from the Cygwin command-line. I can connect and run queries without issue so long as I don't try it within a CGI script.


-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]