Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19129 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40552 invoked by uid 1010); 22 Sep 2005 16:14:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 40537 invoked from network); 22 Sep 2005 16:14:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Sep 2005 16:14:25 -0000 X-Host-Fingerprint: 64.4.204.18 unknown Linux 2.4/2.6 Received: from ([64.4.204.18:44076] helo=mail.toddesposito.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id D5/5A-24510-068D2334 for ; Thu, 22 Sep 2005 12:14:24 -0400 Received: from mail.toddesposito.com (localhost [127.0.0.1]) by mail.toddesposito.com (Postfix) with ESMTP id 5E6906E777 for ; Thu, 22 Sep 2005 11:14:21 -0500 (CDT) Received: from 67.184.68.1 (SquirrelMail authenticated user todd@toddesposito.com); by mail.toddesposito.com with HTTP; Thu, 22 Sep 2005 11:14:21 -0500 (CDT) Message-ID: <35725.67.184.68.1.1127405661.squirrel@67.184.68.1> Date: Thu, 22 Sep 2005 11:14:21 -0500 (CDT) To: internals@lists.php.net Reply-To: Todd@ToddEsposito.com User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: on-the-fly changes to php.ini values? From: Todd@ToddEsposito.com ("Todd D. Esposito") Hello! I'm working on an Apache2 module which pulls vhost info from LDAP, and I've got it all knocked out save one really important feature: I need to be able to change the open_basedir on a per-vhost basis, but obviously, NOT via php_admin_value in the configuration file(s), since each vhost is loaded dynamically from LDAP data. I dug around a bit and found the zend_alter_ini_entry function, the prototype of which, at least, looked really promising. However, it always returns FAILURE for me. I've tried every combination of mod_type. I went and copied the source for zend_alter_ini_entry directly into my module, which let me determine that the call to zend_find_hash() is what's failing. So this leads me to believe zend_alter_ini_entry isn't really what I need to do this. I also poked around in the per-dir configuration handler (sapi/apache2handler/apache_config.c:merge_php_config), but that hasn't shed enough light on the problem for me to just jump in and start hacking away at the php module config data block. So, my question is: is there a programmatic way, via some function call or procedure, to alter PHP's runtime configuration as I describe above? Thanks and further details forthcoming to anyone who can lend a hand. Todd D. Esposito