php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22053 Ftp ftp_rawlist,ftp_nlist broken
Submitted: 2003-02-04 12:47 UTC Modified: 2005-02-03 04:18 UTC
From: ntrujillo at cox dot net Assigned:
Status: Not a bug Package: FTP related
PHP Version: 4.3.0 OS: FreeBSD 5.0-RELEASE #0
Private report: No CVE-ID: None
 [2003-02-04 12:47 UTC] ntrujillo at cox dot net
this module was compiled from a cvs'ed port to receive benefit of asyncronous ftp support, however, the ftp_*list functions appear to be very much broken.

A quick script summary:
<pre>
<?
$fFp = ftp_connect(anyhost);
$login = ftp_login($fFp,thisUser,'%thisPassword%');
$dir = ftp_pwd($fFp);
$theList = ftp_nlist($fFp,$dir);
print_r($theList);
?>
</pre>

A quasi-successful back trace:(no execs!!)

bsd# gdb `which httpd` /httpd.core
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-undermydesk-freebsd"...
(no debugging symbols found)...
Core was generated by `httpd'.
Program terminated with signal 5, Trace/breakpoint trap.
Reading symbols from /usr/lib/libcrypt.so.2...(no debugging symbols found)...
done.
Loaded symbols for /usr/lib/libcrypt.so.2
Reading symbols from /usr/lib/libc.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.5
Reading symbols from /usr/local/libexec/apache/mod_mmap_static.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_mmap_static.so
Reading symbols from /usr/local/libexec/apache/mod_vhost_alias.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_vhost_alias.so
Reading symbols from /usr/local/libexec/apache/mod_env.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_env.so
Reading symbols from /usr/local/libexec/apache/mod_log_config.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_log_config.so
Reading symbols from /usr/local/libexec/apache/mod_mime_magic.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_mime_magic.so
---Type <return> to continue, or q <return> to quit---
Reading symbols from /usr/local/libexec/apache/mod_mime.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_mime.so
Reading symbols from /usr/local/libexec/apache/mod_negotiation.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_negotiation.so
Reading symbols from /usr/local/libexec/apache/mod_status.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_status.so
Reading symbols from /usr/local/libexec/apache/mod_info.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_info.so
Reading symbols from /usr/local/libexec/apache/mod_include.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_include.so
Reading symbols from /usr/local/libexec/apache/mod_autoindex.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_autoindex.so
Reading symbols from /usr/local/libexec/apache/mod_dir.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_dir.so
Reading symbols from /usr/local/libexec/apache/mod_cgi.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_cgi.so
Reading symbols from /usr/local/libexec/apache/mod_asis.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_asis.so
Reading symbols from /usr/local/libexec/apache/mod_imap.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_imap.so
Reading symbols from /usr/local/libexec/apache/mod_actions.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_actions.so
Reading symbols from /usr/local/libexec/apache/mod_speling.so...
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_speling.so
Reading symbols from /usr/local/libexec/apache/mod_userdir.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_userdir.so
Reading symbols from /usr/local/libexec/apache/mod_alias.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_alias.so
Reading symbols from /usr/local/libexec/apache/mod_rewrite.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_rewrite.so
Reading symbols from /usr/local/libexec/apache/mod_access.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_access.so
Reading symbols from /usr/local/libexec/apache/mod_auth.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_auth.so
Reading symbols from /usr/local/libexec/apache/mod_auth_anon.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_auth_anon.so
Reading symbols from /usr/local/libexec/apache/mod_auth_db.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_auth_db.so
Reading symbols from /usr/local/libexec/apache/mod_digest.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_digest.so
Reading symbols from /usr/local/libexec/apache/libproxy.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/libproxy.so
Reading symbols from /usr/local/libexec/apache/mod_cern_meta.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_cern_meta.so
Reading symbols from /usr/local/libexec/apache/mod_expires.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_expires.so
---Type <return> to continue, or q <return> to quit---
Reading symbols from /usr/local/libexec/apache/mod_headers.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_headers.so
Reading symbols from /usr/local/libexec/apache/mod_usertrack.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_usertrack.so
Reading symbols from /usr/local/libexec/apache/mod_unique_id.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_unique_id.so
Reading symbols from /usr/local/libexec/apache/mod_setenvif.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/mod_setenvif.so
Reading symbols from /usr/local/libexec/apache/libphp4.so...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/libexec/apache/libphp4.so
Reading symbols from /usr/local/lib/mysql/libmysqlclient.so.10...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/mysql/libmysqlclient.so.10
Reading symbols from /usr/local/lib/libming.so.3...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libming.so.3
Reading symbols from /usr/lib/libm.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libm.so.2
Reading symbols from /usr/local/lib/libgd.so.2...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libgd.so.2
Reading symbols from /usr/local/lib/libfreetype.so.9...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from /usr/local/lib/libpng.so.5...
(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpng.so.5
Reading symbols from /usr/lib/libz.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.2
Reading symbols from /usr/local/lib/libjpeg.so.9...
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libjpeg.so.9
Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols found)...
done.
Loaded symbols for /usr/libexec/ld-elf.so.1
#0  0x28095801 in r_debug_state () from /usr/libexec/ld-elf.so.1
(gdb) bt
#0  0x28095801 in r_debug_state () from /usr/libexec/ld-elf.so.1
#1  0x0806c2c1 in ap_os_dso_unload ()
#2  0x0804ed8b in unload_module ()
#3  0x08050668 in run_cleanups ()
#4  0x0804f39c in ap_clear_pool ()
#5  0x0805e014 in standalone_main ()
#6  0x0805e907 in main ()
#7  0x0804ec45 in _start ()

The httpd-error.log:( while refreshing script in question)

bsd# tail -f httpd-error.log
[Wed Feb  5 01:22:49 2003] [notice] child pid 39435 exit signal Segmentation fault (11)
[Wed Feb  5 01:22:50 2003] [notice] child pid 39438 exit signal Segmentation fault (11)

configure args:
'./configure' '--with-apxs=/usr/local/sbin/apxs' '--with-config-file-path=/usr/local/etc' '--enable-versioning' '--with-regex=system' '--without-gd' '--without-mysql' '--with-gd=/usr/local' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib' '--with-mysql=/usr/local' '--enable-ftp' '--enable-debug' '--with-ming=/usr/local' '--enable-sockets' '--prefix=/usr/local' 'i386-portbld-freebsd5.0' 

Please note, that this is reproducible on FreeBSD 5.0/Apache 1.3.27/mod_php4.3.0 , but works flawlessy(errorless) on
FreeBSD 4.5/Apache 1.3.27/mod_php4.3.0

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-04 12:50 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.

see 22052
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC