# apache 1.3 + apache 2.2 (with PHP)



## narcotico (Jun 2, 2010)

Hello.

I need to run both versions for testing purpose.

I've got installing and running both ones (HTML without problem), but the problem is with Apache 2 and PHP lib/module.

I've installed Apache 2 with `make PREFIX=/usr/local/apache22` and I get an error with the line LoadModule ........libphp5.so.

If I copy the libphp5.so from the path that Apache 1.3 uses it I get the next error (I don't know if the file have to be the same that Apache 1.3 or I have to generate other one for Apache 2 or the cause of the error is something unknown for me):


```
httpd: Syntax error on line 105 of /usr/local/apache22/etc/apache22/httpd.conf:
Cannot load /usr/local/libexec/apache/libphp5.so into server: /usr/local/libexec/apache/libphp5.so: Undefined symbol "ap_block_alarms"
```

This message is when I changed to LoadModule pointing to Apache 1.3 lib, but copying the lib to Apache 2 directory I get the same error.

Thank you.

Sorry for my bad english.


----------



## SirDice (Jun 2, 2010)

You can't. Not like this. PHP needs to be compiled for a specific Apache version. 

However, you can run them inside a jail. One jail with apache22 and another with apache13.


----------



## PhenomII (Jun 6, 2010)

Greetings,
 Technically speaking; you can run both versions of the php driver. But this only works for
FreeBSD - won't work on Linux, and DEFINITELY now WinBlows. The reason it works w/FreeBSD is
the way LD(1) works on FreeBSD. I worked
out all the details, and started a port that would install both versions of the PHP Apache
module. But I've been too busy lately to finish. The OP is getting symbol collisions
because (s)he's trying to compile both versions of Apache, but they are both attempting
to build against the same PHP module - which won't work. I guess another option is to
define *${PREFIX}* as something *other* that the default. Then make the other
Apache module using defaults. In the case of tha Apache module with the new ${PREFIX}
define. The http(s)d.conf file would need to be modified to reflect the new (different)
location of PHP. The php.ini file would also need to be adjusted.

I wish all the details were clearer in my head right now. But I have quite a few other
issues I'm dealing with at the momment. When my mind is a little clearer, I'll come back
and provide more specific details here.

Best wishes.


----------

