Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> how to update php on SciLi 6.5
scilier
 Posted: Feb 4 2016, 04:11 PM
Quote Post


SLF Newbie


Group: Members
Posts: 14
Member No.: 3353
Joined: 28-January 15









I have a server running SciLi 6.5
It has PHP 5.3.3
I need to update to a newer version of php
I have the following repos enabled:
epel.repo: name=Extra Packages for Enterprise Linux 6 - $basearch
sl6x.repo: name=Scientific Linux 6x - $basearch
sl6x.repo: name=Scientific Linux 6x - $basearch - security updates
sl.repo: name=Scientific Linux $releasever - $basearch
sl.repo: name=Scientific Linux $releasever - $basearch - security updates

When I do a yum update, php is not updated.
When I do yum update php, I get: No Packages marked for Update
How do I update php?
Thanks in advance.
PMEmail Poster
^
redman
 Posted: Feb 4 2016, 07:45 PM
Quote Post


Retired SLF Administrator
********

Group: Admins
Posts: 1276
Member No.: 2
Joined: 8-April 11









If you need/want a newer version of php, you will need to build it yourself or install it from source.
RHEL and its clones do not have the latest version of php enabled.

You could also have a look at php55 which is available from the softwarecollections from SL.

--------------------
"Sometimes the best helping hand you can give is a good, firm push."
PM
^
scilier
 Posted: Feb 4 2016, 10:12 PM
Quote Post


SLF Newbie


Group: Members
Posts: 14
Member No.: 3353
Joined: 28-January 15









QUOTE (redman @ Feb 4 2016, 07:45 PM)
If you need/want a newer version of php, you will need to build it yourself or install it from source.
RHEL and its clones do not have the latest version of php enabled.

You could also have a look at php55 which is available from the softwarecollections from SL.


I'm not sure which one I need from the software collections you listed. I see a huge list of rpms. I just have standard default php that comes with SciLi.

I'm guessing I need this one:
php54-php-5.4.40-3.el6.x86_64.rpm
then I download it to the server and do ...
rpm -ivh php54-php-5.4.40-3.el6.x86_64.rpm

do I uninstall the current php first?
PMEmail Poster
^
inittux
 Posted: Feb 5 2016, 04:11 PM
Quote Post


SLF Geek
****

Group: Members
Posts: 287
Member No.: 953
Joined: 20-October 11









just download this file into /etc/yum.repos.d . Then yum repolist to see if it shows up. Be sure to read this post it has some useful information about repos and such.

--------------------
PM
^
inittux
 Posted: Feb 5 2016, 06:16 PM
Quote Post


SLF Geek
****

Group: Members
Posts: 287
Member No.: 953
Joined: 20-October 11









seems

yum install yum-conf-softwarecollections

should work too.

--------------------
PM
^
scilier
 Posted: Feb 5 2016, 06:32 PM
Quote Post


SLF Newbie


Group: Members
Posts: 14
Member No.: 3353
Joined: 28-January 15









QUOTE (inittux @ Feb 5 2016, 04:11 PM)
just download this file into /etc/yum.repos.d . Then yum repolist to see if it shows up. Be sure to read this post it has some useful information about repos and such.


I added the repolist from ...
http://ftp.scientificlinux.org/linux/scientific/6x/external_products/softwarecollections/x86_64/php55/php55.repo
... and it did show up in yum repolist but when I run yum update, yum update php, yum upgrade php, the result was ... no packages marked for update.

I also tried ...
yum install yum-conf-softwarecollections
... but got this error ...

Loaded plugins: changelog, security, verify, versionlock
Setting up Install Process
No package yum-conf-softwarecollections available.
Error: Nothing to do
PMEmail Poster
^
inittux
 Posted: Feb 5 2016, 06:54 PM
Quote Post


SLF Geek
****

Group: Members
Posts: 287
Member No.: 953
Joined: 20-October 11









QUOTE (inittux @ Feb 5 2016, 08:16 PM)
seems

yum install yum-conf-softwarecollections

should work too.


I said wrong, the repo file with the content you post should do it. Try changing the following in the file:

enable=1 to enabled=1

then try again.

--------------------
PM
^
scilier
 Posted: Feb 5 2016, 06:57 PM
Quote Post


SLF Newbie


Group: Members
Posts: 14
Member No.: 3353
Joined: 28-January 15









QUOTE (inittux @ Feb 5 2016, 06:54 PM)
QUOTE (inittux @ Feb 5 2016, 08:16 PM)
seems

yum install yum-conf-softwarecollections

should work too.


I said wrong, the repo file with the content you post should do it. Try changing the following in the file:

enable=1 to enabled=1

then try again.


Thanks.
Tried yum update, yum update php, yum upgrade php.
Got a little further that time.
But now I got this, which I've never seen before (it's like it sees the repo but doesn't want to do anything with it):

Loaded plugins: changelog, security, verify, versionlock
Setting up Update Process
php55 | 2.6 kB 00:00
No Packages marked for Update
PMEmail Poster
^
inittux
 Posted: Feb 5 2016, 07:24 PM
Quote Post


SLF Geek
****

Group: Members
Posts: 287
Member No.: 953
Joined: 20-October 11









try: yum search php55

then you can see the packages available. You don't actually update, php55 gets installed as seperate packages. It does't update the currently installed one php5.3

--------------------
PM
^
scilier
 Posted: Feb 5 2016, 07:39 PM
Quote Post


SLF Newbie


Group: Members
Posts: 14
Member No.: 3353
Joined: 28-January 15









QUOTE (inittux @ Feb 5 2016, 07:24 PM)
try

yum search php55

then you can see the packages available wink.gif


Ok I see all the packages. Please let me know if I have this right:

I will have to do a yum remove on each of the currently installed php5.3 packages
then do a yum install on each of the php5.5 packages
hoping that php55-php-mysqlnd.x86_64 is the same as the current php-mysql.x86_64
and hoping that nothing is using ...
php-mcrypt-5.3.3-4.el6.x86_64
... which does not have a 5.5 equivalent.

PMEmail Poster
^
inittux
 Posted: Feb 5 2016, 07:49 PM
Quote Post


SLF Geek
****

Group: Members
Posts: 287
Member No.: 953
Joined: 20-October 11









The extra collections repo doesn't have all the php packages. You could try the remi repo

Here's the rpm to install the repo:

http://rpms.famillecollet.com/enterprise/remi-release-6.rpm mcrypt is available there.

different php versions available:

http://rpms.famillecollet.com/enterprise/6/


http://rpms.famillecollet.com/enterprise/6/php55/x86_64/repoview/


Be sure to read the post about 3rd party repos

And it's best not to combine the php packages of the sl software collection and remi repo. You should choose one or the other repo for installing php packages.

--------------------
PM
^
scilier
 Posted: Feb 6 2016, 04:47 AM
Quote Post


SLF Newbie


Group: Members
Posts: 14
Member No.: 3353
Joined: 28-January 15









QUOTE (inittux @ Feb 5 2016, 07:49 PM)
The extra collections repo doesn't have all the php  packages. You could try the remi repo

Here's the rpm to install the repo:

http://rpms.famillecollet.com/enterprise/remi-release-6.rpm mcrypt is available there.

different php versions available:

http://rpms.famillecollet.com/enterprise/6/


http://rpms.famillecollet.com/enterprise/6/php55/x86_64/repoview/


Be sure to read the post about  3rd party repos

And it's best not to combine the php packages of the sl software collection and remi repo. You should choose one or the other repo for installing php packages.


Ok I did all that ... it was quite nerve racking as I am dealing with a live system.
When I was all done, apache would not interpret php web pages. I noticed /etc/httpd/conf.d/php.conf was gone so I replaced it with a saved copy then restarted apache to see this error:

Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory

So by then I was too freaked out to continue so I aborted, uninstalled all the php56 packages and reinstalled all the original 5.3.3 packages and fortunately everything started working again.
PMEmail Poster
^
inittux
 Posted: Feb 6 2016, 07:59 AM
Quote Post


SLF Geek
****

Group: Members
Posts: 287
Member No.: 953
Joined: 20-October 11









It would have been smart to have tried it on a test system first, to see the results you get before doing it on a live system.

It looks like libphp5.so comes with the php56 package itself:
yum install php56-php .

Try it on a test machine first this time wink.gif




--------------------
PM
^
scilier
 Posted: Feb 6 2016, 06:42 PM
Quote Post


SLF Newbie


Group: Members
Posts: 14
Member No.: 3353
Joined: 28-January 15










I did ...
yum install php56.x86_64
... is that different than ...
yum install php56-php
?

PMEmail Poster
^
inittux
 Posted: Feb 6 2016, 08:35 PM
Quote Post


SLF Geek
****

Group: Members
Posts: 287
Member No.: 953
Joined: 20-October 11









QUOTE (scilier @ Feb 6 2016, 08:42 PM)
I did ...
yum install php56.x86_64
... is that different than ...
yum install php56-php
?


php56 installs php, php56-php installs mod_php which contains the module(shared object) that apache was complaining about

CODE

Starting httpd: httpd: Syntax error on line 221 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/php.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory


So you need both

--------------------
PM
^
scilier
 Posted: Feb 7 2016, 05:41 AM
Quote Post


SLF Newbie


Group: Members
Posts: 14
Member No.: 3353
Joined: 28-January 15









Success!
Thank you very much!
PMEmail Poster
^
inittux
 Posted: Feb 7 2016, 07:36 AM
Quote Post


SLF Geek
****

Group: Members
Posts: 287
Member No.: 953
Joined: 20-October 11









QUOTE (scilier @ Feb 7 2016, 07:41 AM)
Success!
Thank you very much!



Glad you got it working smile.gif

http://th166.photobucket.com/albums/u117/rdshear/Smiley%20Faces/th_smiley-face-thumbs-up.gif

--------------------
PM
^
helikaon
 Posted: Feb 8 2016, 09:00 AM
Quote Post


SLF Administrator
*******

Group: Admins
Posts: 836
Member No.: 4
Joined: 8-April 11










Guys, GJ ... btw as i read it through, it was so thrilling, to read through it - almost like some detective story, or even thriller! smile.gif

--------------------
PMEmail Poster
^
inittux
 Posted: Feb 8 2016, 09:11 AM
Quote Post


SLF Geek
****

Group: Members
Posts: 287
Member No.: 953
Joined: 20-October 11









QUOTE (helikaon @ Feb 8 2016, 11:00 AM)
Guys, GJ ... btw as i read it through, it was so thrilling, to read through it - almost like some detective story, or even thriller!  smile.gif


LOL thanks smile.gif

I bet it was more scary and thrilling for scilier performing it on a live system instead of doing it on a test system first wink.gif

--------------------
PM
^
helikaon
 Posted: Feb 8 2016, 10:16 AM
Quote Post


SLF Administrator
*******

Group: Admins
Posts: 836
Member No.: 4
Joined: 8-April 11









QUOTE (inittux @ Feb 8 2016, 09:11 AM)
QUOTE (helikaon @ Feb 8 2016, 11:00 AM)
Guys, GJ ... btw as i read it through, it was so thrilling, to read through it - almost like some detective story, or even thriller!   smile.gif


LOL thanks smile.gif

I bet it was more scary and thrilling for scilier performing it on a live system instead of doing it on a test system first wink.gif


biggrin.gif biggrin.gif biggrin.gif yeah, i exactly know what you talk about..

--------------------
PMEmail Poster
^
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll