urtlking2jo Posted December 19, 2006 Share Posted December 19, 2006 I am using a java applet to upload files images and pdf files into a mysql database. Everything up to 1MB seems to work fine, but I need to be able to upload pdf files up to about 3MBs. I keep getting the error "Warning: fread(): supplied argument is not a valid stream resource in - [upload handler php]". From searching on the web, I found that it could be a mysql issue due to packet size limitations, but I changed my max_allowed_packet to 16M and the error continues. The server is quick, and the upload is taking under 1 minute, so I don't think anything should be timing out that quickly. Any ideas? Link to comment https://forums.phpfreaks.com/topic/31244-solved-upload-error-at-3mb-but-none-at-1mb/ Share on other sites More sharing options...
craygo Posted December 19, 2006 Share Posted December 19, 2006 change the max_execution_time in your php.ini file to more that 30 second, which is the default.Might helpray Link to comment https://forums.phpfreaks.com/topic/31244-solved-upload-error-at-3mb-but-none-at-1mb/#findComment-144556 Share on other sites More sharing options...
AV1611 Posted December 19, 2006 Share Posted December 19, 2006 or, what type of field are you using in mysql? blob? char? what size limit for the field? Link to comment https://forums.phpfreaks.com/topic/31244-solved-upload-error-at-3mb-but-none-at-1mb/#findComment-144563 Share on other sites More sharing options...
urtlking2jo Posted December 19, 2006 Author Share Posted December 19, 2006 I figured it out right before you provided this assistance. I had already upped the max_execution_time (to 60 seconds), but I raised it even more (120 seconds), and also added a copy of the php.ini file to folder in which my applet is running. I'm not sure if there is not a php.ini file in each folder if it returns to default values (which would be 30 seconds like you said). So I'm not entirely sure what the issue was, but it is working now. Thanks for you help! Link to comment https://forums.phpfreaks.com/topic/31244-solved-upload-error-at-3mb-but-none-at-1mb/#findComment-144567 Share on other sites More sharing options...
AV1611 Posted December 19, 2006 Share Posted December 19, 2006 you on winblows or linux? you should only need one copy, but you have to restart your server to activate changes Link to comment https://forums.phpfreaks.com/topic/31244-solved-upload-error-at-3mb-but-none-at-1mb/#findComment-144682 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.