php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74389 error ftp_connect doesn't exist
Submitted: 2017-04-06 19:13 UTC Modified: 2017-04-06 19:17 UTC
From: jmichae3 at yahoo dot com Assigned:
Status: Not a bug Package: FTP related
PHP Version: 7.1.3 OS: windows 7 x64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
49 + 26 = ?
Subscribe to this entry?

 
 [2017-04-06 19:13 UTC] jmichae3 at yahoo dot com
Description:
------------
Fatal error: Uncaught Error: Call to undefined function ftp_connect() in L:\w2\jtr\ftp7a.php:360

Test script:
---------------
$host='somewhere.com';
$conn_id = ftp_connect($host);


Expected result:
----------------
a resource id

Actual result:
--------------
Fatal error: Uncaught Error: Call to undefined function ftp_connect() in L:\w2\jtr\ftp7a.php:360

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-06 19:17 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2017-04-07 02:15 UTC] jmichae3 at yahoo dot com
http://php.net/manual/en/ftp.installation.php
this doesn't take into account that PHP doesn't have an installer anymore. FTP cannot be installed. it comes as a .zip file that you extract. is this something those docs are old. php.ini needs to be installed
that needs to be enabled for it to work.
;extension=php_ftp.dll
needs to be changed to 
extension=php_ftp.dll

in fact, a lot of things are disabled for development for some strange reason, even mysql and pg stuff.

please update the installation instructions. for *nix, there's probably an equivalent .so file (shared library, same as a .dll in windows) to enable FTP.
 [2017-04-07 06:43 UTC] spam2 at rhsoft dot net
> http://php.net/manual/en/ftp.installation.php
> this doesn't take into account that PHP doesn't have an installer anymore

what are you talking about?

"In order to use FTP functions with your PHP configuration, you should add the --enable-ftp option when installing PHP" is about ./configure when you buil dfrom source and in that case it would be statically compiled in the php-binary (fedora and redhat rpm packages as example just have the ftp functions available)

when you compile it  with "--enable-ftp=shared" you get a extension which needs to be loaded in php.ini with "extension = ftp.so" and if whoever built your php binaries did put it into a own rpm/deb package than seek it

anyways THIS IS NOT a PHP bug, the problem exists between chair and keyboard
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun May 22 14:05:46 2022 UTC