php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35072 ftps:// fopen wrapper: FTP server reports 501 wrong number of parameters
Submitted: 2005-11-02 22:10 UTC Modified: 2005-11-30 14:50 UTC
From: bill dot finn at sellingsource dot com Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 5CVS-2005-11-29 (snap) OS: *
Private report: No CVE-ID: None
 [2005-11-02 22:10 UTC] bill dot finn at sellingsource dot com
Description:
------------
using ftps in some filesystem functions produces ssl error and fails.  Same effect if only using file() without file_exists before it.

Reproduce code:
---------------
echo file_exists("ftps://{$user}:{$pass}@{$host}:{$port}/{$path}{$file}")
$contents = file("ftps://{$user}:{$pass}@{$host}:{$port}/{$path}{$file}")

Expected result:
----------------
$contents should get the contents of the file I'm requesting from the server.

Actual result:
--------------
PHP Warning:  file(): SSL/TLS already set-up for this stream in /home/wfinn/test/ftps.php on line 21

Warning: file(): SSL/TLS already set-up for this stream in /home/wfinn/test/ftps.php on line 21
PHP Warning:  file(ftps://...myinfo...): failed to open stream: Unable to activate SSL mode
FTP server reports 150 Opening BINARY data connection for /s-fastcash/343923324-20051019.ddl (1084 bytes)
 in /home/wfinn/test/ftps.php on line 21

Warning: file(ftps://...myinfo...): failed to open stream: Unable to activate SSL mode
FTP server reports 150 Opening BINARY data connection for /s-fastcash/343923324-20051019.ddl (1084 bytes)
 in /home/wfinn/test/ftps.php on line 21


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-28 15:03 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip


 [2005-11-29 17:57 UTC] bill dot finn at sellingsource dot com
It now retrieves the file, but is still generating an error:

PHP Warning:  file(): SSL: fatal protocol error in /home/wfinn/test/ftps.php on line 21

Warning: file(): SSL: fatal protocol error in /home/wfinn/test/ftps.php on line 21
 [2005-11-30 14:50 UTC] sniper@php.net
See also bug #23220 for information why this isn't PHP bug.

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Aug 10 20:01:24 2020 UTC