Topic: general questions about PHP RPM for CentOS 6

I want to select PHP RPMs to use on CentOS for a larger project based upon the following criteria:

* How frequently are the RPMs updated?

* How frequently are security updates applied?

* How reliable/good is the RPM implementation?

It would be great if anybody could comment on the above points?

The only other set of RPMs for PHP 5.6 I have found is at [1]. Can anybody comment on that one? Or suggest others?

Thanks in advance!

[1] https://webtatic.com/packages/php56/

Re: general questions about PHP RPM for CentOS 6

SimonHF wrote:

* How frequently are the RPMs updated?

* How frequently are security updates applied?

RPM are updated, usually on upstream release date.

I don't know yet how I will maintain the 5.4 packages when this version will be EOL upstream (end of year), I just hope I will have time to backport the critical security fix (I will have to do it, part of my dayjob, for other repo).  But of course, I will prefer to see people switch to 5.5 or 5.6.

SimonHF wrote:

* How reliable/good is the RPM implementation?

I'm probably not the best person to answer this wink

But remi repo is upstream for Fedora package, which is upstream for RHEL/CentOS and all other 3rd party repo (which are mostly only "backport" repo).

No software exists without bug, so update in a test / preprod environment is a best practice.
For example in 5.5.19, FPM was mostly broken. But I fixed it quite quickly (upstream), and released a fixed set of RPM (2 days after release, without having to wait 1 month for 5.5.20).

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 dtube 2015-01-27 17:22:33)

Re: general questions about PHP RPM for CentOS 6

SimonHF wrote:

I want to select PHP RPMs to use on CentOS for a larger project based upon the following criteria:

* How frequently are the RPMs updated?

* How frequently are security updates applied?

As an end user, I feel that Remi is extremely good & responsive with updates.

* How reliable/good is the RPM implementation?

Extremely reliable and Excellent implementation !!!
If you have any questions, you can ask in the forum or on IRC.

Re: general questions about PHP RPM for CentOS 6

Thanks for encouraging me to continue using the RPMs from remi.

So what I'd like to do is to upgrade the "PHP 5.3.3" on CentOS 6 that I have right now to PHP 5.6. Following the instructions in the config then I tried the following commands to install:

# su -
# cd /etc/yum.repos.d
# wget http://rpms.famillecollet.com/enterprise/remi.repo
# yum --enablerepo=remi install php
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.3-27.el6_5.1 will be updated
--> Processing Dependency: php(x86-64) = 5.3.3-27.el6_5.1 for package: php-devel-5.3.3-27.el6_5.1.x86_64
---> Package php.x86_64 0:5.4.37-1.el6.remi will be an update
...
Running rpm_check_debug
Running Transaction Test


Transaction Check Error:
  file /usr/lib64/libhashkit.so.2.0.0 from install of libmemcached-last-libs-1.0.18-2.el6.remi.x86_64 conflicts with file from package libmemcached-1.0.14-1.el6.remi.x86_64
  file /usr/lib64/libmemcached.so.11.0.0 from install of libmemcached-last-libs-1.0.18-2.el6.remi.x86_64 conflicts with file from package libmemcached-1.0.14-1.el6.remi.x86_64
  file /usr/lib64/libmemcachedutil.so.2.0.0 from install of libmemcached-last-libs-1.0.18-2.el6.remi.x86_64 conflicts with file from package libmemcached-1.0.14-1.el6.remi.x86_64

Error Summary
-------------

So three questions:

1. Are the commands I entered the correct commands to upgrade to PHP 5.6?

2. Why does the initial output say upgrading to PHP 5.4.37?

3. How to fix the Transaction Check Errors?

Thanks,
Simon

Re: general questions about PHP RPM for CentOS 6

Update: After running "yum remove libmemcached" then I could successfully run "yum --enablerepo=remi install php".

However, after the upgrade then it looks like several PHP extensions were not upgraded and PHP is not the desired 5.6 version:

# php -v
PHP Warning:  PHP Startup: gearman: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
in Unknown on line 0
PHP Warning:  PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
in Unknown on line 0
PHP Warning:  PHP Startup: pdo_cassandra: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
in Unknown on line 0
PHP 5.4.37 (cli) (built: Jan 21 2015 11:11:59)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.7, Copyright (c) 2002-2015, by Derick Rethans

Why am I not getting PHP 5.6?

I'm assuming that I shouldn't be installing "php56" because I read in the FAQ that this should only be used if installing along side an existing PHP install?

Re: general questions about PHP RPM for CentOS 6

Okay, to get rid of the gearman and memcache warnings (see above) then I just ran the following commands to remove some legacy extensions which are not used:

# yum remove php-pecl-memcache.x86_64
# yum remove php-pecl-gearman.x86_64

However, the pdo_cassandra warning is more problematic. Cassandra is used. Can it be the it's not part of remi RPMs? Is it possible to add it? Or should I try to build it myself somehow?

Still trying to figure out how to install PHP 5.6...

Re: general questions about PHP RPM for CentOS 6

Okay. I figured out how to upgrade to PHP 5.6. Turns out that the vital instruction is in the blog post and not in the FAQ:

# # see http://blog.famillecollet.com/post/2015 … -and-5.6.5
# yum --enablerepo=remi,remi-php56 update php\*

Now I still have the cassandra pdo problem to solve...

Re: general questions about PHP RPM for CentOS 6

I only find:
https://code.google.com/a/apache-extras … andra-pdo/
https://github.com/mkoppanen/php-pdo_cassandra

Both seems unmaintained sad
First don't have any release...

Requires thrift, which is not part of EPEL-6 (only EPEL-7)

Build system is broken, need to be patch to work...

Seems not a friendly extension. Not a good candidate for remi repository

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 SimonHF 2015-01-28 05:51:37)

Re: general questions about PHP RPM for CentOS 6

Yes, I've managed to compile thrift.
But I always get stuck building the cassandra part with this [1] error :-(

[1] https://github.com/Orange-OpenSource/YA … /issues/47

Re: general questions about PHP RPM for CentOS 6

Which error ?
If about the missing header, you probably need to set the inclue path (export CFLAGS=-I/pat/to/thrift)

As I said "Build system is broken"

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: general questions about PHP RPM for CentOS 6

Error is during YACassandra ./configure ending in these lines:
...
checking for pkg-config... /usr/bin/pkg-config
checking thrift installation... configure: error: Unable to find thrift installation

Re: general questions about PHP RPM for CentOS 6

I managed to get past that error. How?
Turns out that building the C++ part of thrift is important.
So I also had to build libboost for it.
Now I'm stuck on the make part of YACassandra with many errors like this:

...
libtool: compile:  g++ -Wall -Wno-write-strings -I/usr/include/php/ext -I. -I/root/YACassandraPDO-master -DPHP_ATOM_INC -I/root/YACassandraPDO-master/include -I/root/YACassandraPDO-master/main -I/root/YACassandraPDO-master -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /root/YACassandraPDO-master/gen-cpp/cassandra_types.cpp  -fPIC -DPIC -o gen-cpp/.libs/cassandra_types.o
/root/YACassandraPDO-master/gen-cpp/cassandra_types.cpp: In function 'std::ostream& org::apache::cassandra::operator<<(std::ostream&, const org::apache::cassandra::Column&)':
/root/YACassandraPDO-master/gen-cpp/cassandra_types.cpp:243: error: 'org::apache::thrift' has not been declared
/root/YACassandraPDO-master/gen-cpp/cassandra_types.cpp:245: error: 'to_string' was not declared in this scope
...

Re: general questions about PHP RPM for CentOS 6

It's this error:
https://github.com/Orange-OpenSource/YA … /issues/75

Re: general questions about PHP RPM for CentOS 6

AS I said pdo_cassandra is unmaintained, 4 years old code.

So you probably also need a 4 years old thrift.
I can build it using 0.9.1 (on Fedora).

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: general questions about PHP RPM for CentOS 6

make worked but only when I followed this advice from the above link:
"Changing all using apache::thrift::to_string; to using ::apache::thrift::to_string; in gen-cpp/cassandra_types.cpp solved this problem and lets me build the module."

Re: general questions about PHP RPM for CentOS 6

> make worked
Great.

But I hope you understand why I said this package is not a good candidate for official repo (fedora, EPEL) or remi repo...
Impossible to maintain downstream something which is not maintained upstream.

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