PHP 4.0 Bug #4683 Updated: php doesn't initialize itself properly
| From: | Bug Database | Date: | Tue, 30 May 2000 04:36:52 +0000 |
| Subject: | PHP 4.0 Bug #4683 Updated: php doesn't initialize itself properly | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-19727@lists.php.net to get a copy of this message | ||
ID: 4683
User Update by: asun@cobalt.com
Status: Open
Bug Type: Other
Description: php doesn't initialize itself properly
some more clarification: because modules are loaded in the config file
parsing stage, the lack of extensions_dir was causing problems. the
previous patch had too many side effects and looked like it was going
to take too much trouble to get right. as module loading is the
only thing that needs real values, here's a simpler patch that just deals
with that case:
--- php-4.0.0/ext/standard/dl.c.init Mon May 29 21:21:32 2000
+++ php-4.0.0/ext/standard/dl.c Mon May 29 21:26:21 2000
@@ -78,18 +78,22 @@
void php_dl(pval *file,int type,pval *return_value)
{
void *handle;
- char *libpath;
+ char *libpath, *extension_dir;
zend_module_entry *module_entry,*tmp;
zend_module_entry *(*get_module)(void);
PLS_FETCH();
ELS_FETCH();
- if (PG(extension_dir) && PG(extension_dir)[0]){
- int extension_dir_len = strlen(PG(extension_dir));
+ if (PG(extension_dir))
+ extension_dir = PG(extension_dir);
+ else
+ cfg_get_string("extension_dir", &extension_dir);
+ if (extension_dir && extension_dir[0]) {
+ int extension_dir_len = strlen(extension_dir);
libpath = emalloc(extension_dir_len+file->value.str.len+2);
- sprintf(libpath,"%s/%s",PG(extension_dir),file->value.str.val);
+ sprintf(libpath,"%s/%s",extension_dir,file->value.str.val);
} else {
libpath = estrndup(file->value.str.val, file->value.str.len);
}
Full Bug description available at: http://bugs.php.net/version4/?id=4683