# Multiple Apache Modules

- Thread: https://externals.io/message/45406
- Original archive: https://news-web.php.net/php.internals/45406
- Started by Chris Trahey on 2009-08-25T20:19:03+00:00
- Messages: 2
- 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

---

## #45406 — Chris Trahey — 2009-08-25T20:19:03+00:00

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

Attempting to load 2 PHP modules in the same httpd instance.
modified mod_php5.c, php_apache.h, php.sym and sapi_apache2.c
to reflect a unique module name for the second compiled .so, as well as
change the PHP_MAGIC_TYPE to something unique.
basically changing php5_module to php5UNIQUE_module
and application/x-httpd-php to application/x-UNIQUE-php

There is trouble at apache startup with both enabled, but not every time. 
Is it conceivable to have a user-defined module name(space) for loading
multiple php shared objects?

The use:
1. Load mulitple PHP modules at startup.
2. Inside virtual hosts, assign whichever php module is appropriate
3. have v-hosts that point to the same files, but use different versions
of php\
4. requests can look like this: php5-2-10.mysite.com   php5-3-0.mysite.com
 php6-0.mysite.com

Chris Trahey
Web Applications Developer
Database Administrator
CSISD [Technology]

---

## #45409 — Tjerk Anne Meesters — 2009-08-25T23:13:45+00:00

URL: https://externals.io/message/45406#45409 · In reply to: #45406

I suggest you set up multiple instances of FastCGI instead and let
your web server choose the right CGI gateway per request.


> Attempting to load 2 PHP modules in the same httpd instance.
> modified mod_php5.c, php_apache.h, php.sym and sapi_apache2.c
> to reflect a unique module name for the second compiled .so, as well as
> change the PHP_MAGIC_TYPE to something unique.
> basically changing php5_module to php5UNIQUE_module
> and application/x-httpd-php to application/x-UNIQUE-php
>
> There is trouble at apache startup with both enabled, but not every time.
> Is it conceivable to have a user-defined module name(space) for loading
> multiple php shared objects?
>
> The use:
> 1. Load mulitple PHP modules at startup.
> 2. Inside virtual hosts, assign whichever php module is appropriate
> 3. have v-hosts that point to the same files, but use different versions
> of php\
> 4. requests can look like this: php5-2-10.mysite.com   php5-3-0.mysite.com
>  php6-0.mysite.com
>
> Chris Trahey
> Web Applications Developer
> Database Administrator
> CSISD [Technology]
>
>
>


-- 
--
Tjerk
