ID:               26896
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jdolecek at NetBSD dot org
-Status:           Open
+Status:           Closed
 Bug Type:         FTP related
 Operating System: NetBSD 1.6ZG
 PHP Version:      4.3.4
 New Comment:

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2004-01-13 13:48:38] jdolecek at NetBSD dot org

Forgot to add you need to add the

extension=ftp.so

line to your php.ini

Sorry about that.

------------------------------------------------------------------------

[2004-01-13 13:45:33] jdolecek at NetBSD dot org

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 this bug report at http://bugs.php.net/?id=26896&edit=1

Reply via email to