Web Hosting Talk







View Full Version : Overriding static with DSO PHP


Goni
08-21-2002, 01:15 AM
Hi,
There is one apache compiled with static php4. I want to override that php4 with a DSO compiled php. The problem is that I can't compile apache from the scratch cause it has a couple of other modules builtin which I don't currently have.
Is there any way to make apache load the new libphp4.so and not to read the old mod_php4.c ?
I tried commenting the line AddModule mod_php4.c and insert a new line LoadModule php4_module libexec/libphp4.so but .. it just failed to load the new php. What could be done about it?

Naseer

achost_ca
08-21-2002, 02:41 AM
to my knowledge u cant (thats recalling a post from rasmus, one of the developers of php, on hte mailing list)

CagedTornado
08-22-2002, 01:00 AM
Ummm... this is a really bad idea. At the very least you're going to generate some asserts -- and at the worst Apache is going to core dump and fall over. The problem is that you're telling it to load the same module twice -- and in 2 different ways (and static is most likely going to win).

Dan

Goni
08-22-2002, 03:04 AM
well, seems you are correct. I tried inserting a php3 modules and also php4, started apache and it give a Segmentation Fault and exits. No other error code was generated. Seems quite funny, but I did edit the apache binary and made a couple of changes, saved the binary and it did worked. Now what I am trying to do is to make some changes to the php section and make it not to load. Seems quite difficult as the whole code is embeded into the binary.
Any experience like doing this?

Naseer