|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26896 ftp module doesn't work when compiled as extension module
Submitted: 2004-01-13 13:45 UTC Modified: 2004-01-13 13:55 UTC
From: jdolecek at NetBSD dot org Assigned:
Status: Closed Package: FTP related
PHP Version: 4.3.4 OS: NetBSD 1.6ZG
Private report: No CVE-ID: None
 [2004-01-13 13:45 UTC] jdolecek at NetBSD dot org
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

--- 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 2003/09/09 21:15:20 pollita Exp $ */

+#include "config.h"
 #include "php.h"


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

after that:

> php -r 'ftp_connect("")'


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-13 13:48 UTC] jdolecek at NetBSD dot org
Forgot to add you need to add the

line to your php.ini

Sorry about that.
 [2004-01-13 13:55 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Feb 29 15:01:32 2024 UTC