Thank you for your hint.
I know php.net/copy declaration, but it doesn't give the answer I need.
I still believe in that the problem occurs because of the interpretation of version 5.2.9-1.
Here is my commitment :
Before PHP Version 5.2.9 "the source file" could be placed on local computer or on remote server (on the web) or it could be URL on the web.
The location of the source file doesn't make any difference if the server has the PHP Version older than 5.2.9. There will be no errors while uploading a file from the user's computer to the web server that the script is running on via a form enctyped as multipart/form-data.
But in version 5.2.9 the source file can only be either a URL on the web or a path on remote server (on the web). Copy() function interprets the POSTed file path as a path on the server it is running on.
I tested my script on 3 different environments :
1. on my local server (on my computer) => it worked.
2. on Yahoo server with version 4.3.11 => it worked.
3. on another server with version 5.2.9-1 => it did not work.
The job is simple :
- there is a file on the desktop of the user.
- user enters the page.
- page has a form (enctype="multipart/form-data)
- form has an input (type="file") element.
- when the user clicks the submit button the full path of the file is POSTed
- the action file runs copy() function.
This simple job gives different results depending on the PHP Version.
Let's wait and see.
Thank you again.
Nejat







Bookmarks