Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: move-uploaded-file problem
07-07-2007, 10:44 AM #1
- Join Date
- Mar 2006
- Thanked 2 Times in 2 Posts
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, 01:05 PM #2
- Join Date
- Oct 2006
- Denver, Colorado USA
- Thanked 302 Times in 294 Posts
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/feature...oad.errors.php or if the $_FILES array is not set due to the POST_MAX_SIZE - http://www.php.net/manual/en/feature...n-pitfalls.phpIf you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.