trouble to update PHP 5.1.2

Hello,

I’m trying to update my PHP 5.1.2 to PHP 5.2.0 but it don’t work.

I have used the php-5.2.0.tar.gz then ./configure, make and make install; But after then i ams till using the PHP 5.1.2.

I don’t know why? Maybe Something is missing.
**
My company site web is on a virtual machine :Linux vmgpeweb 2.6.16.46-0.12-xenpae .**

Can someone advise me about what to do?

Gudy
(French spoken person but understand English)

There isn’t enough information in your post. Most important is to know what directories it installed. Even before that, whether it created an apache module. You may have to edit apache configs or move the module to the right directory so that apache can load it.

Hello,

vmgpeweb:/ # find -name apache2
./etc/php5/apache2
./etc/sysconfig/apache2
./etc/init.d/apache2
./etc/logrotate.d/apache2
./etc/apache2
./var/lib/apache2
./var/log/apache2
./var/tmp/dirinstall/etc/sysconfig/apache2
./var/tmp/dirinstall/etc/apache2
./var/cache/apache2
./usr/lib/apache2
./usr/share/doc/packages/apache2
./usr/share/apache2
./usr/include/apache2

What is the good directory to work on and what should i do to make apache take the new php5.2.0 as default?

**Thank you **

Gudy

The question is where did the make install of php put the files that were compiled, not what directories have apache2 in the name. You have to look at the log to find out where the apache module went.

Hello,

I type this command :php -v and that’s what I see:

vmgpeweb:/ # php -v
PHP 5.2.0RC1 (cgi) (built: Dec 10 2008 15:23:28)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies

So the php 5.2.0 version is installed but my phpinfo() show me a php 5.1.2.

What can I do to have the php 5.2.0 connect with my website apache2?

Gudy

That is only the command line interpreter for PHP 5.2. For apache to run PHP 5.2, the compile step has to build an apache module and this module has to be installed in the directory where the apache server is expecting it.

You have to look at the output to the screen during the compile to see whether it actually built an apache module. You may need to provide an option to ./configure to make the build happen. Do ./configure --help to check if this is so.

Hello,

The compile is too fast for me to look at the total results but I did provide the ./configure --with-apache2=/etc/apache2 and it don’t work.
My Apache2 is stil not update to 5.2.0. still have php
5.1.2.

**Do I have to disable somethings because when restarting my apache I have a message that a php5_module is already loaded? **
Plus I have mod_php5 in LoadedModules of phpinfo()

Thank you for your help

Gudy

You can see the output of the configure in config.log or something like that. To save the output of the compile, use > to save to a file.

The compile has to build a module called mod_php5.so and replace the one in /usr/lib/apache2 (32-bit systems) or /usr/lib64/apache2 (64-bit systems). Otherwise apache will continue to use the old one.

When you see that the module has been compiled and replaced, then you should restart apache2.

Hello,

How do I compile apache, there is no ./configure file.

Do I have only to do a make and make install?

**Than your for your advise. **

Gudy

You don’t have to compile apache, you only have to compile php5 against apache to get the loadable module. However you may need the apache include files in the apache2-devel package for this. I haven’t done this for a while so I can’t swear to this detail.

hello,

excuse me for this question but what kind of files do ivhave to downlod for apache2-devel package rpm or tar.gz?
Where do I vae to place those files?
Is the the apache include files a .h or .c or something else?

**Thank you very mutch
**
Gudy

Install the apache2-devel RPM package from YaST. It should match the apache2 package you have installed on your OpenSUSE system. It is OpenSUSE, right? And still a supported version I hope, otherwise you might have trouble finding the package online.

Hello,

If I install apache2-devel RPM package with YAST don’t you think it will erase all my website?
Will it update with the new php 5.20 that I have installed with a tar.gz files(configure, make and make install).
My opensuse is a professionals SUSE 10.1(SLES or something like that)?

thank you

Gudy

No, the package only contains some include files needed to build programs that work with apache. It has no effect on any webserver configuration that you have already. After you have installed it, you have to rerun ./configure (with any apache options needed) and compile, looking out for a mod_php5.so module being created. Then put this module where apache expects to find it.

If you have SLES you should get the package from Novell’s repository as SLE* is not OpenSUSE. Have you checked already that nobody, not even a third party, offers ready-made PHP 5.2 packages for SLES10?