Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,900 questions

51,831 answers

573 users

How to get all php.ini file configuration options with PHP

2 Answers

0 votes
echo "<pre>";
print_r(ini_get_all());
echo "</pre>";


/*
run: 

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

    [allow_url_include] => Array
        (
            [global_value] => 
            [local_value] => 
            [access] => 4
        )

    [always_populate_raw_post_data] => Array
        (
            [global_value] => 0
            [local_value] => 0
            [access] => 6
        )

    [arg_separator.input] => Array
        (
            [global_value] => &
            [local_value] => &
            [access] => 6
        )

    ... 

*/

 



answered Jun 30, 2016 by avibootz
0 votes
echo "<pre>";
print_r(ini_get_all("mysql"));
echo "</pre>";


/*
run: 

Array
(
    [mysql.allow_local_infile] => Array
        (
            [global_value] => 1
            [local_value] => 1
            [access] => 4
        )

    [mysql.allow_persistent] => Array
        (
            [global_value] => 1
            [local_value] => 1
            [access] => 4
        )

    [mysql.connect_timeout] => Array
        (
            [global_value] => 60
            [local_value] => 60
            [access] => 7
        )

    [mysql.default_host] => Array
        (
            [global_value] => 
            [local_value] => 
            [access] => 7
        )

    [mysql.default_password] => Array
        (
            [global_value] => 
            [local_value] => 
            [access] => 7
        )

    [mysql.default_port] => Array
        (
            [global_value] => 
            [local_value] => 
            [access] => 7
        )

    [mysql.default_socket] => Array
        (
            [global_value] => 
            [local_value] => 
            [access] => 7
        )

    [mysql.default_user] => Array
        (
            [global_value] => 
            [local_value] => 
            [access] => 7
        )

    [mysql.max_links] => Array
        (
            [global_value] => -1
            [local_value] => -1
            [access] => 4
        )

    [mysql.max_persistent] => Array
        (
            [global_value] => -1
            [local_value] => -1
            [access] => 4
        )

    [mysql.trace_mode] => Array
        (
            [global_value] => 
            [local_value] => 
            [access] => 7
        )

)

*/

 



answered Jun 30, 2016 by avibootz

Related questions

1 answer 168 views
3 answers 196 views
1 answer 141 views
1 answer 145 views
1 answer 140 views
1 answer 123 views
1 answer 149 views
...