Quantcast
Channel: BulletProof Security Forum » All Posts
Viewing all articles
Browse latest Browse all 12486

Reply To: php ini_set function vs php.ini file directives

$
0
0

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

Where a configuration setting may be set

These modes determine when and where a PHP directive may or may not be set, and each directive within the manual refers to one of these modes. For example, some settings may be set within a PHP script using ini_set(), whereas others may require php.ini or httpd.conf.

For example, the output_buffering setting is PHP_INI_PERDIR therefore it may not be set using ini_set(). However, the display_errors directive is PHP_INI_ALL therefore it may be set anywhere, including with ini_set().

The allow_url_fopen directive can only be set in a php.ini file or the httpd.conf file.
The memory_limit directive can be set using ini_set, BUT that only affects the directory where ini_set is used AND it cannot really actually affect the memory_limit setting for the server in a php.ini file or the httpd.conf file.  Example:  If the memory_limit setting is 256M in an ini_set function and the server memory_limit setting is 128M then the actual real PHP Configuration memory limit is 128M and not 256M.

  • This reply was modified 11 hours, 39 minutes ago by  AITpro Admin.

Viewing all articles
Browse latest Browse all 12486

Trending Articles