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]

Re: Apache CGI Scripts - Network layer permission denied


On 13 Aug 2004 at 17:32, Peter Flanigan wrote:

> When I run CGI scripts from Apache I'm getting permission denied
> errors.
> 
> use Net::protoent;
> my $p = getprotobyname(shift || 'tcp');
> 
> if (defined $p) {
>  printf("proto for %s is %d, aliases are %s\n",
>           $p->name, $p->proto, "@{$p->aliases}");
> } else {
>  printf("Bad protocol 'tcp'\n");
> }
> 
> This correctly turns ths string 'tcp' into the number 6 via lookup in
> /etc/protocols when run from the pdksh prompt. Returns the bad
> protocol error when run as a CGI script from Apache. Apache is being
> started (by apachectl start) from the same shell prompt which
> correctly runs the script. In general I'm finding that all network
> related calls (creating new sockets and similar) are failing.
> 
> I also note (and think that it's related) that uname -n returns the
> correct mixed case hostname when run from the shell prompt but returns
> an incorrect (all upper case) string when run from the
> cgi-bin/test-cgi shell script. This eliminates Perl from the equation.
> 
> I think this is the same problem as posted to this mailing list by:
> 
> Richard Morse <remorse@partners.org>
> Problems with Amanda and Cygwin 1.5.10
> 28/07/2004
> 
> and
> 
> "David A. Rogers" darogers@speakeasy.net
> Socket problem w/ apache & perl cgi
> 30/07/2004
> 
> I did not notice any follow up posts to these queries (my spam filter
> was rejecting some Cygwin mailing list posts).


I think this may be the same problem that I reported here:

http://www.cygwin.com/ml/cygwin/2004-08/msg00452.html

Rolling back to the previous cygwin version is the only way I have 
been able to get connections via apache to remote databases.

Creating sockets via apache failed wheres from perl command line it 
worked.



--
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/


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