|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-12-21 21:28 UTC] sniper@php.net
[2005-12-22 15:09 UTC] jasonandtonya at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 09:00:02 2025 UTC |
Description: ------------ when opening a file via ftp as an array $logfile=fopen('ftp://example.com/filename.ext',"r"); it returns an error: 500 'SIZE filename.ext': command not understood and example.com is running a Solaris default ftp daemon. Looking at the latest version 5.1-latest, (I'm assuming that it is using ftp_fopen_wrapper.c): ftp_fopen_wrapper.c,v 1.85.2.2 2005/11/22 03:01:39 line 450: /* find out the size of the file (verifying it exists) */ php_stream_printf(stream TSRMLS_CC, "SIZE %s\r\n", resource->path); Is there a reason that you are using a non-standard command SIZE for verifying existance of the file? Reproduce code: --------------- $file=fopen('ftp://example.com/filename.ext',"r"); Expected result: ---------------- No error message when doing fopen Actual result: -------------- Warning: fopen('ftp://example.com/filename.ext') [function.fopen]: failed to open stream: FTP server reports 500 'SIZE filename.ext': command not understood. in /patrh/to/htdocs/filename.php on line 3