Nolongerused3921 Posted January 3, 2007 Share Posted January 3, 2007 I'm having an incredibly strange bug that seems to appear both on my personal server (XP, PHP 5.0, MySQL 4.1) and my other server (Redhat ent 3, PHP 5.0, MySQL 4.1)... For some reason, [b]sometimes[/b] when you upload a file, it doesn't move it to the new folder... It sees [b]all[/b] of the data, adds said data to a database, but doesn't move it.Now the strange thing about this is, that, well... It doesn't always do it, and if it does it to a file one time, the next time you upload it - it works fine.The code:[code=php:0] $new_filename = $exact_dir.$upload_location . $id . "_" . basename($fileName); if (!move_uploaded_file($tmpName,$new_filename)) { echo "Failed..."; print_r($_FILES); return; }[/code]$exact_dir, $upload_location, and $id are all correct... This moves it to the [b]exact[/b] location (As in, from the server's root down to the folder name) and filename is just $_FILES['file']['tmp_name'].I would really like to know why this doesn't work... All the data is being seen (And added to a database), its not printing "Failed...", and I'm not getting any warnings... What could be causing this? Link to comment https://forums.phpfreaks.com/topic/32633-files-upload-most-of-the-time-but-not-always/ Share on other sites More sharing options...
Nolongerused3921 Posted January 4, 2007 Author Share Posted January 4, 2007 Anyone know anything about this? Link to comment https://forums.phpfreaks.com/topic/32633-files-upload-most-of-the-time-but-not-always/#findComment-152634 Share on other sites More sharing options...
Nolongerused3921 Posted January 6, 2007 Author Share Posted January 6, 2007 Someone must know Link to comment https://forums.phpfreaks.com/topic/32633-files-upload-most-of-the-time-but-not-always/#findComment-154067 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.