From:             jdolecek at NetBSD dot org
Operating system: NetBSD 1.6ZG
PHP version:      4.3.4
PHP Bug Type:     FTP related
Bug description:  ftp module doesn't work when compiled as extension module

Description:
------------
When the ftp extension is compiled as module and loaded as such, some
symbols (such as ftp_connect()) are not defined and thus PHP won't start.

This happens due to HAVE_FTP not being defined
when ftp.c is being compiled. This is because ftp.c doesn't
include "config.h" as it should.

This is patch which fixes the problem (now in NetBSD
pkgsrc):

--- ftp.c.orig  2004-01-13 19:31:39.000000000 +0100
+++ ftp.c       2004-01-13 19:31:48.000000000 +0100
@@ -19,6 +19,10 @@

 /* $Id: ftp.c,v 1.68.2.10 2003/09/09 21:15:20 pollita Exp $ */

+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include "php.h"

 #if HAVE_FTP



Reproduce code:
---------------
tar xzf php-4.3.4.tar.bz ext/ftp
cd php-4.3.4/ext/ftp
phpize
./configure --with-ftp
make
make install

after that:

> php -r 'ftp_connect("ftp.funet.fi")'



-- 
Edit bug report at http://bugs.php.net/?id=26896&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26896&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26896&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26896&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26896&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26896&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=26896&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=26896&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26896&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26896&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26896&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26896&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26896&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26896&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26896&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26896&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26896&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26896&r=float

Reply via email to