php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #43955 FTP Connection Error NumBer Returned
Submitted: 2008-01-28 17:14 UTC Modified: -
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: aparker at hubtack dot com Assigned:
Status: Open Package: Feature/Change Request
PHP Version: 5.2.5 OS: Windows
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-01-28 17:14 UTC] aparker at hubtack dot com
Description:
------------
Currnetly ftp_connect takes three parameters host, port and timeout and returns either a valid connection or false.

It would be nice if it had a fourth parameter for connection error numbers so that we could take the appropriate action or at least tell the user what's wrong.

for example:

if(!$conn_id = ftp($host, $port, $timeout, $error))
 { 
    if ($error == 123) { echo "appropriate error message"; }
 }


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon Dec 09 05:01:26 2019 UTC