PeggyBuckham Posted November 30, 2010 Share Posted November 30, 2010 I want to allow for a user to upload any photo that they might have taken from their camera. I can't get photo's with large file sizes to upload. I have changed the setting in the php5.ini and set the settings extremely high. This has always worked for me before. I also have changed the code on the form. <input type="hidden" name="MAX_FILE_SIZE" value="99000000" /> here is the code for the php5.ini register_globals = on allow_url_fopen = on expose_php = Off max_input_time = 500 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" [Zend] zend_extension=/usr/local/zo/ZendExtensionManager.so zend_extension=/usr/local/zo/4_3/ZendOptimizer.so register_long_arrays = on max_file_uploads = 8M post_max_size = 8M Maybe the problem is not in the php5.ini ? Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 30, 2010 Share Posted November 30, 2010 have you changed the max upload size in apache? if you have and it still doesn't work, or you don't have access to apache, you might have to do this via ftp Quote Link to comment Share on other sites More sharing options...
requinix Posted November 30, 2010 Share Posted November 30, 2010 Create a little .php file with Run it, and look for what it says the values of max_file_uploads and post_max_size are. Quote Link to comment Share on other sites More sharing options...
PeggyBuckham Posted November 30, 2010 Author Share Posted November 30, 2010 okay I am sort of new at this what apache? I sure that it is running on a lynx server. Quote Link to comment Share on other sites More sharing options...
PeggyBuckham Posted November 30, 2010 Author Share Posted November 30, 2010 i already made with phpinfo(); Quote Link to comment Share on other sites More sharing options...
jdavidbakr Posted November 30, 2010 Share Posted November 30, 2010 Create a little .php file with <?php phpinfo(); ?> Run it, and look for what it says the values of max_file_uploads and post_max_size are. I think requinix is right - there are two values you need to change in php.ini: upload_max_filesize and post_max_size Quote Link to comment Share on other sites More sharing options...
PeggyBuckham Posted November 30, 2010 Author Share Posted November 30, 2010 I have made a page with <?php phpinfo(); ?> the result reads: max_file_uploads=8M post_max_size=8M Anybody have another idea? Quote Link to comment Share on other sites More sharing options...
jdavidbakr Posted November 30, 2010 Share Posted November 30, 2010 Hm, can you find the threshold where it breaks? I.e, does it work with a 3MB file but not with a 4MB file? Try a var_dump($_FILES) on the submission form script to see if you get any clues. Quote Link to comment Share on other sites More sharing options...
The Little Guy Posted November 30, 2010 Share Posted November 30, 2010 It is probably Apache, which I don't know how to modify, so I would suggest using FTP like I posted above, which will get past the Apache thing. <?php $file = 'somefile.txt'; $remote_file = 'readme.txt'; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // upload a file if (ftp_put($conn_id, $remote_file, $file, FTP_BINARY)) { echo "successfully uploaded $file\n"; } else { echo "There was a problem while uploading $file\n"; } // close the connection ftp_close($conn_id); ?> Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted November 30, 2010 Share Posted November 30, 2010 if the upload is taking a long time, check max_input_time and max_execution_time. the script might stop running before the upload is done. Quote Link to comment Share on other sites More sharing options...
PeggyBuckham Posted November 30, 2010 Author Share Posted November 30, 2010 In answer to jdavidbakr The upload breaks at 2MB. 1.9MB works and 2.1MB does not. I'm pretty sure that that is the default right? So I think I will call the tec people at GoDaddy becousse that is where it is hosted. My guess is that it is not reading the php5.ini right even though the information generated from the phpinfo(); said differently. Quote Link to comment Share on other sites More sharing options...
requinix Posted December 1, 2010 Share Posted December 1, 2010 8M for the master value or the local value? The local one is what matters. But yeah, GoDaddy... Quote Link to comment Share on other sites More sharing options...
PeggyBuckham Posted December 1, 2010 Author Share Posted December 1, 2010 Problem solved Yea Godaddy. They disabled my php5.ini and now it works. I thought I had to use php5.ini instead on php.in. Not really sure about all of that just glad it works and they were really helpful Quote Link to comment 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.