Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP : How to understand bitmask value of access from ini_get_all function [duplicate]

i'm start to use ini_get_all function to retrieve all configuration option on a shared host server. in the end i got this chunk of array :

[allow_call_time_pass_reference] => Array
    (
        [global_value] => 1
        [local_value] => 1
        [access] => 6
    )

[allow_url_fopen] => Array
    (
        [global_value] => 1
        [local_value] => 1
        [access] => 4
    )

The PHP manual just give descripstion :

It's possible for a directive to have multiple access levels, which is why access shows the appropriate bitmask values.

so, can anybody explain about 'access' ? ans how to understand its bitmask values ?

like image 238
justjoe Avatar asked Nov 23 '25 15:11

justjoe


1 Answers

Would you have read a little further in the "Return Value" section, you'd have found the link to the change modes and what they mean:

  • 1: PHP_INI_USER: Entry can be set in user scripts (like with ini_set()) or in the Windows registry
  • 2: PHP_INI_PERDIR: Entry can be set in php.ini, .htaccess or httpd.conf
  • 4: PHP_INI_SYSTEM: Entry can be set in php.ini or httpd.conf
  • 7: PHP_INI_ALL: Entry can be set anywhere
like image 83
zneak Avatar answered Nov 26 '25 04:11

zneak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!