Mail Archives: cygwin/2004/08/01/13:30:07
No, actually it's not limited to mysql, although that is what I was originally trying to do.
I have also tried the same code attempting to connect to port 80 on localhost - which ought to work. I've also tried port 110 at my isp which ought to work. Both work from the bash prompt. Neither works when running under apache/cgi.
Any other ideas worth trying? Is there any way to make sure I have sufficient priviledges?
dar
> -----Original Message-----
> From: Pablo Marin Garcia [mailto:dysdera AT ebi DOT ac DOT uk]
> Sent: Saturday, July 31, 2004 02:46 PM
> To: cygwin AT cygwin DOT com
> Subject: Re: Socket problem w/ apache & perl cgi - and mysql
>
>
> On Fri, 31 Jul 2004, Igor Pechtchanski wrote:
>
>
> >> [david] I have a snippet of perl code that runs fine at the bash prompt
> but fails
> >> when run under apache as a cgi app.
>
>
>
> Hello Igor and David
>
> I have had also the same problem one month ago and I was unable to solve
> it and ended using the windows IIS.
>
> I guess that David is using mysql (port 3306 by default).
>
> In my case (and probably david if he is using mysql) the problem is not
> the apache itself. My apache works ok and the cgi also. ONLY fails trying
> to connect to the mysql.
>
> My scripts run ok outside the apache but fail inside the cygwin apache (in
> my unix machines run ok).
>
> I am using the cygwin mysql client with the w32 mysql server.
>
> The same happens if I am using the w32 apache using the cygwin
> perl->cygwin mysql client.
>
>
> ERROR:
> ------------- EXCEPTION -------------
> MSG: Could not connect to database xx user yy using
> [DBI:mysql:database=xx;host=127.0.0.1;port=3306] as a locator
>
> ** Can't create TCP/IP socket (1) **
>
> --------------------------------------
>
> >At a guess, you're getting this because Apache runs as a service (i.e.,
> >the user, "nobody" by default, may not have enough rights).
> > Igor
> >--
> >
>
>
> In my case, I am NOT running httpd as as service. It has been started from
> a shell login as windows admin user. From ps, the httpd is running with my
> user UID
>
> I would apreciate if someone could point me out where I could found useful
> info to try to solve this problem.
>
> should I have to add mysql and apache usr and group to my password and
> group files as in unix?
>
> Apart of the cygwin utilities section in the user guide, someone knows
> where can i learn more about setting privilegies in cygwin in order to run
> services in a safe mode (or at least not quite unsafe).
>
> regards.
>
> ------- versions:
> perl 5.8.2-1
> apache 1.3.29-2
>
> mysql Ver 12.22 Distrib 4.0.20, for pc-cygwin (i686)
> Server version: 4.0.20a-debug
>
> 653k 2004/05/17 c:\mysql\bin\cygwinb19.dll - os=4.0 img=1.0 sys=4.0
> "cygwinb19.dll" v0.0 ts=1998/7/15 18:50
> $ uname -a
> CYGWIN_NT-5.1 argyrodes 1.5.10(0.116/4/2) 2004-05-25 22:07 i686 unknown
> unknown Cygwin
>
>
>
>
> . / __ \ / __ \
> \ | ///\\\ | / \ | ///\\\ | /
> \ \_((####))_/ / \ \_((####))_/ /
> \__ ((##)) __/ \__ ((##)) __/
> / |||| \ / |||| \
> / | oo | \ / | oo | \
> | | !! | | | | !! | |
> \ / \\|// \ /
> (o o)
> . .-. .-. .-. .-. .-. .-oOOo~(_)~oOOo-. .-. .-. .-. .-.
> |X|||\ /|||X|||\ /|||X|||\ /|||X|||\ /|||X|||\ /|||X|||\ /|||X|||\
> / \|||X|||/ \|||X|||/ \|||X|||/ \|||X|||/ \|||X|||/ \|||X|||/ \|||
> `-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `-'
>
>
>
> --
> 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/
>
>
--
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/
- Raw text -