By deathgod on
Is it possible to use the ini_set() function with upload_max_filesize setting in the settings.php file? or do I have to use an .htaccess file? or chat with my host?
Example: default/settings.php
ini_set(upload_max_filesize,'250MB'); // Is this possible?
Nick
Comments
ini_set
Check out this list:
http://www.php.net/manual/en/ini.php
'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.
You might be able to, if the server admin hasn't disabled this feature. Try.
Tip: do
phpinfo()to find out what settings are in effect. I.e. which settings were set successfully.http://www.php.net/manual/en/ini.php
See the table here : http://www.php.net/manual/en/ini.php
upload_max_filesize is
PHP_INI_PERDIR(entry can be set in php.ini, .htaccess or httpd.conf) : it is not possible to change this value with ini_set().You can only use the ini_set() function when the "CHANGEABLE" value in the table is
PHP_INI_USERorPHP_INI_ALL....
ok, thank you, i'll try get it working now
------------------------------
Naruto - narutomonkey.net - Naruto Forums
Working fine for me
Yes, I have changed my setting.php ini_set("upload_max_filesize", "50M");
It is working fine for me...
Thank you much of this posting...
ini_set('upload_max_filesize'
ini_set('upload_max_filesize', '50M'); has become impossible since PHP > 4.2.3.
upload_max_filesize "2M" PHP_INI_PERDIR PHP_INI_ALL in PHP <= 4.2.3.
see http://php.net/manual/en/ini.list.php and http://www.php.net/manual/en/configuration.changes.modes.php