Unstoppable Domains

HELP - PHP file upload

Spaceship Spaceship
Watch

Ik

Quality //VIP Member
Impact
8
I need your help, guys

I have a PHP-based system that allows users to upload files through a web page. The client wants to be able to upload up to 25MB while PHP restricts uploads to 2MB. What can I do if:

1- I have access to php.ini
2- I don't have access to php.ini

I appreciate your quick response.
Thanks
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
If you do have access to php.ini find:
Code:
upload_max_filesize
Change that value from 2MB to 25MB.

If you don't have access to php.ini you could try htaccess:
  1. Create a .htaccess file
  2. Insert:
    Code:
    php_value upload_max_filesize 25MB
    into your .htaccess file
  3. Upload it to the root of your site

From experience depending on how the hosting is setup the htaccess method doesn't work 100% of the time so i'd change php.ini if you can.
 
0
•••
If you do have access to php.ini find:
Code:
upload_max_filesize
Change that value from 2MB to 25MB.

If you don't have access to php.ini you could try htaccess:
  1. Create a .htaccess file
  2. Insert:
    Code:
    php_value upload_max_filesize 25MB
    into your .htaccess file
  3. Upload it to the root of your site

From experience depending on how the hosting is setup the htaccess method doesn't work 100% of the time so i'd change php.ini if you can.

Thanks for the reply. Can I set the upload_max_filesize to any number? let's say 100MB?
 
0
•••
To be honest if you are uploading files that large it would be better to find an alternative solution.

Trying to send a 100 meg file could become quite annoying for users if the upload fails as they would have to start from the beginning again.
 
0
•••
To be honest if you are uploading files that large it would be better to find an alternative solution.

Trying to send a 100 meg file could become quite annoying for users if the upload fails as they would have to start from the beginning again.

Thanks Peter. Do you suggest a solution??
 
0
•••
Thanks for the reply. Can I set the upload_max_filesize to any number? let's say 100MB?

You can indeed although as Peter mentioned the upload would obviously take longer. You could still use PHP however, you would have to raise the Timeout in Apache (google it ;) ) And I would also reccomend using Ajax to give some progress on the upload for the user. Just typing it in on google it came up with this:
PHP AJAX example: asynchronous file upload - AnyExample.com

Hope that gets you going in the right direction!
 
0
•••
Thank you everyone :)
 
0
•••
Thanks Peter. Do you suggest a solution??

That really depends on the scanriao to be honest. Why are such large files being uploaded.

Is it possible to lower the size of the files (for example a 100meg text file will zip to smething that could be closer to 10-20 meg depending on the content of course.

Is it only certain clients that will be uploading? if so a better alterrnative might just be to give them a temporary ftp account which uploads to a specific folder for them. This has the added benefit that if the upload stalls half way through they can continue instead of starting from the beginning.
 
0
•••
That really depends on the scanriao to be honest. Why are such large files being uploaded.

Is it possible to lower the size of the files (for example a 100meg text file will zip to smething that could be closer to 10-20 meg depending on the content of course.

Is it only certain clients that will be uploading? if so a better alterrnative might just be to give them a temporary ftp account which uploads to a specific folder for them. This has the added benefit that if the upload stalls half way through they can continue instead of starting from the beginning.

Hi Peter,

This is for an mp3-shop admin. He wants to be able to upload large files through the web. I suggested the FTP idea to him, but he insists on using a web form to upload his files :tu:
 
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back