Click here to Skip to main content
15,888,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created simple html form to upload file in server. After that I have uploaded my page at shared Server. But they have set max_file_uploads and post_max_size to 16MB and they don't allow to change it due to security. I want to upload minimum 500MB to 1GB files.
I tried
PHP
ini_set('upload_max_filesize', '1024M');
    ini_set('post_max_size', '1024M');

But it don't work.
After I have tried .htaccess but it also doesn't work.
I have explored some Flash and Java Applet. but I can't use it.
I have read some articles to split large files in chunk but I can't find any working solutions.
Please someone help me to upload large files without changing php.ini file.
Posted

1 solution

upload_max_filesize and post_max_size are php.ini directives of PHP_INI_PERDIR mode which can only be set in php.ini, .htaccess, httpd.conf.
Try create a .htaccess in your web folder with the following entries:
php_value upload_max_filesize 1024M
php_value post_max_size 1024M

then, launch a php page with the following code to check the changed settings:
echo ini_get('upload_max_filesize');
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900