For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > March 2004 > Re: [PHP-INSTALL] Upgrading PHP 4.3.1 to PHP 4.3.4









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-INSTALL] Upgrading PHP 4.3.1 to PHP 4.3.4
Chris Hewitt

2004-03-26, 11:23 pm

MJ wrote:

> Hi,
>
> I have been given a task by my management to upgrade PHP 4.3.1 to PHP
> 4.3.4 on a RedHat Linux 7.0 which has apache and Mysql. The guy who
> had installed and was managing is no more with us. I don't have any
> idea about how it was installed and in which mode. Any help will be
> appreciated.
>
>
>
> MJ
>

I'd take a copy of php.ini. Then put a phpinfo.php file in you document
root (with "<?php phpinfo(); ?>" in it) and look at it with your
browser. At the top will be all the configure options used. Use the same
options for your php 4.3.4.

If possible, I suggest you use an rpm for RH7 to install it, but as
RH7.0 really is old now there may not be one available. If possible, I'd
be tempted to upgrade/reinstall RH too to get all the security updates.

HTH
Chris

HTH
Chris
Mj

2004-03-26, 11:23 pm

Hi Chris,
Many thanks for your prompt response.No response received yet so again
subscribed.

Actually upgrade linux is not possible immediately. I can work on it later
on. Phpinfo.php is giving this info. Can you you tell me an start point so
that i can start to upgrade.
MJ

PHP Version 4.3.1

System Linux dwb 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000
i686
Build Date Apr 9 2003 15:39:04
Configure Command './configure' '--with-mysql=/usr/local/'
'--with-config-file-path=/web/conf' '--with-apache=../apache_1.3.27/'
'--enable-track-vars'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /web/conf/php.ini
PHP API 20020918
PHP Extension 20020429
Zend Extension 20021010
Debug Build no
Thread Safety disabled
Registered PHP Streams php, http, ftp




----- Original Message -----
From: "Chris Hewitt" <g0pae@manordat.demon.co.uk>
To: "MJ" <php@cyberia.net.sa>
Cc: <php-install@lists.php.net>
Sent: Wednesday, March 24, 2004 11:17 AM
Subject: Re: [PHP-INSTALL] Upgrading PHP 4.3.1 to PHP 4.3.4


> MJ wrote:
>
> I'd take a copy of php.ini. Then put a phpinfo.php file in you document
> root (with "<?php phpinfo(); ?>" in it) and look at it with your
> browser. At the top will be all the configure options used. Use the same
> options for your php 4.3.4.
>
> If possible, I suggest you use an rpm for RH7 to install it, but as
> RH7.0 really is old now there may not be one available. If possible, I'd
> be tempted to upgrade/reinstall RH too to get all the security updates.
>
> HTH
> Chris
>
> HTH
> Chris
>
>
>


----- Original Message -----
From: "Chris Hewitt" <g0pae@manordat.demon.co.uk>
To: "MJ" <php@cyberia.net.sa>
Cc: <php-install@lists.php.net>
Sent: Wednesday, March 24, 2004 11:17 AM
Subject: Re: [PHP-INSTALL] Upgrading PHP 4.3.1 to PHP 4.3.4


> MJ wrote:
>
> I'd take a copy of php.ini. Then put a phpinfo.php file in you document
> root (with "<?php phpinfo(); ?>" in it) and look at it with your
> browser. At the top will be all the configure options used. Use the same
> options for your php 4.3.4.
>
> If possible, I suggest you use an rpm for RH7 to install it, but as
> RH7.0 really is old now there may not be one available. If possible, I'd
> be tempted to upgrade/reinstall RH too to get all the security updates.
>
> HTH
> Chris
>
> HTH
> Chris
>
>
>

Chris Hewitt

2004-03-26, 11:23 pm

MJ wrote:

>Hi Chris,
>Many thanks for your prompt response. I was getting 10 messages in a minute
>therefore i unsubscribed my address from the list that's why I am writing
>you to directly, if you don't like this please do let me know and I will not
>send any more messge.
>
>Actually upgrade linux is not possible immediately. I can work on it later
>on. Phpinfo.php is giving this info. Can you you tell me an start point so
>that i can start to upgrade.
>MJ
>PHP Version 4.3.1
>
> System Linux dwb 2.2.16-22smp #1 SMP Tue Aug 22 16:39:21 EDT 2000
>i686
> Build Date Apr 9 2003 15:39:04
> Configure Command './configure' '--with-mysql=/usr/local/'
>'--with-config-file-path=/web/conf' '--with-apache=../apache_1.3.27/'
>'--enable-track-vars'
> Server API Apache
> Virtual Directory Support disabled
> Configuration File (php.ini) Path /web/conf/php.ini
> PHP API 20020918
> PHP Extension 20020429
> Zend Extension 20021010
> Debug Build no
> Thread Safety disabled
> Registered PHP Streams php, http, ftp
>

As you are not using apxs (look in the php manual for this) it looks
like your installation is not an apache DSO module but compiled into
Apache itself. If you use the same configure command for PHP then you
will need to recompile apache too. My experience with php begins with
RH7.2 but the above does not look like a normal RH installation of PHP.

If you do a "httpd -l" (that is the letter "l") as root and it shows
"mod_so.c" then apache is compiled to use modules and you could chose to
compile PHP as a module. If it does not then you will need to recompile
Apache.

Regards

Chris
Mj

2004-03-26, 11:23 pm

Dear Chris,
I did httpd -l and it shows "mod_so.c". Now I just need to install PHP 4.3.4
as a normal new fresh install ( './configure' '--with-mysql=/usr/local/'
'--with-config-file-path=/web/conf' '--with-apache=../apache_1.3.27/'
'--enable-track-vars') and that's it , no need to recompile apache and
mysql?

Many thanks
MJ

----- Original Message -----
From: "Chris Hewitt" <g0pae@manordat.demon.co.uk>
To: "MJ" <php@cyberia.net.sa>; <php-install@lists.php.net>
Sent: Thursday, March 25, 2004 11:09 AM
Subject: Re: [PHP-INSTALL] Upgrading PHP 4.3.1 to PHP 4.3.4


> MJ wrote:
>
minute[color=darkred]
not[color=darkred]
later[color=darkred]
so[color=darkred]
> As you are not using apxs (look in the php manual for this) it looks
> like your installation is not an apache DSO module but compiled into
> apache itself. If you use the same configure command for PHP then you
> will need to recompile apache too. My experience with php begins with
> RH7.2 but the above does not look like a normal RH installation of PHP.
>
> If you do a "httpd -l" (that is the letter "l") as root and it shows
> "mod_so.c" then apache is compiled to use modules and you could chose to
> compile PHP as a module. If it does not then you will need to recompile
> Apache.
>
> Regards
>
> Chris
>

Chris Hewitt

2004-03-26, 11:23 pm

My post at the bottom:
MJ wrote:
[color=darkred]
>Dear Chris,
>I did httpd -l and it shows "mod_so.c". Now I just need to install PHP 4.3.4
>as a normal new fresh install ( './configure' '--with-mysql=/usr/local/'
>'--with-config-file-path=/web/conf' '--with-apache=../apache_1.3.27/'
>'--enable-track-vars') and that's it , no need to recompile apache and
>mysql?
>
>Many thanks
>MJ
>
>----- Original Message -----
>From: "Chris Hewitt" <g0pae@manordat.demon.co.uk>
>To: "MJ" <php@cyberia.net.sa>; <php-install@lists.php.net>
>Sent: Thursday, March 25, 2004 11:09 AM
>Subject: Re: [PHP-INSTALL] Upgrading PHP 4.3.1 to PHP 4.3.4
>
>
>minute
>
>not
>
>later
>
>so
>
As apache has mod_so.c it means that apache can use modules (so there is
no need to recompile Apache). In order to get PHP to compile as a
module, you need to compile it with "--with-apxs" or "--with-apxs2"
for apache 2. You will need the path to apxs. Look in the manual for the
exact configuration options or do "./configure --help". "locate apxs"
should tell you where apxs is located.

HTH
Chris
Mj

2004-03-27, 11:55 pm

Hi,
As per the phpinfo.php the original installation was with "./configure'
'--with-mysql=/usr/local/' '--with-config-file-path=/web/conf'
'--with-apache=../apache_1.3.27/' '--enable-track-vars' , now adding new
thing "--with-apxs" will not effect the exiting sites? As I have several
live sites running on this server.

Many Thanks,
MJ
----- Original Message -----
From: "Chris Hewitt" <g0pae@manordat.demon.co.uk>
To: "MJ" <php@cyberia.net.sa>
Cc: <php-install@lists.php.net>
Sent: Friday, March 26, 2004 11:38 AM
Subject: Re: [PHP-INSTALL] Upgrading PHP 4.3.1 to PHP 4.3.4


> My post at the bottom:
> MJ wrote:
>
4.3.4[color=darkred]
writing[color=darkred]
will[color=darkred]
> As apache has mod_so.c it means that apache can use modules (so there is
> no need to recompile Apache). In order to get PHP to compile as a
> module, you need to compile it with "--with-apxs" or "--with-apxs2"
> for apache 2. You will need the path to apxs. Look in the manual for the
> exact configuration options or do "./configure --help". "locate apxs"
> should tell you where apxs is located.
>
> HTH
> Chris
>

Chris Hewitt

2004-03-27, 11:55 pm

MJ wrote:

>Hi,
>As per the phpinfo.php the original installation was with "./configure'
>'--with-mysql=/usr/local/' '--with-config-file-path=/web/conf'
>'--with-apache=../apache_1.3.27/' '--enable-track-vars' , now adding new
>thing "--with-apxs" will not effect the exiting sites? As I have several
>live sites running on this server.
>
>Many Thanks,
>MJ
>

If the original configuration did not use apxs then it was compiled into
Apache httpd, not as a module. In this case you will need to recompile
Apache httpd too, or it will continue to use the older version.

As with all things, it is best to try out changes on a test/development
server and not live, just in case something does not go right.

HTH
Chris
Mj

2004-03-27, 11:55 pm

HI Chris,
Is it possible to switch now from Static to Dynamic Mode? in this case
installation of PHP with apxs will be enough or in any case I need to
recompile Apache. I have gone through several sites and now I assumes that
even I am running PHP in static mode, once I will upgrade PHP with apxs it
will be configured as dynamic and no changes will be required to apache. am
I right?

Thanks for your continuous help

MJ

----- Original Message -----
From: "Chris Hewitt" <g0pae@manordat.demon.co.uk>
To: "MJ" <php@cyberia.net.sa>
Cc: <php-install@lists.php.net>
Sent: Saturday, March 27, 2004 3:27 PM
Subject: Re: [PHP-INSTALL] Upgrading PHP 4.3.1 to PHP 4.3.4


> MJ wrote:
>
> If the original configuration did not use apxs then it was compiled into
> apache httpd, not as a module. In this case you will need to recompile
> apache httpd too, or it will continue to use the older version.
>
> As with all things, it is best to try out changes on a test/development
> server and not live, just in case something does not go right.
>
> HTH
> Chris
>
>

Chris Hewitt

2004-03-27, 11:55 pm

MJ wrote:

>HI Chris,
>Is it possible to switch now from Static to Dynamic Mode? in this case
>installation of PHP with apxs will be enough or in any case I need to
>recompile Apache. I have gone through several sites and now I assumes that
>even I am running PHP in static mode, once I will upgrade PHP with apxs it
>will be configured as dynamic and no changes will be required to apache. am
>I right?
>
>Thanks for your continuous help
>
>MJ
>

Yes, as you have mod_so there it is. You then do not need to recompile
Apache httpd. You will need to put the resulting php compiled module
(libphp4.so) into the right directory and edit your httpd.conf file to
get httpd to parse php files.

If you look in httpd.conf for LoadModule lines you can see where your
httpd server expects modules to be. In the INSTALL file in your php
source directory are instructions for adding the AddType, LoadModule and
AddModule lines as necessary. Note this is slightly different if you
have an apache httpd V2 rather than V1.3.x version. The archives of this
list will also have this explained (several times I would think).

Regards

Chris
Mj

2004-03-28, 10:17 pm

Thanks, here is the steps what I have done , and in the end sucked. Please
have a look and advise.
----------------------------------------------------------------------------
-----------------------------
# httpd -l

Compiled-in modules:
http_core.c
mod_so.c
suexec: disabled; invalid wrapper /usr/sbin/suexec


# find / -name apxs -print

/usr/local/etc/httpd/bin/apxs

#./configure --with-mysql=/usr/local/ --with-config-file-path=/web/conf/ --w
ith-apxs=/usr/local/etc/httpd/bin/apxs --enable-track-vars

Sorry, I was not able to successfully run APXS. Possible reasons:

1. Perl is not installed;
2. apache was not compiled with DSO support (--enable-module=so);
3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs
The output of /usr/local/etc/httpd/bin/apxs follows
apxs:Error: Sorry, no DSO support for apache available
apxs:Error: under your platform. Make sure the Apache
apxs:Error: module mod_so is compiled into your server
apxs:Error: binary `/usr/local/etc/httpd/bin/httpd'.
configure: error: Aborting
----------------------------------------------------------------------------
---

I don't know apache was compiled with DSO support or no but when I run
"httpd -l", output shown "mod_so.c" is included in the list. Perl is also
available.
In case apache was not compiled with DSO who can I recomile it now without
effecting my all virtual hosts (live customers sites).

Many Thanks.
MJ.
----- Original Message -----
From: "Chris Hewitt" <g0pae@manordat.demon.co.uk>
To: "MJ" <php@cyberia.net.sa>
Cc: <php-install@lists.php.net>
Sent: Saturday, March 27, 2004 9:44 PM
Subject: Re: [PHP-INSTALL] Upgrading PHP 4.3.1 to PHP 4.3.4


> MJ wrote:
>
that[color=darkred]
it[color=darkred]
am[color=darkred]
> Yes, as you have mod_so there it is. You then do not need to recompile
> apache httpd. You will need to put the resulting php compiled module
> (libphp4.so) into the right directory and edit your httpd.conf file to
> get httpd to parse php files.
>
> If you look in httpd.conf for LoadModule lines you can see where your
> httpd server expects modules to be. In the INSTALL file in your php
> source directory are instructions for adding the AddType, LoadModule and
> AddModule lines as necessary. Note this is slightly different if you
> have an apache httpd V2 rather than V1.3.x version. The archives of this
> list will also have this explained (several times I would think).
>
> Regards
>
> Chris
>

Chris Hewitt

2004-03-29, 6:31 am

MJ wrote:

>Thanks, here is the steps what I have done , and in the end sucked. Please
>have a look and advise.
>----------------------------------------------------------------------------
>-----------------------------
># httpd -l
>
>Compiled-in modules:
> http_core.c
> mod_so.c
>suexec: disabled; invalid wrapper /usr/sbin/suexec
>
>
># find / -name apxs -print
>
>/usr/local/etc/httpd/bin/apxs
>
>#./configure --with-mysql=/usr/local/ --with-config-file-path=/web/conf/ --w
>ith-apxs=/usr/local/etc/httpd/bin/apxs --enable-track-vars
>
>Sorry, I was not able to successfully run APXS. Possible reasons:
>
>1. Perl is not installed;
>2. apache was not compiled with DSO support (--enable-module=so);
>3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs
>The output of /usr/local/etc/httpd/bin/apxs follows
>apxs:Error: Sorry, no DSO support for apache available
>apxs:Error: under your platform. Make sure the Apache
>apxs:Error: module mod_so is compiled into your server
>apxs:Error: binary `/usr/local/etc/httpd/bin/httpd'.
>configure: error: Aborting
>----------------------------------------------------------------------------
>---
>
>I don't know apache was compiled with DSO support or no but when I run
>"httpd -l", output shown "mod_so.c" is included in the list. Perl is also
>available.
>In case apache was not compiled with DSO who can I recomile it now without
>effecting my all virtual hosts (live customers sites).
>

Which version of apache httpd. For V2.x you need to specify --with-apxs2
rather than --with-apxs.

HTH
Chris
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com