Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Fri, 30 Jul 2004 01:53:34 -0500 (Central Daylight Time) From: "David A. Rogers" To: cygwin AT cygwin DOT com Subject: Socket problem w/ apache & perl cgi Message-ID: X-Warning: UNAuthenticated Sender MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes I have a snippet of perl code that runs fine at the bash prompt but fails when run under apache as a cgi app. ======================================= #!/usr/bin/perl use strict; use IO::Socket; print "Content-type: text/plain\n\n"; my $socket = IO::Socket::INET->new(PeerAddr => "127.0.0.1", PeerPort => 3306, PeerProto => "tcp", PeerType => SOCK_STREAM); my $errno = 0; if (!$socket) { $errno += $!; print "Could not connect: $!\n"; print "errno = $errno\n"; } else { print "socket = $socket\n"; } ======================================+ Under bash I get this: ===================== Content-type: text/plain socket = IO::Socket::INET=GLOB(0xa1843c4) ===================== Under apache/cgi I get this: ===================== Could not connect: Operation not permitted errno = 1 ===================== The standard apache test page comes up fine. setup is - Windows XP - cygwin was updated as of yesterday the 29th - httpd.conf has not been modified - passwd and group were generated by the appropriate tools and have not been modified - Both perl and apache were downloaded and not built from source. - I did install the dbi and dbd_mysql modules from cpan. apache 1.3.29-2 perl 5.8.2-1 I can send a full cygcheck.out if warrented. Any help appreciated. dar -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/