There is no particular secrets. This is just a reminder for myself.
So, you need to change 3 lines in your php.ini to increase maximum upload file size.
upload_max_filesize controls maximum upload file size indeed.
But you also must change post_max_size which controls POST data maximum size. File transfer uses POST, you know.
max_execution_time controls maximum execution time of php-script on server. If file would upload longer than maximum script execution time, than upload will be interrupted.
You can apply all changes with global php.ini. But your hoster never give you access to global php.ini (until you have dedicated server or VDS). Usually you have crappy upload limit of 2MB, severe system administer and absolutely no access to global php.ini. But there are other solutions.
Your hosting may allow to use custom php.ini located in your web-site home directory. You can check it out with php_info(). Look for Configuration file (php.ini) path. If it's allowed than create php.ini at your web-site folder and add necessary lines there.
Another solution is to add necessary lines into .htaccess. There is a way to do:
<IfModule mod_php5.c> ... php_value upload_max_filesize 200M php_value post_max_size 200M php_value max_execution_time = 3600 ... </IfModule>
Or you can use ini_set() function of php itself. For example with Drupal you can edit /sites/default/settings.php and add:
Comments
Post new comment