LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-27-2007, 03:58 AM   #1
Tony.Reid
LQ Newbie
 
Registered: May 2005
Posts: 12

Rep: Reputation: 0
upgrading PHP


Tonight I took the plunge and upgraded php5.1.6 to php 5.2.4 from source on a live server - Centos 4.3 64bit.

I did the standard configure........ make, make test & make install.. then restarted apache.

Apart from phpinfo(); still showing 5.1.6 - everything seemed to go ok, with the exception of APC and a couple of errors in the make test.....

Quote:
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 46
Exts tested : 33
---------------------------------------------------------------------

Number of tests : 3973 2596
Tests skipped : 1377 ( 34.7%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 5 ( 0.1%) ( 0.2%)
Tests passed : 2591 ( 65.2%) ( 99.8%)
---------------------------------------------------------------------
Time taken : 255 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #38474 (getAttribute select attribute by order, even when prefixed) (OK to fail with libxml2 < 2.6.2x) [ext/dom/tests/bug38474.phpt]
Bug #42082 (NodeList length zero should be empty) [ext/dom/tests/bug42082.phpt]
libgd #106 (imagerectangle 1x1 draws 1x3) [ext/gd/tests/libgd00106.phpt]
Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
=====================================================================
So I took a gamble and did make install.

I was previously running php as a CGI - and as the new install did not seem to switch over to the new CGI - I checked and it appeared that the /var/www/cgi-bin/php file was still 5.1.6

With this in mind, I found php5-cgi in /usr/bin - so I cp /usr/bin/php5-cgi /var/www/cgi-bin/php which overwrote the old php5.1.6 file.

After I did that - phpinfo(); now shows the new install 5.2.4 and all seems to be working fine (and a little faster?)

Did I do ok copying the php5-cgi file and renaming it? or was that wrong for some reason? it does all appear to work?

Also, could someone give me a pointer on the following comment that the make install through out:
You may want to add: /usr/lib64/php to your php.ini include_path

Im not sure what include path it means

Any advice appreciated.

Thanks,
 
Old 10-28-2007, 12:59 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
well that's not an upgrade that's the start of making a system just about unusable through mis-management! by the sound of it you still have the original rpm for php installed? you really should remove the new version and then upgrade the existing rpm to a newer version e.g. http://rpm.pbone.net/index.php3/stat...86_64.rpm.html
 
Old 10-28-2007, 01:04 PM   #3
Tony.Reid
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
well that's not an upgrade that's the start of making a system just about unusable through mis-management! by the sound of it you still have the original rpm for php installed? you really should remove the new version and then upgrade the existing rpm to a newer version e.g. http://rpm.pbone.net/index.php3/stat...86_64.rpm.html
Hi,

It was installed from source before and upgraded as such by a hired hand to 5.1.6

I then did the above.

So no... I dont have an RPM for it....
 
Old 10-28-2007, 02:17 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
you've still overwritten part of an existing installation. you need to remove the old stuff first. is the source directory for it still around? if so, a make uninstall in that old directory should clear it all out too.
 
Old 10-28-2007, 02:49 PM   #5
Tony.Reid
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
you've still overwritten part of an existing installation. you need to remove the old stuff first. is the source directory for it still around? if so, a make uninstall in that old directory should clear it all out too.
Thanks for responding.

I do have the original src directory.

If I was to do a make uninstall to remove the old 5.1.6 files would it still leave the existing 5.2.4 working?

If not - would installing the rpm you mentioned in the post above pickup on my existing configure line...

Quote:
'./configure' '--exec-prefix=/usr/local/php5' '--program-suffix=5' '--enable-force-cgi-redirect' '--enable-discard-path' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-curl' '--with-exec-dir=/usr/bin' '--with-soap' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--with-jpeg-dir=/usr' '--with-openssl' '--with-zlib' '--with-mbstring' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--with-libxml-dir=/usr/lib' '--with-xml' '--with-mysql' '--with-gd' '--with-aspell' '--with-pspell'
Thanks again for your advice.

Tony.
 
Old 10-28-2007, 02:59 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
it depends what options were passed to both source builds as to whether they will completely overlap, partially overlap or be completely independent. the rpm would be completely prebuilt, your source wouldn't relate at all to how it is built. is there a specific feature that you know you need to enable which is non standard? your life will be much simpler if you can live with standard builds.
 
Old 10-28-2007, 03:05 PM   #7
Tony.Reid
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
it depends what options were passed to both source builds as to whether they will completely overlap, partially overlap or be completely independent. the rpm would be completely prebuilt, your source wouldn't relate at all to how it is built. is there a specific feature that you know you need to enable which is non standard? your life will be much simpler if you can live with standard builds.
pspell, freetype & gd are my main priorities.

I dont suppose your for hire?
 
Old 10-28-2007, 03:33 PM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
if you still have the new version, then you can reinstall it as many times as you want, so i'd say uninstall everything possible and install the rpm. you can then rpm "php -i" to see exactly what it was built with, or rather the ./configure command that the packager ran. many options are going to be there by default, so won't show up, but those rpm's are packaged to suit most peoplem so i'd be confident you'll be ok.
 
Old 10-28-2007, 03:47 PM   #9
Tony.Reid
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by acid_kewpie View Post
if you still have the new version, then you can reinstall it as many times as you want, so i'd say uninstall everything possible and install the rpm. you can then rpm "php -i" to see exactly what it was built with, or rather the ./configure command that the packager ran. many options are going to be there by default, so won't show up, but those rpm's are packaged to suit most peoplem so i'd be confident you'll be ok.
Thanks Chris, I have sent you a mail.
 
Old 10-28-2007, 03:50 PM   #10
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977Reputation: 1977
plesae don't mail me privately... keep it on here and everyone will be able to help...
 
Old 10-28-2007, 03:58 PM   #11
Tony.Reid
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
I tried the uninstall as you suggested but got this....

[root@zippy php-5.1.6]# make uninstall
make: *** No rule to make target `uninstall'. Stop.

Does this mean it cannot be uninstalled? is there an alternative way.


[root@zippy php-5.1.6]# ls
acconfig.h config.nice generated_lists makedist netware README.input_filter README.Zeus TODO
acconfig.h.in config.status genfiles Makefile NEWS README.PARAMETER_PARSING_API regex TODO-5.1
acinclude.m4 config.sub header Makefile.frag pear README.PHP4-TO-PHP5-THIN-CHANGES run-tests.php TODO-PHP5
aclocal.m4 configure include Makefile.fragments php5.spec README.QNX sapi TSRM
build configure.in INSTALL Makefile.gcov php5.spec.in README.SELF-CONTAINED-EXTENSIONS scripts UPGRADING
buildconf CREDITS install-sh Makefile.global php.gif README.STREAMS server-tests-config.php win32
buildconf.bat cvsclean libs Makefile.objects php.ini-dist README.SUBMITTING_PATCH server-tests.php Zend
CODING_STANDARDS cvsclean.bat libtool makerpm php.ini-recommended README.TESTING snapshot
config.cache ext LICENSE missing README.CVS-RULES README.TESTING2 stamp-h.in
config.guess EXTENSIONS ltmain.sh mkinstalldirs README.EXTENSIONS README.UNIX-BUILD-SYSTEM stub.c
config.log footer main modules README.EXT_SKEL README.WIN32-BUILD-SYSTEM tests

Last edited by Tony.Reid; 10-28-2007 at 04:00 PM.
 
Old 10-30-2007, 03:22 AM   #12
Tony.Reid
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Any ideas on how to manually remove the current install of php?

Thanks
Tony
 
Old 11-17-2007, 02:54 AM   #13
Tony.Reid
LQ Newbie
 
Registered: May 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tony.Reid View Post
Any ideas on how to manually remove the current install of php?

Thanks
Tony
Sorry to bump an old thread... but..

As PHP 5.2.5 is out - would a make uninstall on the 5.2.4 (which was rolled over the top of 5.1.6 - see above) help remove everything so that I can start again with an RPM?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading PHP with RH 9 rtcary Linux - General 1 09-11-2005 11:27 AM
Upgrading php? rickycen Linux - Newbie 4 09-02-2005 08:24 PM
Upgrading PHP?!? gldfngr Linux - Software 1 08-25-2005 09:32 AM
Upgrading php 4.2.2 to 4.3.2 maceking Linux - Software 1 06-30-2003 02:02 PM
upgrading php zurron Linux - Software 6 02-18-2003 07:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration