refiking Posted March 25, 2010 Share Posted March 25, 2010 For some reason an upload script I wrote just stopped working all of the sudden and I don't know why. Here's the test code I used: <? echo $_FILES['products_sample_track']['name'].'<br>'. $_FILES['products_sample_track']['tmp_name']; ?> <form action="tracks.php" method="post" enctype="multipart/form-data" /> Sample Track:<br><input type="file" name="products_sample_track" /><br /> Full Track:<br><input type="file" name="products_full_track" /><br> <input type="submit" /> </form> Quote Link to comment https://forums.phpfreaks.com/topic/196449-upload-problem/ Share on other sites More sharing options...
oni-kun Posted March 25, 2010 Share Posted March 25, 2010 isset and I'd recommend against using shorttags, as they may not parse as PHP code in some cases (such if a simple server configuration was done, upgrade, etc, they would not work). Use <?php and ?> respectively. Quote Link to comment https://forums.phpfreaks.com/topic/196449-upload-problem/#findComment-1031493 Share on other sites More sharing options...
JustLikeIcarus Posted March 25, 2010 Share Posted March 25, 2010 I would check that your php config hasnt been modified with a post or upload max size thats too small for the file. Quote Link to comment https://forums.phpfreaks.com/topic/196449-upload-problem/#findComment-1031495 Share on other sites More sharing options...
refiking Posted March 25, 2010 Author Share Posted March 25, 2010 how can I set these values on this script only to allow for the file upload sizes? Quote Link to comment https://forums.phpfreaks.com/topic/196449-upload-problem/#findComment-1031497 Share on other sites More sharing options...
JustLikeIcarus Posted March 25, 2010 Share Posted March 25, 2010 Easiest way is to put a modified copy of the php.ini file in the same directory as the script which needs the modified values. Quote Link to comment https://forums.phpfreaks.com/topic/196449-upload-problem/#findComment-1031498 Share on other sites More sharing options...
refiking Posted March 25, 2010 Author Share Posted March 25, 2010 Also, I forgot to mention that when the form is submitted, the name is displayed, but not the tmp name. Quote Link to comment https://forums.phpfreaks.com/topic/196449-upload-problem/#findComment-1031499 Share on other sites More sharing options...
JustLikeIcarus Posted March 25, 2010 Share Posted March 25, 2010 It likely doesnt have a temp name because the files wasnt saved in the temp space. Either your low on disk space or those settings are too low for the file being uploaded. Quote Link to comment https://forums.phpfreaks.com/topic/196449-upload-problem/#findComment-1031500 Share on other sites More sharing options...
refiking Posted March 25, 2010 Author Share Posted March 25, 2010 It's not the disk space, so it has to be the settings. How can I add the changes to this script only? Quote Link to comment https://forums.phpfreaks.com/topic/196449-upload-problem/#findComment-1031660 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.