Page 1 of 1
Running both PHP4 and PHP5?
Posted: Tue Dec 14, 2004 2:27 pm
by cormander
I've tried running both, but so far no luck.
I'm thinking this logically will work, but havn't actually been able to do it yet.
Build PHP5 to create some of its files as follows:
/usr/bin/php5
/etc/php5.ini
/usr/lib/httpd/modules/libphp5.so
/etc/httpd/conf.d/php5.conf
The goal here is to not conflict with any php4 files, and to only load .php5 extnetions with PHP5, so httpd will start up loading both.
Anywone got words?
-Corey
Posted: Tue Dec 14, 2004 2:56 pm
by scott
yep thats how my php5 rpm is set up, although I didnt try and get it working with 4 at the same time. Rough guess but I'd say you're going to run into php.ini issues (thats where you set the module paths) trying to run both together.
Posted: Tue Dec 14, 2004 3:00 pm
by cormander
Am I wrong to think that php5 files read the php5.ini and ignore the php.ini , and vise virsa?
I haven't been able to find any php5 rpms of yours, could you direct me to them? Preferably for fedora, and if possible have the src rpm as well.
I'll see if I can get them to work off of what you've already done.
-Corey
Posted: Tue Dec 14, 2004 3:11 pm
by scott
It uses php.ini, but Im sure with some hacking you can change it. The src.rpms are in the 3es.atomicrocketturtle.com/packages/ (linked at the bottem of every download page)
Specifying an alternate INI file location
Posted: Thu Dec 16, 2004 12:29 pm
by hotgazpacho
This can be done in the Apache httpd.conf file, using the PHPIniDir directive.
For example,
This works with PHP 4.3 and 5.
The only problem is that you can only specifiy one PHPIniDir directive, thus you cannot run PHP 4 and 5 simultaneously with both as modules using this method.
I don't think it is possible to run more than one PHP version and have them all be modules. The only way I have heard of so far is to run one as a module and the other(s) as a CGI interpreter.