Questions tagged [ini-set]

The ini_set() function is used to set PHP configuration options at runtime.

ini_set is a PHP function that allows developers to set a configuration option at runtime. This is done by calling the function in any PHP script with the option name ($varname) and the value ($newvalue) to be set:

ini_set ( string $varname , string $newvalue ) : string

If the execution is successful the function returns the previously set value, otherwise it returns false. At the end of the script execution the previous value will be restored automatically.

The option name must contain a valid configuration option name. A full list of names including their default values can be found in the List of php.ini directives in the PHP Manual. Only options with the modes PHP_INI_USER or PHP_INI_ALL can be changed with ini_set(). All other options require to be changed by editing php.ini.

92 questions
-1
votes
1 answer

is it safe to use two contradictory ini_set in php?

I have a website with two distinct scripts, one requires the session.use_cookies to be 0 and the other one to be 1. For now I just took care of the first one with ini_set like this: ini_set('session.use_cookies','0'); but now I'm wondering if I set…
Arheisel
  • 186
  • 11
-3
votes
1 answer

symfony problem with ini_set() function when uploading big files

in a project created with symfony 4.4.* when uploading files i got the following error Warning: POST Content-Length of 12406038 bytes exceeds the limit of 8388608 bytes in Unknown on line 0 I can fix this by changing the upload_max_filesize and…
1 2 3 4 5 6
7