snyper3xs Posted November 4, 2009 Share Posted November 4, 2009 Hi guys. Here on my development machine I have a porblem with my $_FILES arrays that I cannot resolve. Returns and empty array that I cannot find a solution for. I have searched and tried many things without any success. Originally I had a old version of xampp installed. So U updated to the current one. That failed so I installed apache, mysql and php all from scratch and I still get an empty $_FILES array. All the latest versions installed yesterday Here is the code I am using for testing in a file called test.php. <html> <body> <?php echo 'file'; print_r($_FILES); echo 'end'; print_r($_POST); set_time_limit(0); ini_set('upload_max_filesize', '100M'); ?> <form action="test.php" method="post" encytype="multipart/form-data"> <input type="file" name="test_file" /> <input type="submit" /> </form> </body> </html> As you can see I have brought it down to its raw source. There are is only 1 form, the encytype="multipart/form-data" is included, it is posted. I have also checked all the relevant setting in the php.ini file to make sure they are correct. post_max_size = 8M file_uploads = On upload_tmp_dir = 'C:/php/tmp' upload_max_filesize = 2M PHP, apache and mysql all work fine and I am able to copy files to the temp directory. I am logged in with administrator right, I am the only person using this machine. My machine is running Vista. This is the results I get returned when I try to upload a standard jpg file. file array Array ( ) post array Array ( [test_file] => IMG_8555.jpg ) I have also outputted the $_SERVER['CONTENT_LENGTH'] which does output a small value. IE 24. This varies dependent on what file I upload. However I have never seen it above 50. Can someone please provide some direction. I have no idea. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/180270-solved-_files-array-is-empting-after-reinstalling-apache-and-mysql-please-help/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 4, 2009 Share Posted November 4, 2009 What does a phpinfo() statement show for the actual file_uploads setting? If the php.ini that you are changing is not the one that php is using or you did not stop and start your web server to get any change made to the php.ini to take effect, it does not really matter what the settings in the php.ini are. Quote Link to comment https://forums.phpfreaks.com/topic/180270-solved-_files-array-is-empting-after-reinstalling-apache-and-mysql-please-help/#findComment-950967 Share on other sites More sharing options...
snyper3xs Posted November 8, 2009 Author Share Posted November 8, 2009 I have also checked that and I am editing the correct php.ini. As I said I installed Apache, Mysql and PHP all from scratch so I had to link them all together so I know where it is. In addition I have made edits to the php.ini file that have been reflected in the output. Quote Link to comment https://forums.phpfreaks.com/topic/180270-solved-_files-array-is-empting-after-reinstalling-apache-and-mysql-please-help/#findComment-953867 Share on other sites More sharing options...
PFMaBiSmAd Posted November 9, 2009 Share Posted November 9, 2009 This is not spelled right - encytype Quote Link to comment https://forums.phpfreaks.com/topic/180270-solved-_files-array-is-empting-after-reinstalling-apache-and-mysql-please-help/#findComment-953880 Share on other sites More sharing options...
snyper3xs Posted November 16, 2009 Author Share Posted November 16, 2009 OMG that is outstanding. Thank you soo much. I have spent soo many hours on this. I know it's a silly mistake but I'm just happy that it is working. Thanks again. Quote Link to comment https://forums.phpfreaks.com/topic/180270-solved-_files-array-is-empting-after-reinstalling-apache-and-mysql-please-help/#findComment-958411 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.