Search code examples
phpuploading

Uploading files larger than allowed in servers POST settings


I'm creating a site in which user can upload his docs. Settings on server:

upload_max_filesize 2M
post_max_size 2M

The FTP uploading is unlimited.

Is there a way to allow the user upload larger files via FORM?


Solution

  • You could try by ini_set function to set the php values for upload_max_filesize at runtime. but that won't work because the variable is not setted in time so that it can really ovverride the php.ini directives.

    So, if you can't access the apache conf, you can try to set this kind of things in the .htaccess

    I'd also suggest to set the post_max_size that could help a lot.

    php_value upload_max_filesize 32M
    php_value post_max_size 32M