refiking Posted December 16, 2009 Share Posted December 16, 2009 I have a script that runs on my development server (linux), but won't work on the live environment (iis). I checked the php.ini settings and they are fine. I even echoed the tmp name for the uploaded file and that shows, but it's not moving the file and I don't know how (if it's even possible) to display the reason why it's not doing so. What can I check or alter? Here's a snippet of the code: echo "Temp file: " . $_FILES['uploadFile'. $x]["tmp_name"] . "<br />"; $copy = move_uploaded_file($_FILES['uploadFile'. $x]['tmp_name'], 'uploads/' . $file_name); Quote Link to comment https://forums.phpfreaks.com/topic/185325-upload-script-not-working-anymore/ Share on other sites More sharing options...
Cardale Posted December 16, 2009 Share Posted December 16, 2009 I'm just going to throw this out because sometimes I do it. I forget about permissions. Did you check that? Quote Link to comment https://forums.phpfreaks.com/topic/185325-upload-script-not-working-anymore/#findComment-978334 Share on other sites More sharing options...
refiking Posted December 16, 2009 Author Share Posted December 16, 2009 Thanks, but yeah permissions are set. I just did another google search and think I might've found the problem but still not the solution. The live environment is Windows IIS and the test environment is linux. And the temporary folder for windows retains the permissions of windows and not of the site. Anyone have any experience with this kind of thing or a solution for it? Quote Link to comment https://forums.phpfreaks.com/topic/185325-upload-script-not-working-anymore/#findComment-978335 Share on other sites More sharing options...
Cardale Posted December 16, 2009 Share Posted December 16, 2009 what about changing the temp directory? Quote Link to comment https://forums.phpfreaks.com/topic/185325-upload-script-not-working-anymore/#findComment-978336 Share on other sites More sharing options...
PFMaBiSmAd Posted December 16, 2009 Share Posted December 16, 2009 Do some debugging, display all php detected errors. Temporarily add the following two lines of code immediately after your first opening <?php tag - ini_set("display_errors", "1"); error_reporting(E_ALL); What does the ['error'] element of the $_FILES array show? Any upload errors? Quote Link to comment https://forums.phpfreaks.com/topic/185325-upload-script-not-working-anymore/#findComment-978467 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.