# Extending SAPI specific php.ini to include, at least, major version.

- Thread: https://externals.io/message/24094
- Original archive: https://news-web.php.net/php.internals/24094
- Started by Richard Quadling on 2006-06-12T13:14:02+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #24094 — Richard Quadling — 2006-06-12T13:14:02+00:00

URL: https://externals.io/message/24094#24094

Hi.

The ability to create a SAPI specific php.ini file (php-cli.ini,
php-isapi.ini, etc) for PHP5 is excellent.

This allows me to run PHP4 as CGI and PHP5 as ISAPI on the same
webserver (I use Sambar Server).

Now that I'm starting to look at PHP6, I would like to run PHP4, PHP5
AND PHP6 on the same web server (yes - I'm a greedy glutton).

But the issue of having the same php.ini for PHP5 and PHP6 (both are
php-isapi.ini) is a pain and stops me from playing with them together.

If php_ini.c (/* $Id: php_ini.c,v 1.142 2006/03/08 14:41:45 iliaa Exp
$ */) Lines 431 to 440 could be extended to include the major version
number, then we could have

php5-cli.ini, php5-isapi.ini
php6-cli.ini, php6-isapi.ini

My next issue would relate to how the webserver picks up the DLLs and
gets them into usage. Is it just on the internal function names? If
so, I think I'll have an issue here too if the names are the same -
and I can initially see no reason why they won't be the same.

Kind regards,

Richard Quadling.

-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&amp;r=213474731

---

## #24095 — D. Dante Lorenso — 2006-06-12T16:38:36+00:00

URL: https://externals.io/message/24094#24095 · In reply to: #24094

Richard Quadling wrote:
> But the issue of having the same php.ini for PHP5 and PHP6 (both are
> php-isapi.ini) is a pain and stops me from playing with them together.

Can't you just configure PHP when you compile it with the following option:

       ./configure ...
            --with-config-file-path=/path/to/php6ini/ \
            ...

Then specify your own PHP ini search path and use different ones for each
version you compile.  No changes to PHP, and your problem is solved.

Dante

---

## #24106 — Richard Quadling — 2006-06-13T08:01:06+00:00

URL: https://externals.io/message/24094#24106 · In reply to: #24095

Sorry. I forgot to mention, I'm talking about the Windows pre-compiled 
versions of PHP. With Sambar Server, only the dll is recorded. There is 
no opportunity to supply any additional parameters.

Another alternative would be to allow the single INI file have PHP5 and 
PHP6 entries.

Essentially, for me, it is the extension directory. As you cannot load a 
PHP6 extension into PHP5 or vice-versa, having to indicate which 
directory contains the extensions is important.

Sorry for the lack of info on this.

Richard.

D. Dante Lorenso wrote:
> Richard Quadling wrote:
> > […]
> 
> Can't you just configure PHP when you compile it with the following option:
> 
>       ./configure ...
>            --with-config-file-path=/path/to/php6ini/ \
>            ...
> 
> Then specify your own PHP ini search path and use different ones for each
> version you compile.  No changes to PHP, and your problem is solved.
> 
> Dante
