Solved

How to change PHP used in Apache 1.3

Posted on 2012-03-26
7
485 Views
Last Modified: 2012-08-13
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
0
Comment
Question by:iamgam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 12

Accepted Solution

by:
larsrohr earned 500 total points
ID: 37769878
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
 

Author Comment

by:iamgam
ID: 37770091
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
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37770312
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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 12

Expert Comment

by:larsrohr
ID: 37772155
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
 

Author Comment

by:iamgam
ID: 37773965
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
 
LVL 12

Expert Comment

by:larsrohr
ID: 37775019
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
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 37775209
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

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question