View Full Version : move-uploaded-file problem

07-07-2007, 11:44 AM

I am uploading files to my server. It worked perfectly 2 weeks ago with no problems. However, now my script isn't uploading the files to the server...and even more oddly, it's not outputting any errors either! Usually the move-uploaded-file function throws all sorts of errors back at you if you're doing something wrong!!

My hosts say that they have updated the php on the servers to php 4.4.7 and PHP5 5.2.3. Apparently this can't cause a problem, but something must have changed. This has worked without error before.



07-07-2007, 02:05 PM
You would need to post your code for anyone here to be able to see what about it might be affected by a PHP version change.

Typically, 99.5% of the time when code works on one server and not another (or before/after a PHP version upgrade) it is because of PHP settings. The other .5% of the time it is because of PHP version differences.

In your case I suspect that the register_globals setting got changed or they did not setup the temp folder for uploads (or they did set it up but to a folder that does not exist or to one where the permissions are not correct) and/or the PHP error reporting got turned off or the error reporting level got changed.

Also, I assume that you have error checking, error reporting, and error recovery in your code to get your program to tell you if there are any upload errors - http://www.php.net/manual/en/features.file-upload.errors.php or if the $_FILES array is not set due to the POST_MAX_SIZE - http://www.php.net/manual/en/features.file-upload.common-pitfalls.php