Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24405 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95343 invoked by uid 1010); 15 Jul 2006 20:10:40 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95327 invoked from network); 15 Jul 2006 20:10:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Jul 2006 20:10:40 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; domainkeys=good DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 64.233.166.177 py-out-1112.google.com Linux 2.4/2.6 Received: from ([64.233.166.177:9066] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id E4/81-11992-DBB49B44 for ; Sat, 15 Jul 2006 16:10:39 -0400 Received: by py-out-1112.google.com with SMTP id t32so1012703pyc for ; Sat, 15 Jul 2006 13:10:35 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=XvkXfCbwEKOfjXR3LFBYfQWZJibLNHbUXAhq4ydB0YZJN6F4gkN8MgLwCspZ3w5QuTtG9VJKeAu+po07h402BuUcqXmxkSz9bzCVppDVb0lMc1FVPxBnvgTBDCE59q+S0tS8n9kdhOnOHZggLL8O438oHIqfz0/s0kEXM9lMlsQ= Received: by 10.35.123.10 with SMTP id a10mr1421505pyn; Sat, 15 Jul 2006 13:10:35 -0700 (PDT) Received: by 10.35.42.9 with HTTP; Sat, 15 Jul 2006 13:10:35 -0700 (PDT) Message-ID: <10845a340607151310od745e13gcd2f9c6137ebb68@mail.gmail.com> Date: Sat, 15 Jul 2006 21:10:35 +0100 Reply-To: RQuadling@GoogleMail.com To: internals@lists.php.net MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_46961_3713699.1152994235199" Subject: [PHP-DEV] Supporting version specific INI files as well as SAPI specific INI files. From: rquadling@googlemail.com ("Richard Quadling") ------=_Part_46961_3713699.1152994235199 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi. First up, I use windows. I do NOT use Apache. I also do not use IIS. I use Sambar Server as this fits my needs very well and is extremely easy to work with and I can get a client's intranet running in a few minutes. I'm not saying it is BETTER, just fits my requirements. Secondly, I would like to be able to use PHP4, PHP5 and PHP6 together at the same time. Preferably ISAPI rather than CGI (mainly persistent DB connections). I can currently use PHP4 (CGI) and PHP5 (ISAPI) and I can use different INI files for each (PHP4 uses php-cgi.ini, PHP5 CLI uses php-cli.ini, PHP5 ISAPI uses php-isapi.ini) and all is well. The PHP userland files have .php4 for PHP4 and .php5 for PHP5. (Though .php will also be treated as PHP5). In adding PHP6 to the mix, I have no way to create a separate INI file for PHP6. I am not able to recompile PHP (though I am looking at the MS VC++ Express Edition as this is free - any comments?). There is no mechanism of providing a specific INI file for a particular ISAPI or CGI extension within Sambar, so the extension (in this case PHP4 cgi and PHP5 isapi) will follow whatever is defined within itself to find the appropriate config file. Currently PHP can use many techniques to define the external config file name. PHP can also use many techniques to locate the file. Currently, then PHP looks for an external filename it will look for a SAPI specific version (php-cli.ini, php-isapi.ini, php-cgi.ini). If this is not found, then PHP will look for plain old, php.ini My proposal (and the attached patch) extends this to allow PHP to look for a version specific SAPI ini file. phpx-sapi.ini, where x is the version number. I've allowed upto V99. The patch will fallback to looking for the non-versioned sapi specific ini file and then onto plain old php.ini, just as before. I copied the code dealing with php-%sapi-module-name% and extended it to deal with PHP_MAJOR_VERSION. The only thing I'm not sure of is in determining the number of bytes/characters to add if emalloc's needs are different for other platforms. If the PHP_MAJOR_VERSION is less than 10 then I need to add 1 byte/character otherwise add 2 (to allow up to PHP_MAJOR_VERSION of 99). I've just downloaded via CVS the latest php-src and the patch is against /* $Id: php_ini.c,v 1.143 2006/07/04 06:38:32 dmitry Exp $ */ Regards, Richard Quadling. -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ------=_Part_46961_3713699.1152994235199--