shane07 Posted June 6, 2008 Share Posted June 6, 2008 Hello I have got problem in uploading larger sized files. The server has given 'post_max_size' of 8 M I tried to change it through .htaccess file and ini_set() function, but could not succeed. And then I come to a decision to upload the files in fragments. So I want to know if it could be done with PHP scripts? Any help would be appreciable. Thank you Link to comment https://forums.phpfreaks.com/topic/108978-uploading-files-in-fragments/ Share on other sites More sharing options...
RMcLeod Posted June 6, 2008 Share Posted June 6, 2008 You need to change upload_max_filesize Link to comment https://forums.phpfreaks.com/topic/108978-uploading-files-in-fragments/#findComment-559069 Share on other sites More sharing options...
shane07 Posted June 6, 2008 Author Share Posted June 6, 2008 You need to change upload_max_filesize Unfortunately, I could not do that because I don't have the access to php.ini file I tried to change this too, from .htaccess file and ini_set() function but did not worked. Link to comment https://forums.phpfreaks.com/topic/108978-uploading-files-in-fragments/#findComment-559072 Share on other sites More sharing options...
anthonydamasco Posted June 6, 2008 Share Posted June 6, 2008 call your host and raise hell, or get a new host, uploading in pieces is just going to get you corrupt files. Or find another host and just use them as file storage. Link to comment https://forums.phpfreaks.com/topic/108978-uploading-files-in-fragments/#findComment-559112 Share on other sites More sharing options...
jonsjava Posted June 6, 2008 Share Posted June 6, 2008 I agree with anthonydamasco, but to add another option (if they don't change the php.ini for you, and you don't want to move, but you have ssh access): you can run a script from either shell_exec or by going in via ssh (if you have access), which will take your multi-part files, and rejoins them. Lets say you have 10 files: zipfile.zip.01 zipfile.zip.02 zipfile.zip.03 zipfile.zip.04 zipfile.zip.05 zipfile.zip.06 zipfile.zip.07 zipfile.zip.08 zipfile.zip.09 zipfile.zip.10 You run this script in that folder cat zipfile.zip.* > zipfile.zip and it will join all the files together, in the proper order. With that said, I agree that you should raise hell about the max file upload. Link to comment https://forums.phpfreaks.com/topic/108978-uploading-files-in-fragments/#findComment-559117 Share on other sites More sharing options...
PFMaBiSmAd Posted June 6, 2008 Share Posted June 6, 2008 Show use the setting you used in .htaccess and what were the results? Any errors? You cannot change that specific value using ini_set(). You can change it in a .htaccess file if php is running as an Apache module and the host has permitted that setting to be changed. You can change it in a local php.ini file if php is running as a CGI wrapper and the host has permitted that setting to be changed. Link to comment https://forums.phpfreaks.com/topic/108978-uploading-files-in-fragments/#findComment-559217 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.