0

I am trying to set php.ini from php file, I am trying to run the following code Without success :

<?php
ini_set('session.upload_progress.prefix', 'my_progress_id_');
echo ini_get('session.upload_progress.prefix');
?>

The code I get is remaining : upload_progress_

what could be the problem

user1780343
  • 1,439
  • 2
  • 9
  • 10
  • "The best way to check if [ini_set] works is to first check the disable_functions flag in php.ini to see if it is disabled, and then (if it is not disabled), change a value with it, and echo phpinfo() immediately after. If the value is changed under the local column, then you know ini_set works." https://stackoverflow.com/a/251536/1983827 – Matthias Schmidt Jul 06 '18 at 07:47
  • i try ini_set('disable_functions', 'On'); but this not work – user1780343 Jul 06 '18 at 09:02
  • if i use print_r(ini_get_all()); [disable_functions] => Array ([local_value] => is empty – user1780343 Jul 06 '18 at 09:13

1 Answers1

0

If you cross reference the various manual pages - http://php.net/manual/en/ini.list.php which shows that session.upload_progress.prefix is settable as PHP_INI_PERDIR.

PHP_INI_PERDIR from http://php.net/manual/en/configuration.changes.modes.php...

PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3)

So this particular setting can't be changed by ini_set().

Nigel Ren
  • 56,122
  • 11
  • 43
  • 55