[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Help on XTR and PHP



Hello Paul,
This is how you upgrade PHP on an XTR if you do it any other way you
will break the GUI.  I would say the file you overwrote was
/usr/lib/apache/libphp4.so

I have upgraded many XTR's  with no problem using the instruction
below. But I have never tried to fix one after it was done wrong.
try getting the libphp4.so file from somebody else and the redo the
upgrade using the instructions below


The usage of this article assumes an intermediate or better knowledge of Linux/UNIX

Due to the fact that the UI of the RaqXTR relies on a specific version of php to work you need to take several careful steps to get a newer version of php to work. Please follow this carefully. 

These instructions are used to install an additional version of php in /usr/local/bin rather than attempt to recompile or update the existing version.

Please also note that this has not been tested in the field and we strongly recommend that you deploy and test this on a development server before you put it into production!

All commands are to be done as root.

Retrieve & upload to /tmp on the server the following software:

The latest tarball of php from http://www.php.net
We tested with 4.1.1

The latest source rpm for cURL. Tested with 7.9.3
curl-ssl-7.9.3-1.src.rpm
Available from http://curl.haxx.se/download.html

openssl. tested with 0.9.5a 
openssl-0.9.5a-7.6.x.src.rpm Available at
ftp://ftp.redhat.com/pub/redhat/linux/updates/6.2/en/os/SRPMS

bc-1.05a-5.i386.rpm Avliable at
ftp://ftp.rpmfind.net/linux/updates/6.2/en/os/i386/RedHat/RPMS

Install the code in this order. It's important that it be done exactly as specified.

rpm -Uvh bc-1.05a-5.i386.rpm
rpm --rebuild openssl-0.9.5a-7.6.x.src.rpm
rpm -Uvh /usr/src/redhat/RPMS/i386/openssl-*.rpm
rpm --rebuild curl-ssl-7.9.3-1.src.rpm
rpm -Uvh /usr/src/redhat/RPMS/i386/curl-ssl-*.rpm
Then we explode the tarball of php
tar xzvf php-4.1.1.tar.gz
cd php-4.1.1

Now we generate the Makefile as appropriate for the RaQXTR environment

./configure --prefix=/usr --with-apxs=/usr/sbin/apxs --with-curl --with-openssl --with-png --with-regex=system --with-mysql --enable-sockets --with-xml --enable-wddx
When the configure is finished run make

DO NOT run 'make install' at this time!

The important part is next. To avoid breaking the GUI we need to move one of the default shared object libraries temporarilly

mv /usr/lib/apache/libphp4.so /usr/lib/apache/libphp4.so.bak

now we run
make install

This will put most everything in /usr/local/
it will also put a new libphp4.so in /usr/lib/apache as referanced above
cd /usr/lib/apache
mv libphp4.so libphp4.new.so
cp libphp4.so.bak libphp4.so

Now we must modify the apache config files.

cd /etc/httpd/conf/ Make a backup copy of httpd.conf 
cp httpd.conf httpd.conf.bak

With your UNIX editor of choice, change the referances to the corrcet shared object
In the #Extra Modules section, at approximately line 59, there needs to be a line at the bottom of the section that reads
LoadModule php4_module modules/libphp4.new.so

Below that, in the section labeled #make sure that this gets loaded first: the referance needs to be changed to


LoadModule php4_module     lib/apache/libphp4.new.so
To test this, we will need to create a standard php file. As an example, we will use home. First, make sure that PHP is turned on for the site in the UI. Then we need to create a file in /home/sites/home/web/, called test.php . In this file, there only needs to be one line, <? phpinfo() ?> 

You can bring this file up by browsing to the IP address of the machine followed by the file name (e.g. http://192.168.1.1/test.php).

Please note If/when engineering relases an update to php Things Will Break if you just add the patch. You MUST uninstall this software and undo your config changes before you patch!
man rpm for instructions

We have not tested this in any way other than verifying it works & it doesn't break the UI

We strongly urge thorough testing on a development platform before production deployment
This modification is not supported in any way, shape or form.
If it breaks you may keep all the pieces

If it does not work your only solution is an OS restore 


Saturday, August 17, 2002, 3:15:40 PM, you wrote:


PV> Hello All,

PV> I mistakenly upgraded the PHP on my XTR without first consulting the
PV> developer group to see who had problems with it  (oops)....

PV> Now it seems I have broken the UI.

PV> My question is:  What files were overwritten that need to be replaced with
PV> original files?

PV> My next question:   Is there anybody out there can can tar up those files
PV> for me?  I only have access to the one XTR that is screwed up, so I'm pretty
PV> much SOL on finding those files myself.

PV> I do not want to have to do a re-install of the OS.

PV> Paul Vernon
PV> paul@xxxxxxxxxxx

PV> _____________________________________
PV> cobalt-users mailing list
PV> cobalt-users@xxxxxxxxxxxxxxx
PV> To subscribe/unsubscribe, or to SEARCH THE ARCHIVES, go to:
PV> http://list.cobalt.com/mailman/listinfo/cobalt-users



-- 
Best regards,
 rdkurth                            mailto:rdkurth@xxxxxxxxxxxx