Koozali.org: home of the SME Server

How to upgrade php version?

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
Re: How to upgrade php version?
« Reply #15 on: April 30, 2014, 10:54:19 AM »
yum install rather than upgrade perhaps?
--
qui scribit bis legit

Offline Philippe MARTY

  • *
  • 37
  • +0/-0
Re: How to upgrade php version?
« Reply #16 on: April 30, 2014, 11:03:18 AM »
In other words, is there a way to force update of php package?
Keep smiling with the sun and singing with the birds
www.atelier51.com

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: How to upgrade php version?
« Reply #17 on: April 30, 2014, 02:22:39 PM »
did you try
Code: [Select]
yum install php --enablerepo=epel,remi-php55
?


Offline Philippe MARTY

  • *
  • 37
  • +0/-0
Re: How to upgrade php version?
« Reply #18 on: April 30, 2014, 03:23:27 PM »
yes, same answer from my server. I even tried to remove and install via
Code: [Select]
yum erase phpand
Code: [Select]
yum install php --enablerepo=epel,remi-php55
but my now my php instance is dead :(
I'm going to reinstall a fresh instance of the server...
Keep smiling with the sun and singing with the birds
www.atelier51.com

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: How to upgrade php version?
« Reply #19 on: April 30, 2014, 03:33:06 PM »
Code: [Select]
yum erase php

will likely uninstall many packages.. did you read which?

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: How to upgrade php version?
« Reply #20 on: April 30, 2014, 04:43:42 PM »
but my now my php instance is dead :(
I'm going to reinstall a fresh instance of the server...
i don't know if you are working with virtualisation but you can make a full clone of your sme8.1 before to play and thus use the clone instead of the Master.

my Tip of 2c
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: How to upgrade php version?
« Reply #21 on: April 30, 2014, 05:33:41 PM »
it works for me except that i forget to add the 'remi' repository, but after that i have another problem that you can follow on remi forum

http://forums.famillecollet.com/viewtopic.php?pid=6841#p6841

See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: How to upgrade php version?
« Reply #22 on: April 30, 2014, 10:43:55 PM »
in fact you need to use only the 'remi' repository. I didn't try with sme8
This provides PHP54(5.4.27-1) but with the upgrade of mysql in the same time. I do not test beyond that because i'm away of my build server. Need test but i'm not sure that the upgrade of mysql is a good idea.

For PHP55 i need the return of remi.

Code: [Select]
[root@sme9 ~]# yum --enablerepo=remi install php
Loaded plugins: fastestmirror, smeserver
Loading mirror speeds from cached hostfile
 * base: miroir.univ-paris13.fr
 * smeaddons: mirror.chiropratique.org
 * smeextras: mirror.chiropratique.org
 * smeos: mirror.chiropratique.org
 * smeupdates: mirror.chiropratique.org
 * updates: ftp.rezopole.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.i686 0:5.3.3-27.el6_5 will be updated
---> Package php.i686 0:5.4.27-1.el6.remi will be an update
--> Processing Dependency: php-common(x86-32) = 5.4.27-1.el6.remi for package: php-5.4.27-1.el6.remi.i686
--> Processing Dependency: php-cli(x86-32) = 5.4.27-1.el6.remi for package: php-5.4.27-1.el6.remi.i686
--> Running transaction check
---> Package php-cli.i686 0:5.3.3-27.el6_5 will be updated
---> Package php-cli.i686 0:5.4.27-1.el6.remi will be an update
---> Package php-common.i686 0:5.3.3-27.el6_5 will be updated
--> Processing Dependency: php-common(x86-32) = 5.3.3-27.el6_5 for package: php-mysql-5.3.3-27.el6_5.i686
--> Processing Dependency: php-common(x86-32) = 5.3.3-27.el6_5 for package: php-imap-5.3.3-27.el6_5.i686
--> Processing Dependency: php-common(x86-32) = 5.3.3-27.el6_5 for package: php-process-5.3.3-27.el6_5.i686
--> Processing Dependency: php-common(x86-32) = 5.3.3-27.el6_5 for package: php-gd-5.3.3-27.el6_5.i686
--> Processing Dependency: php-common(x86-32) = 5.3.3-27.el6_5 for package: php-pdo-5.3.3-27.el6_5.i686
--> Processing Dependency: php-common(x86-32) = 5.3.3-27.el6_5 for package: php-xml-5.3.3-27.el6_5.i686
--> Processing Dependency: php-common(x86-32) = 5.3.3-27.el6_5 for package: php-mbstring-5.3.3-27.el6_5.i686
--> Processing Dependency: php-common(x86-32) = 5.3.3-27.el6_5 for package: php-ldap-5.3.3-27.el6_5.i686
---> Package php-common.i686 0:5.4.27-1.el6.remi will be an update
--> Running transaction check
---> Package php-gd.i686 0:5.3.3-27.el6_5 will be updated
---> Package php-gd.i686 0:5.4.27-1.el6.remi will be an update
--> Processing Dependency: libt1.so.5 for package: php-gd-5.4.27-1.el6.remi.i686
---> Package php-imap.i686 0:5.3.3-27.el6_5 will be updated
---> Package php-imap.i686 0:5.4.27-1.el6.remi will be an update
---> Package php-ldap.i686 0:5.3.3-27.el6_5 will be updated
---> Package php-ldap.i686 0:5.4.27-1.el6.remi will be an update
---> Package php-mbstring.i686 0:5.3.3-27.el6_5 will be updated
---> Package php-mbstring.i686 0:5.4.27-1.el6.remi will be an update
---> Package php-mysql.i686 0:5.3.3-27.el6_5 will be updated
---> Package php-mysql.i686 0:5.4.27-1.el6.remi will be an update
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18) for package: php-mysql-5.4.27-1.el6.remi.i686
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16) for package: php-mysql-5.4.27-1.el6.remi.i686
--> Processing Dependency: libmysqlclient.so.18 for package: php-mysql-5.4.27-1.el6.remi.i686
---> Package php-pdo.i686 0:5.3.3-27.el6_5 will be updated
---> Package php-pdo.i686 0:5.4.27-1.el6.remi will be an update
---> Package php-process.i686 0:5.3.3-27.el6_5 will be updated
---> Package php-process.i686 0:5.4.27-1.el6.remi will be an update
---> Package php-xml.i686 0:5.3.3-27.el6_5 will be updated
---> Package php-xml.i686 0:5.4.27-1.el6.remi will be an update
--> Running transaction check
---> Package mysql-libs.i686 0:5.1.73-3.el6_5 will be updated
--> Processing Dependency: libmysqlclient.so.16 for package: perl-DBD-MySQL-4.022-1.el6.rfx.i686
--> Processing Dependency: libmysqlclient.so.16 for package: mysql-5.1.73-3.el6_5.i686
--> Processing Dependency: libmysqlclient.so.16 for package: mysql-server-5.1.73-3.el6_5.i686
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package: mysql-server-5.1.73-3.el6_5.i686
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package: mysql-5.1.73-3.el6_5.i686
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package: perl-DBD-MySQL-4.022-1.el6.rfx.i686
--> Processing Dependency: libmysqlclient_r.so.16 for package: mysql-5.1.73-3.el6_5.i686
--> Processing Dependency: libmysqlclient_r.so.16 for package: mysql-server-5.1.73-3.el6_5.i686
--> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16) for package: mysql-5.1.73-3.el6_5.i686
--> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16) for package: mysql-server-5.1.73-3.el6_5.i686
--> Processing Dependency: mysql-libs = 5.1.73-3.el6_5 for package: mysql-5.1.73-3.el6_5.i686
---> Package mysql-libs.i686 0:5.5.37-1.el6.remi will be an update
---> Package t1lib.i686 0:5.1.2-6.el6_2.1 will be installed
--> Running transaction check
---> Package compat-mysql51.i686 0:5.1.54-1.el6.remi will be installed
---> Package mysql.i686 0:5.1.73-3.el6_5 will be updated
---> Package mysql.i686 0:5.5.37-1.el6.remi will be an update
---> Package mysql-server.i686 0:5.1.73-3.el6_5 will be updated
---> Package mysql-server.i686 0:5.5.37-1.el6.remi will be an update
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================
 Package                               Arch                        Version                                  Repository                   Size
==============================================================================================================================================
Updating:
 php                                   i686                        5.4.27-1.el6.remi                        remi                        2.7 M
Installing for dependencies:
 compat-mysql51                        i686                        5.1.54-1.el6.remi                        remi                        1.4 M
 t1lib                                 i686                        5.1.2-6.el6_2.1                          base                        152 k
Updating for dependencies:
 mysql                                 i686                        5.5.37-1.el6.remi                        remi                        5.8 M
 mysql-libs                            i686                        5.5.37-1.el6.remi                        remi                        778 k
 mysql-server                          i686                        5.5.37-1.el6.remi                        remi                         10 M
 php-cli                               i686                        5.4.27-1.el6.remi                        remi                        2.7 M
 php-common                            i686                        5.4.27-1.el6.remi                        remi                        936 k
 php-gd                                i686                        5.4.27-1.el6.remi                        remi                        141 k
 php-imap                              i686                        5.4.27-1.el6.remi                        remi                         77 k
 php-ldap                              i686                        5.4.27-1.el6.remi                        remi                         59 k
 php-mbstring                          i686                        5.4.27-1.el6.remi                        remi                        939 k
 php-mysql                             i686                        5.4.27-1.el6.remi                        remi                        130 k
 php-pdo                               i686                        5.4.27-1.el6.remi                        remi                        116 k
 php-process                           i686                        5.4.27-1.el6.remi                        remi                         59 k
 php-xml                               i686                        5.4.27-1.el6.remi                        remi                        165 k

Transaction Summary
==============================================================================================================================================
Install       2 Package(s)
Upgrade      14 Package(s)

Total download size: 26 M
Is this ok [y/N]: ^CExiting on user Command
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: How to upgrade php version?
« Reply #23 on: April 30, 2014, 11:27:42 PM »
well i found that it should work for php55 and no updates of mysql :)

Code: [Select]
yum --enablerepo=remi-php55,remi,epel update php\* --exclude=php-horde-Horde\*
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: How to upgrade php version?
« Reply #24 on: May 03, 2014, 01:27:36 AM »
for sme9 to upgrade php i have something that needs to be tested a bit more but it works...Of course all that is easy to do  but experimental  8)

we add some repositories

Remi - EL6

Code: [Select]
/sbin/e-smith/db yum_repositories set remi repository \
Name 'Remi - EL6' \
BaseURL 'http://rpms.famillecollet.com/enterprise/6/remi/$basearch/' \
EnableGroups no \
GPGCheck yes \
GPGKey http://rpms.famillecollet.com/RPM-GPG-KEY-remi \
Visible no \
Exclude php-horde-horde \
status disabled
Remi-php55_EL6

only for sme9

Code: [Select]
/sbin/e-smith/db yum_repositories set remi-php55 repository \
Name 'Remi-php55 - EL6' \
BaseURL 'http://rpms.famillecollet.com/enterprise/6/php55/$basearch/' \
EnableGroups no \
GPGCheck yes \
GPGKey http://rpms.famillecollet.com/RPM-GPG-KEY-remi \
Visible no \
Exclude php-horde-horde \
status disabled

EPEL For SME 9.x,

Code: [Select]
/sbin/e-smith/db yum_repositories set epel repository \
Name 'Epel - EL6' \
BaseUrl 'http://download.fedoraproject.org/pub/epel/6/$basearch' \
MirrorList 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=$basearch' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL \
Visible no \
status disabled
After adding it to the database updating the configuration file is required:

Code: [Select]
signal-event yum-modify
then after that we need to upgrade php from remi and epel
Code: [Select]
yum --enablerepo=remi-php55,remi,epel update php\*
the only issue i have is an obsolete option given in the php.ini, but it is just as a log noise, that needs more search on how to avoid it (eg a custom template)

###ERROR####
 Directive 'allow_call_time_pass_reference' is no longer available in PHP at Unknown#0

it is something well known about php upgrade of php53


after that the contribs of smeserver-phpmyadmin is broken because  phpMyAdmin3 needs php53 as dependency but we can install phpMyAdmin (4.1.14) from 'remi'. However we need to install a modified smeserver-phpmyadmin which comes from 'stephdl_repo'

we add stephdl repo

Code: [Select]
db yum_repositories set stephdl repository \
BaseURL http://mirror.de-labrusse.fr/smeserver/\$releasever \
EnableGroups no GPGCheck yes \
Name "Mirror de Labrusse" \
GPGKey http://mirror.de-labrusse.fr/RPM-GPG-KEY \
Visible yes status disabled

Code: [Select]
signal-event yum-modify
Now we install phpmyadmin

Code: [Select]
yum install --enablerepo=stephdl,remi,remi-php55 smeserver-phpmyadmin phpMyAdmin
Code: [Select]
signal-event post-upgrade ;signal-event reboot
I'm able to add a database in order to install owncloud, no errors in logs....but the issue I can see with this method is the large number of packages that we need to install from exterior repositories. When you will want to upgrade you have to use this command line with names of packages else you can have unwanted upgrade like mysql.

Code: [Select]
yum update --enablerepo=stephdl,remi,remi-php55,epel smeserver-phpmyadmin phpMyAdmin php\*
The solution I could see will be to import all these packages in a repository but it could be hard to maintain.
« Last Edit: May 03, 2014, 01:43:25 AM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline Philippe MARTY

  • *
  • 37
  • +0/-0
Re: How to upgrade php version?
« Reply #25 on: May 26, 2014, 11:03:43 PM »
Hello stephdl,

Thanks a lot for all that tests. I've tried to reproduce but it's really too much job for my level. Too bad for me.

I need to have a easy-to-maintain server. With all these customizations, I'm afraid my server won't be stable enough for me to work with.
As I need to host several clients' websites during development period, I need to be confident on my server.
I'm afraid I have to look at another distribution :(

I'm really sad about that situation.
Keep smiling with the sun and singing with the birds
www.atelier51.com

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: How to upgrade php version?
« Reply #26 on: May 27, 2014, 12:19:28 AM »
Philippe MARTY

Use whatever server you want, but modifying another distribution to work the way sme server does, will probably be more work that trying to update php on sme server.

Apart from that comment, you are bailing out just as sme 9 is about to be released (within the month or even a few weeks by the sounds of it), sme9 RC1 is quite stable, so possibly you should try using sme9RC1 now & look at how to update php on that underlying CentOS version. From all reports in these forums, bugzilla & mail lists etc, that will be much easier & the underlying system does allow to run other instances of packages eg php, that will not interfere with the base installed versions of packages eg php

Personally I think you should stay a while & give sme9 a good go & find out how to upgrade packages in sme9, it will probably be your easiest overall approach.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: How to upgrade php version?
« Reply #27 on: May 27, 2014, 07:41:24 AM »
I'm afraid I have to look at another distribution :(

I'm really sad about that situation.

dont ask what your distro can do for you, but ask what you can do for your distro ;)
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: How to upgrade php version?
« Reply #28 on: May 27, 2014, 02:29:15 PM »
Hello stephdl,

Thanks a lot for all that tests. I've tried to reproduce but it's really too much job for my level. Too bad for me.

I need to have a easy-to-maintain server. With all these customizations, I'm afraid my server won't be stable enough for me to work with.
As I need to host several clients' websites during development period, I need to be confident on my server.
I'm afraid I have to look at another distribution :(

I'm really sad about that situation.

if you need to setup external repositories AND you don't use a GUI, this is the only way.. Centos/debian/ubuntu/whatever.. setting up external repos via cli needs to edit some config files..
in the end, are you saying you're not able to do so?

if you need "to host several clients' websites during development period", go with SME9..
I'm quite sure you will not find anything easier to maintain

Offline Philippe MARTY

  • *
  • 37
  • +0/-0
Re: How to upgrade php version?
« Reply #29 on: May 28, 2014, 10:05:14 AM »
Well, SME9 + customization (to upgrade php) seems quiet hard to maintain for me, now as I have less time for that sysadmin part.
In fact, my local network has grown, an appliance is installed for dhcp/firewall/route management and the use of sme server is limited to files storage, backup and web server.

So I've made some searches on the net and I found Synology NAS systems, which are philosophically far different from sme server... :( But close to my needs, right now.
Keep smiling with the sun and singing with the birds
www.atelier51.com