From: tornbydesign at hotmail dot com
Operating system: Windows
PHP version: 4.2.3
PHP Bug Type: FTP related
Bug description: Error Opening [File] in [PHPScript] on Line [linenumber]
Hi,
I have a problem with FTP Fileupload.
if i execute the script i receive this message
'Warning: error opening C:\Images\any.jpg in ftp.php on line 90'
the ENCTYPE in form-tag is "multipart/form-data". Method is Get. I receive
the right Path information but it seems that the file couldn 't be opened.
File Upload is activated. The MaxFilesize is 20MB. I don't know what it
could be.
Ah, one thing: I must replace '\\' through '\' because the path which is
returned from the file-element is 'C:\\Images\\any.jpg'
Can you help me???
Thanks
Tornby
Sorry for my bad english
info:
[phpcut] opens the Sourcecode cut and [/phpcut] ends it.
[phpcut]
$connection = ftp_connect(FTP_host);
$login = ftp_login($connection, FTP_uid, FTP_pwd);
ftp_pasv($connection,true);
$iPos = 0;
$FTPError = "";
while ($iPos < 10)
{
If (!empty($HTTP_GET_VARS['file'.$iPos]))
{
$SourceFile =
str_replace('\\\\','\\',$HTTP_GET_VARS['file'.$iPos]);
$DestinationFile =
$destination.Substr($SourceFile,strrpos($SourceFile,'\\')+1,strlen($SourceFile)-strrpos($SourceFile,'\\')-1);
if (!
ftp_put($connection,$DestinationFile,$SourceFile,FTP_BINARY)) $FTPError .=
"Fehler beim hochladen von '$SourceFile'<br>";
}
$iPos++;
}
ftp_quit($connection);
[/phpcut]
--
Edit bug report at http://bugs.php.net/?id=22387&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22387&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=22387&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=22387&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22387&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=22387&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=22387&r=support
Expected behavior: http://bugs.php.net/fix.php?id=22387&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=22387&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=22387&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=22387&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22387&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=22387&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=22387&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=22387&r=gnused