Why PHP ini_set() does not work with upload_max_filesize

  • by
PHP Logo

‘upload_max_filesize’ and ‘post_max_size’ are of type PHP_INI_PERDIR, which means “Entry can be set in php.ini, .htaccess or httpd.conf”. So you can’t set it in your script.

We can set PHP_INI_PERDIR settings in a .htaccess file with ‘php_flag’ like this:

php_flag register_globals off
php_flag magic_quotes_gpc on

Leave a Reply

Your email address will not be published. Required fields are marked *