How to change PHP used in Apache 1.3

Hi Experts,

We currently have 2 Apache instances running on a Solaris box. One of the instances is Apache 1.3 and is used by Interwoven's Teamsite CMS. In it's httpd.conf file the PHP load directive is:

LoadModule php5_module           /usr/apache/libexec/libphp5.so

Within Teamsite, when we run info.php we get returned (partly):

'./configure' '--prefix=/opt/wts/php5.2.4' '--with-config-file-path=/opt/wts/php5.2.4/lib' '--with-apxs=/usr/apache/bin/apxs'

What we want is for the Teamsite Apache to use the same PHP as the other Apache on the box which has as its load directive:

LoadModule php5_module modules/libphp5.so

where modules is under /opt/coolstack/apache2/  and some config info is:

./configure' '--with-apxs2=/opt/coolstack/apache2/bin/apxs' '--prefix=/opt/coolstack/php5'

We have tried just adding the full path to the Coolstack php in the Teamsite Apache conf viz:

LoadModule php5_module /opt/coolstack/apache2/modules/libphp5.so

but on a config test (after a restart) this gives:

# /usr/apache/bin/apachectl configtest
Syntax error on line 200 of /etc/apache/httpd.conf:
Cannot load /opt/coolstack/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal: relocation error: file /opt/coolstack/apache2/modules/libphp5.so: symbol apr_pool_cleanup_null: referenced symbol not found
#

So - my question is, how do we get the Teamsite Apache (1.3) to use the CoolStack PHP?(Both versions of PHP are 5.2.4).

Thanks in advance,

GAM
iamgamAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

larsrohrCommented:
In short, I don't think you can.

PHP is loaded as a Dynamic Shared Object (DSO) in your configs, but your two libphp5.so modules are compiled against different apache runtime libraries, so they're not really interchangeable.  A php DSO should be compiled against the apache it will be used with.

For Teamsite, /usr/apache/libexec/libphp5.so has been compiled using the apxs from apache 1.3, thus using the older apache 1.3 libraries.

For Coolstack, /opt/coolstack/apache2/modules/libphp5.so has been compiled using a newer apxs, and apache 2.x libraries.

The older Teamsite apache 1.3 cannot load the php module compiled for a newer apache 2.x.  See also this info about apxs on apache.org

I'm guessing that you have both apache instances installed from solaris packages -- that you haven't tried recompiling Coolstack, for instance?

Why do you want to use the same PHP for both apache instances?  What's the motivation?
It may be possible to recompile your PHP modules with additional options, for instance, but it may not be worth the trouble.  If there's just a few specific option differences, it may be possible to install some additional SUNW packages to account for them.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
iamgamAuthor Commented:
Hi - thanks for your response. The reason the client want the same PHP used is to eliminate any discrepancies between previewing the content in the CMS (v 1.3) and viewing it the actual site (Apache 2). I suppose the best we could do would be to try & get an earlier version of Coolstack & try loading that against the Teamsite Apache? Is that what you mean?

GAM
0
Dave BaldwinFixer of ProblemsCommented:
If you can, you should just use a different virtual directory and site in the 'production' server instead of running two different servers.  That would make everything the same.
0
The Five Tenets of the Most Secure Backup

Data loss can hit a business in any number of ways. In reality, companies should expect to lose data at some point. The challenge is having a plan to recover from such an event.

larsrohrCommented:
Totally agree with Dave.
Unless you have something running that specifically requires your apache 1.3 setup, just let the newer Coolstack setup handle it as a virtual host.  Whether your current setup has the two apache versions listening on different ports or as different IP addresses, you can still do that using virtual hosts.

Virtual host examples on apache.org:  http://httpd.apache.org/docs/2.2/vhosts/examples.html
0
iamgamAuthor Commented:
Thanks guys - but Teamsite requires Apache 1.3 (why would you have 2 instances of different versions on the same server if one of them *wasn't* required?).

Thanks again - solution accepted now.

GAM
0
larsrohrCommented:
Happy to help, and sorry you have to stick with 1.3.
Go ahead and select an answer (or two...) when you're ready, or let us know if further clarification is needed.
0
Dave BaldwinFixer of ProblemsCommented:
Why?  We did have a question last week about installing a second copy of Apache so they could simply have a second web site.  They didn't know that you could have more than one site on a single copy of Apache.  And until you said that "Teamsite requires Apache 1.3", I didn't know that.

I think at one time I had two copies of Apache plus IIS on one machine because some other software (HP print manager was one) installed them on different ports as part of their software.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.