Jump to content

uploading files in fragments


shane07

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.