Re: [patch 4.0.2] php_extension
| From: | Zeev Suraski | Date: | Tue, 29 Aug 2000 21:58:10 +0000 |
| Subject: | Re: [patch 4.0.2] php_extension | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-31132@lists.php.net to get a copy of this message | ||
There's no current way to do this, but it should be possible to do it generically. We'll look into it for 4.0.3.
Zeev
At 00:09 30/08/2000, Doug MacEachern wrote:
php_value does not work for the `extension' php directive. even if it did, from what i can see php_value's are not applied until request time, extensions should be loaded at startup time. i want to use httpd.conf for extension config and leave php.ini/PHPRC alone, is there another way to do that? if not, this patch adds a php_extension directive to solve the problem. --- mod_php4.c~ Sun Aug 20 07:29:00 2000 +++ mod_php4.c Tue Aug 29 13:59:11 2000 @@ -568,10 +568,8 @@ } -CONST_PREFIX char *php_apache_value_handler_ex(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2, int mode) +static void php_apache_pre_init_check(void) {-- Zeev Suraski <zeev@zend.com> http://www.zend.com/- php_per_dir_entry per_dir_entry;-if (!apache_php_initialized) { apache_php_initialized = 1;#ifdef ZTS @@ -580,6 +578,14 @@sapi_startup(&sapi_module_conf); php_apache_startup(&sapi_module_conf); }+} + +CONST_PREFIX char *php_apache_value_handler_ex(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2, int mode) +{+ php_per_dir_entry per_dir_entry;++ php_apache_pre_init_check();+per_dir_entry.type = mode;if (strcasecmp(arg2, "none") == 0) {@@ -640,6 +646,16 @@return php_apache_flag_handler_ex(cmd, conf, arg1, arg2, PHP_INI_SYSTEM);} +CONST_PREFIX char *php_apache_extension_handler(cmd_parms *cmd, void *conf, char *module) +{+ pval file, return_value; + file.value.str.val = module; + file.value.str.len = strlen(module); + php_apache_pre_init_check(); + php_dl(&file, MODULE_PERSISTENT, &return_value); + return NULL;+} + @@ -766,6 +782,7 @@{"php_flag", php_apache_flag_handler, NULL, OR_OPTIONS, TAKE2, "PHP Flag Modifier"}, {"php_admin_value", php_apache_admin_value_handler, NULL, ACCESS_CONF|RSRC_CONF, TAKE2, "PHP Value Modifier (Admin)"}, {"php_admin_flag", php_apache_admin_flag_handler, NULL, ACCESS_CONF|RSRC_CONF, TAKE2, "PHP Flag Modifier (Admin)"}, + {"php_extension", php_apache_extension_handler, NULL, ACCESS_CONF|RSRC_CONF, TAKE1, "PHP Extension"}, {NULL}}; -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net