1 (edited by Anja 2016-02-12 09:36:47)

Topic: updating/installing from php 5.3 to php 5.4

Hello,

I've been trying for 2 days now to update/install php 5.4 on our test server (CentOS 6.7). I enabled remi repo.
When I try "yum install php" I get the errors:

Error: Package: php-5.4.45-3.el6.remi.x86_64 (remi)
           Requires: httpd-mmn = 20051115
Error: Package: php-5.4.45-3.el6.remi.x86_64 (remi)
           Requires: ht tpd

when I try "yum update php" it shows:
Package(s) php available, but not installed.
No Packages marked for Update

I'm pretty new at this and I have no idea how to get php 5.4 working sad

Re: updating/installing from php 5.3 to php 5.4

php (which is mod_php) requires httpd....
Which is available in base package.

Please paste full output from:
yum repolist

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

3 (edited by Anja 2016-02-12 11:04:24)

Re: updating/installing from php 5.3 to php 5.4

thanks for helping me

# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.1000mbps.com
* epel: mirror.nl.leaseweb.net
* extras: centos.mirror.triple-it.nl
* remi: remi.check-update.co.uk
* remi-safe: remi.check-update.co.uk
* updates: centos.mirror.triple-it.nl
repo id                               repo name                                                                             status
base                                  CentOS-6 - Base                                                                         6,517+58
epel                                  Extra Packages for Enterprise Linux 6 - x86_64                                        11,883+121
extras                                CentOS-6 - Extras                                                                             50
remi                                  Remi's RPM repository for Enterprise Linux 6 - x86_64                                   3,140+34
remi-safe                             Safe Remi's RPM repository for Enterprise Linux 6 - x86_64                                   564
updates                               CentOS-6 - Updates                                                                      1,188+30
vz-base                               vz-base                                                                                        3
vz-updates                            vz-updates                                                                                     8
repolist: 23,353

Re: updating/installing from php 5.3 to php 5.4

So httpd (Apache) is in base/updates repo.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: updating/installing from php 5.3 to php 5.4

ok so what should I do to fix it?

Re: updating/installing from php 5.3 to php 5.4

> ok so what should I do to fix it?

Yum should automatically pull them.

it looks like a openvz box, which, IIRC, are heavily altered... not really CentOS.

Search for "exclude" directives in yum and repositories configuration:

grep exclude /etc/yum.repos.d/*repo /etc/yum.conf

And

yum list '*httpd*'
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: updating/installing from php 5.3 to php 5.4

# grep exclude /etc/yum.repos.d/*repo /etc/yum.conf
/etc/yum.conf:exclude=apache* h ttpd* mod_* mysql* MySQL* da_* *ftp* exim* sendmail* bind-chroot*

should I remove ht tpd* from yum.conf exclude line?

# yum list '*httpd*'
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink                                            |  28 kB     00:00
 * base: mirror.amsiohosting.net
 * epel: [url=ftp://ftp.nluug.nl]ftp.nluug.nl[/url]
 * extras: mirrors.supportex.net
 * remi: mirrors.netix.net
 * remi-safe: mirrors.netix.net
 * updates: centos.mirror.triple-it.nl
base                                                     | 3.7 kB     00:00
extras                                                   | 3.4 kB     00:00
remi                                                     | 2.9 kB     00:00
Not using downloaded repomd.xml because it is older than what we have:
  Current   : Fri Feb 12 07:46:06 2016
  Downloaded: Thu Feb 11 18:01:56 2016
remi-safe                                                | 2.9 kB     00:00
Not using downloaded repomd.xml because it is older than what we have:
  Current   : Fri Feb 12 07:39:32 2016
  Downloaded: Thu Feb 11 17:02:30 2016
updates                                                  | 3.4 kB     00:00
vz-base                                                  |  951 B     00:00
vz-updates                                               |  951 B     00:00
Installed Packages
ht tpd-tools.x86_64                        2.2.15-15.el6.centos.1       installed
Available Packages
iipsrv-ht tpd-fcgi.noarch                  1.0.0-0.7.git0b63de7.el6     epel
libmicroht tpd.i686                        0.9.33-4.el6                 base
libmicroht tpd.x86_64                      0.9.33-4.el6                 base
libmicroht tpd-devel.i686                  0.9.33-4.el6                 base
libmicroht tpd-devel.x86_64                0.9.33-4.el6                 base
libmicroht tpd-doc.noarch                  0.9.33-4.el6                 base
light tpd.x86_64                           1.4.39-1.el6                 epel
light tpd-fastcgi.x86_64                   1.4.39-1.el6                 epel
light tpd-mod_geoip.x86_64                 1.4.39-1.el6                 epel
light tpd-mod_mysql_vhost.x86_64           1.4.39-1.el6                 epel
mirmon-ht tpd.noarch                       2.10-1.el6                   epel
owncloud-ht tpd.noarch                     8.0.10-1.el6.remi            remi
prototype-ht tpd.noarch                    1.7.1.0-1.el6.remi           remi
python-mozht tpd.noarch                    0-0.3.gitb077641.el6         epel
python-sphinxcontrib-ht tpdomain.noarch    1.4.0-1.el6                  epel
scriptaculous-ht tpd.noarch                1.9.0-1.el6.remi             remi
syntaxhighlighter-ht tpd.noarch            3.0.83-1.el6.remi            remi
sysusage-ht tpd.noarch                     5.3-5.el6                    epel
tht tpd.x86_64                             2.25b-23.el6                 epel
viewvc-ht tpd.noarch                       1.1.24-1.el6                 epel
web-assets-ht tpd.noarch                   5-2.el6                      epel

(PS I can't figure out how the code-tag works, I would format the text nicer for you)

Re: updating/installing from php 5.3 to php 5.4

> should I remove httpd* from yum.conf exclude line?

Obviously, this is the reason why you can't find httpd.
Don't know why this exclude is there
Don't know what can break when httpd is installed on a openvz box.

So removing it will allow you to install httpd (and thus php)
But without any warranty, this is NOT a CentOS box, too much altered.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

9 (edited by Anja 2016-02-15 12:43:23)

Re: updating/installing from php 5.3 to php 5.4

Hi Remi,
Thanks a lot for your help.
After install rpm -qa | grep php now outputs:

php-cli-5.4.45-3.el6.remi.x86_64
php-5.4.45-3.el6.remi.x86_64
php-common-5.4.45-3.el6.remi.x86_64
php-devel-5.4.45-3.el6.remi.x86_64

however, version still at 5.3:

# php -v
PHP 5.3.28 (cli) (built: Apr 15 2014 09:37:18)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader v4.0.12, Copyright (c) 2002-2011, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies

I tried restarting ht tpd service, but now I get these errors:

# service httpd restart
Stopping ht tpd:                                            [FAILED]
Starting ht tpd: Syntax error on line 10 of /etc/ht tpd/conf/extra/ht tpd-directories.conf:
Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
                                                           [FAILED]

Any idea?

Re: updating/installing from php 5.3 to php 5.4

Try:

$ which php
$ /usr/bin/php -v
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: updating/installing from php 5.3 to php 5.4

# which php
/usr/local/bin/php
# /usr/bin/php -v
PHP 5.4.45 (cli) (built: Jan  6 2016 17:00:57)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

that's confusing..

Re: updating/installing from php 5.3 to php 5.4

So you have a manually build version of PHP 5.3 installed in /usr/local/bin

You have to clean it.

But again, be aware of my previous comment, "you are not using CentOS", probably this is going to break most of stuff on this box.

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: updating/installing from php 5.3 to php 5.4

Ok.. thanks very much again for your help