xref: /PHP-5.3/ext/oci8/tests/ini_1.phpt (revision c56cfbd2)
1--TEST--
2Test OCI8 php.ini settings
3--SKIPIF--
4<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?>
5--INI--
6oci8.privileged_connect = On
7oci8.max_persistent = 111
8oci8.persistent_timeout = 222
9oci8.ping_interval = 333
10oci8.connection_class = MyCC
11oci8.events = On
12oci8.statement_cache_size = 444
13oci8.default_prefetch = 555
14oci8.old_oci_close_semantics = On
15--FILE--
16<?php
17
18echo "Test 1 - check initialization\n";
19echo 'oci8.privileged_connect = ' . ini_get('oci8.privileged_connect') . "\n";
20echo 'oci8.max_persistent = ' . ini_get('oci8.max_persistent') . "\n";
21echo 'oci8.persistent_timeout = ' . ini_get('oci8.persistent_timeout') . "\n";
22echo 'oci8.ping_interval = ' . ini_get('oci8.ping_interval') . "\n";
23echo 'oci8.connection_class = ' . ini_get('oci8.connection_class') . "\n";
24echo 'oci8.events = ' . ini_get('oci8.events') . "\n";
25echo 'oci8.statement_cache_size = ' . ini_get('oci8.statement_cache_size') . "\n";
26echo 'oci8.default_prefetch = ' . ini_get('oci8.default_prefetch') . "\n";
27echo 'oci8.old_oci_close_semantics = ' . ini_get('oci8.old_oci_close_semantics') . "\n";
28
29echo "Test 2 - check what can be changed at runtime\n";
30var_dump(ini_set('oci8.privileged_connect', 'Off'));
31echo 'oci8.privileged_connect = ' . ini_get('oci8.privileged_connect') . "\n";
32var_dump(ini_set('oci8.max_persistent', '999'));
33echo 'oci8.max_persistent = ' . ini_get('oci8.max_persistent') . "\n";
34var_dump(ini_set('oci8.persistent_timeout', '888'));
35echo 'oci8.persistent_timeout = ' . ini_get('oci8.persistent_timeout') . "\n";
36var_dump(ini_set('oci8.ping_interval', '777'));
37echo 'oci8.ping_interval = ' . ini_get('oci8.ping_interval') . "\n";
38var_dump(ini_set('oci8.connection_class', 'OtherCC'));
39echo 'oci8.connection_class = ' . ini_get('oci8.connection_class') . "\n";
40var_dump(ini_set('oci8.events', 'Off'));
41echo 'oci8.events = ' . ini_get('oci8.events') . "\n";
42var_dump(ini_set('oci8.statement_cache_size', '666'));
43echo 'oci8.statement_cache_size = ' . ini_get('oci8.statement_cache_size') . "\n";
44var_dump(ini_set('oci8.default_prefetch', '111'));
45echo 'oci8.default_prefetch = ' . ini_get('oci8.default_prefetch') . "\n";
46var_dump(ini_set('oci8.old_oci_close_semantics', 'Off'));
47echo 'oci8.old_oci_close_semantics = ' . ini_get('oci8.old_oci_close_semantics') . "\n";
48
49?>
50===DONE===
51<?php exit(0); ?>
52--EXPECTF--
53Test 1 - check initialization
54oci8.privileged_connect = 1
55oci8.max_persistent = 111
56oci8.persistent_timeout = 222
57oci8.ping_interval = 333
58oci8.connection_class = MyCC
59oci8.events = 1
60oci8.statement_cache_size = 444
61oci8.default_prefetch = 555
62oci8.old_oci_close_semantics = 1
63Test 2 - check what can be changed at runtime
64bool(false)
65oci8.privileged_connect = 1
66bool(false)
67oci8.max_persistent = 111
68bool(false)
69oci8.persistent_timeout = 222
70bool(false)
71oci8.ping_interval = 333
72string(4) "MyCC"
73oci8.connection_class = OtherCC
74bool(false)
75oci8.events = 1
76bool(false)
77oci8.statement_cache_size = 444
78bool(false)
79oci8.default_prefetch = 555
80bool(false)
81oci8.old_oci_close_semantics = 1
82===DONE===
83