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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jmichae3 at yahoo dot com
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC