#22052 [Fbk->Opn]: Ftp ftp_rawlist,ftp_nlist broken

From: Date: Fri, 21 Feb 2003 00:06:33 +0000
Subject: #22052 [Fbk->Opn]: Ftp ftp_rawlist,ftp_nlist broken
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-33765@lists.php.net to get a copy of this message
ID: 22052 User updated by: ntrujillo at cox dot net Reported By: ntrujillo at cox dot net -Status: Feedback +Status: Open Bug Type: FTP related Operating System: FreeBSD 5.0-RELEASE #0 PHP Version: 4.3.1-dev New Comment: Pollita, I believe this is a pretty generic install, no NIS,NFS,firewall, or clustering. notes on setup:: arch:i386 mobo:MSI pro5 i850 chipset proc:P4 1.8ghz 512k l2 cache ram:512mb 800mhz rdram disc:80gb cheetah 4 ATA-100 acd0: CD-RW <CD-RW BCE2410IM> at ata0-master UDMA33 acd1: DVD-ROM <JLMS DVD-ROM LTD-166S> at ata0-slave UDMA33 The only 'special' thing that is different is audio support compiled into custom kernel. Hope this helps :) Previous Comments: ------------------------------------------------------------------------ [2003-02-20 13:04:45] pollita@php.net I hate to say this... but I just cannot reproduce this bug. I've installed FreeBSD 5.0 on a Pentium2-233, Apache 1.3.27, and a PHP 4.3 snapshot php4-STABLE-200302190030.tar.gz as a DSO (via --with-apxs). Using: <?php $fp = ftp_connect("ftp.us.debian.org"); var_dump($fp); ftp_login($fp, "anonymous", "pollita@php.net"); var_dump($fp); var_dump(ftp_rawlist($fp, "/debian/pool/main/p")); var_dump($fp); ftp_close($fp); ?> and get the listing of 488 files that is expected with no segfaults or other errors. There's clearly something 'special' about your installations which is triggering this bug to occur. Can you list any deviations from a standard install that are used on your server(s)? You never mentioned what architecture you're running on? Is it x86 or something else? Are you using NIS? clustering? Do you have any firewalling enabled? Recall that FTP connections use a separate command stream and data stream. Do other ftp_* commands work as expected? ftp_get() would be a good one to test. ------------------------------------------------------------------------ [2003-02-19 10:36:24] ntrujillo at cox dot net This is built as a loadable module from the freebsd ports collection : mod_php4 http://www.freebsd.org/cgi/cvsweb.cgi/ports/www/mod_php4/ Configure args look like: LIB_DEPENDS+= gd.2:${PORTSDIR}/graphics/gd LIB_DEPENDS+= freetype.9:${PORTSDIR}/print/freetype2 LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png LIB_DEPENDS+= jpeg.9:${PORTSDIR}/graphics/jpeg CONFIGURE_ARGS+=--with-gd=${LOCALBASE} \ --enable-gd-native-ttf \ --with-freetype-dir=${LOCALBASE} \ --with-jpeg-dir=${LOCALBASE} \ --with-png-dir=${LOCALBASE} CONFIGURE_ARGS+=--with-zlib CONFIGURE_ARGS+=--with-bz2=/usr LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client CONFIGURE_ARGS+=--with-mysql=${LOCALBASE} LIB_DEPENDS+= expat.4:${PORTSDIR}/textproc/expat2 CONFIGURE_ARGS+=--with-expat-dir=${LOCALBASE} LIB_DEPENDS+= xml2.5:${PORTSDIR}/textproc/libxml2 CONFIGURE_ARGS+=--with-dom=${LOCALBASE} CONFIGURE_ARGS+=--enable-ftp LIB_DEPENDS+= ming.3:${PORTSDIR}/graphics/ming CONFIGURE_ARGS+=--with-ming=${LOCALBASE} CONFIGURE_ARGS+=--enable-sockets CONFIGURE_ARGS+=--enable-debug CONFIGURE_ARGS+=--enable-tran httpd server is apache 1.3.27. also built from the FreeBSD 5 ports collection. ------------------------------------------------------------------------ [2003-02-19 09:59:59] pollita@php.net One more piece of feedback.... What httpd server (and version) are you running against and is PHP compiled statically or as a dynamic module? What does your configure line look like? ------------------------------------------------------------------------ [2003-02-15 00:07:40] pollita@php.net So after browsing via httpd there was absolutely nothing in /etc/22052.log ? And only after running via CLI did items appear? The log results I'm seeing suggest there was a segfault (or other failure to complete) during the second call (the NLST command was sent but no successful response was received) and several immediate failures at the end. I think in order to fully diagnose this I'll have to install FreeBSD 5.0 locally so that I can run deeper tests myself. This means the fix won't make it into 4.3.1, but it should be ready well before 4.3.2 and you can pick it up in a snapshot at any time after I find and fix the problem. ------------------------------------------------------------------------ [2003-02-14 20:16:53] ntrujillo at cox dot net pollita, I patched the file and recompiled. The simple script you gave me returned 0 results in web mode.(via httpd).A more complex script in Cli mode actually produced the best results (lengthy): http://www.kelvinbeats.com/pollita/ <? $fFp=ftp_connect("ahost.withalot.ofdirs"); ftp_login($fFp,'user','pw'); print_r(ftp_rawlist($fFp,'/'); ftp_close($fFp); ?> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22052 -- Edit this bug report at http://bugs.php.net/?id=22052&edit=1

« previous php.bugs (#33765) next »