cvs: php4 / configuration-parser.y
| From: | Zeev Suraski | Date: | Wed, 17 May 2000 15:41:32 +0000 |
| Subject: | cvs: php4 / configuration-parser.y | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-15125@lists.php.net to get a copy of this message | ||
zeev Wed May 17 17:41:32 2000 EDT
Modified files:
/php4 configuration-parser.y
Log:
Only allow loading of extensions only during .ini file parsing
Index: php4/configuration-parser.y
diff -u php4/configuration-parser.y:1.42 php4/configuration-parser.y:1.43
--- php4/configuration-parser.y:1.42 Sat Apr 15 16:37:28 2000
+++ php4/configuration-parser.y Wed May 17 17:41:32 2000
@@ -19,7 +19,7 @@
-/* $Id: configuration-parser.y,v 1.42 2000/04/15 14:37:28 andi Exp $ */
+/* $Id: configuration-parser.y,v 1.43 2000/05/17 15:41:32 zeev Exp $ */
#define DEBUG_CFG_PARSER 0
#include "php.h"
@@ -466,36 +466,46 @@
}
| TC_STRING { free($1.value.str.val); }
| EXTENSION '=' cfg_string {
- zval dummy;
+ if (parsing_mode==PARSING_MODE_CFG) {
+ zval dummy;
+
#if DEBUG_CFG_PARSER
- printf("Loading '%s'\n",$3.value.str.val);
+ printf("Loading '%s'\n",$3.value.str.val);
#endif
-
- php_dl(&$3,MODULE_PERSISTENT,&dummy);
+ php_dl(&$3,MODULE_PERSISTENT,&dummy);
+ }
}
| T_ZEND_EXTENSION '=' cfg_string {
+ if (parsing_mode==PARSING_MODE_CFG) {
#if !defined(ZTS) && !ZEND_DEBUG
- zend_load_extension($3.value.str.val);
+ zend_load_extension($3.value.str.val);
#endif
- free($3.value.str.val);
+ free($3.value.str.val);
+ }
}
| T_ZEND_EXTENSION_TS '=' cfg_string {
+ if (parsing_mode==PARSING_MODE_CFG) {
#if defined(ZTS) && !ZEND_DEBUG
- zend_load_extension($3.value.str.val);
+ zend_load_extension($3.value.str.val);
#endif
- free($3.value.str.val);
+ free($3.value.str.val);
+ }
}
| T_ZEND_EXTENSION_DEBUG '=' cfg_string {
#if !defined(ZTS) && ZEND_DEBUG
- zend_load_extension($3.value.str.val);
+ if (parsing_mode==PARSING_MODE_CFG) {
+ zend_load_extension($3.value.str.val);
#endif
- free($3.value.str.val);
+ free($3.value.str.val);
+ }
}
| T_ZEND_EXTENSION_DEBUG_TS '=' cfg_string {
+ if (parsing_mode==PARSING_MODE_CFG) {
#if defined(ZTS) && ZEND_DEBUG
- zend_load_extension($3.value.str.val);
+ zend_load_extension($3.value.str.val);
#endif
- free($3.value.str.val);
+ free($3.value.str.val);
+ }
}
| SECTION {
if (parsing_mode==PARSING_MODE_BROWSCAP) {