Re: [PHP-DEV] Setting PHP module values in C

2003-08-14 Thread Mark Morley
> zend_alter_ini_entry("open_basedir", sizeof("open_basedir"), newvalue, > strlen(newvalue), PHP_INI_USER, PHP_INI_STAGE_RUNTIME) Ah, perfect. Thanks! Mark -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Setting PHP module values in C

2003-08-14 Thread Mark Morley
I'm writing an Apache module and I'd like to be able to dynamically change some of PHP's settings from within this module. Mainly I need to be able to change the current open_basedir value, although there are others as well. Is there a function call or code sequence that will let me change values

[PHP-DEV] Scope of zend_alter_ini_entry in Apache module?

2003-08-14 Thread Mark Morley
In the custom mass hosting module I'm working on I make calls to zend_alter_ini_entry (thanks Uwe!) to dynamically change PHP settings for each virtual host. Works great, but I'm wondering about the scope of this function. If I change a setting, does that change only affect the current request, o

Re: [PHP-DEV] Scope of zend_alter_ini_entry in Apache module?

2003-08-15 Thread Mark Morley
> It's supposed to change it only for the life of the current request. I'm > saying 'supposed' because there have been sporadic reports about this not > working properly, and changes that 'leak' and somehow persist across > requests. I still haven't been able to see that in my own eyes, though :I

[PHP-DEV] Overriding $DOCUMENT_ROOT in an Apache Module

2003-09-24 Thread Mark Morley
I'm working on a custom mass hoting Apache module. I need to be able to set the $DOCUMENT_ROOT value on a per request basis. That is, I'd like to be able to set it in my module before the clients' scripts run (similar to how I use zend_alter_ini_entry to alter ini values). I've tried using Apach

Re: [PHP-DEV] Overriding $DOCUMENT_ROOT in an Apache Module

2003-09-24 Thread Mark Morley
> This doesn't really have anything to do with PHP. You are writing an > Apache module. You simply have to change the doc_root before Apache gets > to the content handling phase of the request_rec. And to change the > doc_root I think you'd just fiddle with conf->ap_document_root and it > should

Re: [PHP-DEV] Overriding $DOCUMENT_ROOT in an Apache Module

2003-09-25 Thread Mark Morley
> Then your not setting it correctly via your apache module. Actually I am setting it correctly, but as you say... > FYI - If you using apache 1.3.x you CANNOT reset document > root. DOCUMENT_ROOT is set at a low level of initial child request > startup. Your third party module isnt at a low enou

Re: [PHP-DEV] Overriding $DOCUMENT_ROOT in an Apache Module

2003-09-25 Thread Mark Morley
> Care sharing what you did to fix it? On or offlist is fine. > > Jeremy Probably the same thing that the other fellow wound up doing. In src/main/util_script.c Apache explicitly adds a new DOCUMENT_ROOT value (among others) to the environment table. This effectively wipes out any DOCUMENT_ROOT