perl/dbi Can't create TCP/IP socket

dk henderson dalehend@yahoo.com
Tue Sep 25 02:25:00 GMT 2001


I tried a cgi ftp client and it failed to connect to any hosts as well. Of course,
http works!
9/25/01 4:27:19 AM, Michael Hoffman <grouse@mail.utexas.edu> wrote:
>On 2001年9月25日, dk henderson wrote:
>>> I narrowed it down and found that perl/dbi works from the shell
>> prompt, but not from cgi. Not really sure how they interface and would
>> appreciate any pointers.
>>Not really sure what that last sentence means. Who are "they"?

referring to dbi and apache
>>I have used perl with DBI, MySQL and Apache before without incident. Can
>you open any kind of socket from your CGI script? More information, like
>perl -V and cygcheck -s -v -r might be helpful. See
>< http://cygwin.com/bugs.html >.
>see at bottom for version outputs
>> >I can connect to a remote mysql server via the mysql client at a
>> >cygwin shell prompt, but when I try from the localhost browser running
>> >apache 1.3.20, I get the above error msg.
>> >
>> > $dbh = DBI->connect("$data_source", "$username", "$password",
>> >{ RaiseError => 1, PrintError => 1, AutoCommit => 1 });
>> >where $data_source = DBI:mysql:<database name>:www.freesql.org:3306
>> >
>> >and <database name> is a plain text name
>> >
>> >Is there any explanation for this?
>> >
>> >the apache httpd.conf has the same User as $username in $dbh value.

perl -V 
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
 Platform:
 osname=cygwin, osvers=1.3.2(0.3932), archname=cygwin-multi
 uname='cygwin_nt-4.0 loreley 1.3.2(0.3932) 2001年05月20日 23:28 i686 unknown '
 config_args='-de -Dusemultiplicity'
 hint=recommended, useposix=true, d_sigaction=define
 usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=define
 useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
 use64bitint=undef use64bitall=undef uselongdouble=undef
 Compiler:
 cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include',
 optimize='-O2',
 cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -I/usr/local/include'
 ccversion='', gccversion='2.95.3-5 (cygwin special)', gccosandvers=''
 intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4
 alignbytes=8, usemymalloc=y, prototype=define
 Linker and Libraries:
 ld='ld2', ldflags =' -s -L/usr/local/lib'
 libpth=/usr/local/lib /usr/lib /lib
 libs=-lgdbm -lcrypt
 perllibs=-lcrypt
 libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl5_6_1.a
 Dynamic Linking:
 dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
 cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'
Characteristics of this binary (from libperl): 
 Compile-time options: MULTIPLICITY USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
 Built under cygwin
 Compiled at Aug 22 2001 01:05:05
 @INC:
 /usr/lib/perl5/5.6.1/cygwin-multi
 /usr/lib/perl5/5.6.1
 /usr/lib/perl5/site_perl/5.6.1/cygwin-multi
 /usr/lib/perl5/site_perl/5.6.1
 /usr/lib/perl5/site_perl
 .
Cygnus Win95/NT Configuration Diagnostics
Current System Time: Tue Sep 25 06:19:32 2001
Win95 Ver 4.0 build 67109975 B
Path:	/usr/local/bin
	/usr/bin
	/bin
	/cygdrive/c/WINDOWS
	/cygdrive/c/WINDOWS/COMMAND
	/cygdrive/c/PERL/BIN
	/cygdrive/c/PROGRAM FILES/MTS
SysDir: C:\WINDOWS\SYSTEM
WinDir: C:\WINDOWS
PWD = `/usr/edrive/src'
LD_LIBRARY_PATH = `/usr/local/lib:/lib:/usr/lib'
MAKE_MODE = `unix'
HOME = `/home/projectobjects'
PROMPT = `$p$g'
DBI_PASS = `newman'
DBI_DSN = `dbi:Pg'
POSTGRES_INCLUDE = `/usr/include/postgresql'
COMSPEC = `C:\WINDOWS\COMMAND.COM'
!C: = `C:\WINDOWS'
CMDLINE = `bash --login -i'
HOSTNAME = `PROJECTOBJECTS'
!D: = `D:\cygwin\bin'
WINDIR = `C:\WINDOWS'
WINBOOTDIR = `C:\WINDOWS'
PS1 = `\[033円]0;\w007円
033円[32m\]\u@\h \[033円[33m\w033円[0m\]
$ '
ODBCHOME = `/usr/local'
DBI_USER = `projectobjects'
MACHTYPE = `i686-pc-cygwin'
POSTGRES_LIB = `/usr/lib'
TEMP = `/cygdrive/c/WINDOWS/TEMP'
SHLVL = `1'
SHELL = `/bin/bash'
HOSTTYPE = `i686'
OSTYPE = `cygwin'
TERM = `cygwin'
PGDATA = `/usr/share/postgresql/data'
_ = `/usr/bin/cygcheck'
OLDPWD = `/usr/edrive/local/apache/cgi-bin/ftp'
TZ = `EST5EDT4,M4.1.2/0,M10.5.0/0'
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\&Programs\Cygnus Solutions
 (default) = (unsupported type)
HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
 (default) = `/cygdrive'
 cygdrive flags = 0x00000022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2\/usr/edrive
 (default) = `e:\cygwin'
 flags = 0x00000000
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
 (default) = `D:/cygwin'
 flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
 (default) = `D:/cygwin/bin'
 flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
 (default) = `D:/cygwin/lib'
 flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts00円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts01円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts02円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts03円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts04円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts05円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts06円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts07円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts08円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts09円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts0円A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts0円B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts0円C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts0円D
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts0円E
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts0円F
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts10円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts11円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts12円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts13円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts14円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts15円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts16円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts17円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts18円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts19円
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts1円A
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts1円B
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts1円C
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts1円D
a: fd N/A N/A 
c: hd FAT 1372Mb 99% CP UN DRIVE0VOL00
d: hd FAT 999Mb 99% CP UN APPS
e: hd FAT 547Mb 87% CP UN 
D:\cygwin\bin /usr/bin system binmode
D:\cygwin\lib /usr/lib system binmode
D:\cygwin / system binmode
e:\cygwin /usr/edrive user textmode
c: /cygdrive/c user binmode,noumount
d: /cygdrive/d user binmode,noumount
e: /cygdrive/e user binmode,noumount
Found: D:\cygwin\bin\bash.exe
Found: D:\cygwin\bin\cat.exe
Found: D:\cygwin\bin\cpp.exe
Found: D:\cygwin\bin\find.exe
Found: c:\WINDOWS\COMMAND\find.exe
Warning: D:\cygwin\bin\find.exe hides c:\WINDOWS\COMMAND\find.exe
Found: D:\cygwin\bin\gcc.exe
Found: D:\cygwin\bin\gdb.exe
Found: D:\cygwin\bin\ld.exe
Found: D:\cygwin\bin\ls.exe
Found: D:\cygwin\bin\make.exe
Found: D:\cygwin\bin\sh.exe
 56k 2000年12月02日 D:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
 "cygbz21.0.dll" v0.0 ts=2000年11月20日 18:53
 81k 2001年04月28日 D:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
 "cygitcl30.dll" v0.0 ts=2001年4月28日 18:57
 35k 2001年04月28日 D:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
 "cygitk30.dll" v0.0 ts=2001年4月28日 18:57
 390k 2001年04月28日 D:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
 "cygtcl80.dll" v0.0 ts=2001年4月28日 18:56
 5k 2001年04月28日 D:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
 10k 2001年04月28日 D:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
 "cygtclreg80.dll" v0.0 ts=2001年4月28日 18:56
 623k 2001年04月28日 D:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
 "cygtk80.dll" v0.0 ts=2001年4月28日 18:57
 18k 2000年10月22日 D:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
 "cyggdbm.dll" v0.0 ts=2000年10月22日 22:26
 21k 2001年06月20日 D:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
 "cygintl.dll" v0.0 ts=2001年6月20日 13:09
 45k 2001年07月04日 D:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
 "cygjbig1.dll" v0.0 ts=2001年7月3日 23:25
 119k 2001年06月06日 D:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
 "cygjpeg6b.dll" v0.0 ts=2001年6月6日 0:27
 45k 2001年04月25日 D:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
 "cygform5.dll" v0.0 ts=2001年4月25日 1:28
 26k 2001年04月25日 D:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
 "cygmenu5.dll" v0.0 ts=2001年4月25日 1:27
 156k 2001年04月25日 D:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
 "cygncurses++5.dll" v0.0 ts=2001年4月25日 1:29
 226k 2001年04月25日 D:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
 "cygncurses5.dll" v0.0 ts=2001年4月25日 1:17
 15k 2001年04月25日 D:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
 "cygpanel5.dll" v0.0 ts=2001年4月25日 1:27
 17k 2001年06月28日 D:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
 "cyghistory4.dll" v0.0 ts=2001年1月6日 23:34
 21k 2001年06月28日 D:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
 "cyghistory5.dll" v0.0 ts=2001年6月27日 22:27
 108k 2001年06月28日 D:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
 "cygreadline4.dll" v0.0 ts=2001年1月6日 23:34
 135k 2001年06月28日 D:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
 "cygreadline5.dll" v0.0 ts=2001年6月27日 22:27
 245k 2001年06月12日 D:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
 "cygtiff3.dll" v0.0 ts=2001年6月12日 13:25
 41k 2001年07月04日 D:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
 "cygXpm-noX4.dll" v0.0 ts=2001年7月3日 21:21
 45k 2001年07月04日 D:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
 "cygXpm-X4.dll" v0.0 ts=2000年11月19日 21:45
 49k 2001年02月03日 D:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
 "cygz.dll" v0.0 ts=2001年2月3日 15:35
 365k 2000年10月24日 D:\cygwin\bin\cygdb3.dll - os=4.0 img=1.0 sys=4.0
 "cygdb3.dll" v0.0 ts=2000年10月24日 0:21
 463k 2000年10月24日 D:\cygwin\bin\cygdb_cxx3.dll - os=4.0 img=1.0 sys=4.0
 "cygdb_cxx3.dll" v0.0 ts=2000年10月24日 0:22
 611k 2001年01月27日 D:\cygwin\bin\cygwinb19.dll - os=4.0 img=1.0 sys=4.0
 "cygwin1.dll" v0.0 ts=2000年12月25日 12:39
 163k 2001年05月06日 D:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
 "cygpng2.dll" v0.0 ts=2001年5月6日 0:05
 615k 2001年01月31日 D:\cygwin\bin\cygwin1_old.dll - os=4.0 img=1.0 sys=4.0
 "cygwin1.dll" v0.0 ts=2001年1月31日 10:08
 701k 2001年09月13日 D:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
 "cygwin1.dll" v0.0 ts=2001年9月12日 23:54
 Cygwin DLL version info:
 dll major: 1003
 dll minor: 3
 dll epoch: 19
 dll bad signal mask: 19005
 dll old termios: 5
 dll malloc env: 28
 api major: 0
 api minor: 46
 shared data: 3
 dll identifier: cygwin1
 mount registry: 2
 cygnus registry name: Cygnus Solutions
 cygwin registry name: Cygwin
 program options name: Program Options
 cygwin mount registry name: mounts v2
 cygdrive flags: cygdrive flags
 cygdrive prefix: cygdrive prefix
 cygdrive default prefix: 
 build date: Wed Sep 12 23:54:31 EDT 2001
 shared id: cygwin1S3
Use -h to see help about each section
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /