Bug #3622: [solved] HTTP_GET/POST vars are not set.
| From: | kir at astrive dot ru | Date: | Fri, 25 Feb 2000 16:26:03 +0000 |
| Subject: | Bug #3622: [solved] HTTP_GET/POST vars are not set. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-15998@lists.php.net to get a copy of this message | ||
From: kir@astrive.ru
Operating system: Solaris 7 x86
PHP version: 3.0 Latest CVS (25/02/2000)
PHP Bug Type: Other
Bug description: [solved] HTTP_GET/POST vars are not set.
My configure line:
./configure \
--with-gd --with-oracle=/u/oracle7 \
--with-mysql \
--with-config-file-path=/h/home/www/conf \
--with-apxs=/h/home/www/bin/apxs \
--enable-debug --enable-magic-quotes=yes \
--enable-memory-limit=yes --enable-url-fopen-wrapper=no \
--enable-sysvsem=yes --enable-sysvshm=yes \
--enable-track-vars=yes --with-system-regex \
--enable-versioning --enable-safe-mode
I faced the problem when HTTP_*_VARS were no set. I dig it out and found that sometimes gpc_order
variable in php3_ini structure contains garbag like "mod_php3.c" or
"<IfModule>".
Later I found that in function
static void *php3_merge_dir(pool *p, void *basev, void *addv)
I get this garbage from basev.
So I looked at *php3_create_dir(pool * p, char *dummy)
function to find out what is wrong.
I changed code of this function to make it more understanable and (IMHO)
more correct.
So, here is my version of this function (all stuff related to mod_php3.c):
/*
* Create the per-directory config structure with defaults from php3_ini_master
*/
static void *php3_create_dir(pool * p, char *dummy)
{
php3_ini_structure *new;
static int first_time = 1;
php3_module_startup();
new = (php3_ini_structure *) palloc(p, sizeof(php3_ini_structure));
memcpy(new,&php3_ini_master,sizeof(php3_ini_structure));
return new;
}