Skip to content

INI options are set to INI_ALL, but cannot be changed in runtime #56

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tony2001 opened this issue Oct 28, 2015 · 0 comments
Closed

INI options are set to INI_ALL, but cannot be changed in runtime #56

tony2001 opened this issue Oct 28, 2015 · 0 comments
Assignees

Comments

@tony2001
Copy link
Contributor

Most of the INI options (5 out of 6) used in the extension are used only once - during the extension initialisation in MINIT(). This makes it impossible to change them in runtime, despite them all being PHP_INI_ALL.
Yes, ini_set() works fine and the value is being changed, no, this value isn't used anywhere.

Here's a simple way to fix it:

@@ -106,11 +107,11 @@ zend_module_entry tarantool_module_entry = {

 PHP_INI_BEGIN()
        PHP_INI_ENTRY("tarantool.timeout"     , "10.0", PHP_INI_ALL, NULL)
-       PHP_INI_ENTRY("tarantool.retry_count" , "1"   , PHP_INI_ALL, NULL)
-       PHP_INI_ENTRY("tarantool.retry_sleep" , "0.1" , PHP_INI_ALL, NULL)
-       PHP_INI_ENTRY("tarantool.persistent"  , "1"   , PHP_INI_ALL, NULL)
-       PHP_INI_ENTRY("tarantool.deauthorize" , "0"   , PHP_INI_ALL, NULL)
        PHP_INI_ENTRY("tarantool.con_per_host", "5"   , PHP_INI_ALL, NULL)
+       STD_PHP_INI_ENTRY("tarantool.retry_count" , "1"   , PHP_INI_ALL, OnUpdateLong, retry_count, zend_tarantool_globals, tarantool_globals)
+       STD_PHP_INI_ENTRY("tarantool.retry_sleep" , "0.1" , PHP_INI_ALL, OnUpdateReal, retry_sleep, zend_tarantool_globals, tarantool_globals)
+       STD_PHP_INI_ENTRY("tarantool.persistent"  , "0"   , PHP_INI_ALL, OnUpdateBool, persistent, zend_tarantool_globals, tarantool_globals)
+       STD_PHP_INI_ENTRY("tarantool.deauthorize" , "0"   , PHP_INI_ALL, OnUpdateBool, deauthorize, zend_tarantool_globals, tarantool_globals)
 PHP_INI_END()

 #ifdef COMPILE_DL_TARANTOOL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants