WL: PHP 5.4 for EL5

Bug #968561 reported by Eduardo Bragatto
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
IUS Community Project
Fix Released
Undecided
Jeffrey Ness

Bug Description

DESCRIPTION: PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.

REASON: Some of the key new features include: traits, a shortened array syntax, a built-in webserver for testing purposes and more. PHP 5.4.0 significantly improves performance, memory footprint and fixes over 100 bugs. It also removes the "EXPERIMENTAL" flag from PHP-FPM, making it "STABLE" now.

CAVEAT: Currently it's not possible to compile PHP 5.4 on EL5 due to sqlite3 dependency. PHP 5.4 requires 3.3.9 and EL5 uses 3.3.6. It requires creating a new sqlite3 package to satisfy this dependency.

Tags: whislist
tags: added: whislist
Revision history for this message
Jeffrey Ness (jeffrey-ness) wrote :

Thank you very much for creating this report Eduardo.

As you mentioned my findings while trying to build php54 under EL5 where that of EL5 lacks the needed SQLite version:

1. The SPEC which was taken from Fedora Rawhide has a BuildRequires of sqlite-devel >= 3.6.0

   http://bazaar.launchpad.net/~ius-coredev/ius/php54/view/head:/SPECS/php54.spec#L84

2. EL5 base only provides sqlite-devel-3.3.6:

  http://mirror.centos.org/centos/5/os/x86_64/CentOS/

3. When trying to lower this requirement to >= 3.3.0 I receive a SQLite version error in the configure:

  checking for OpenSSL support... yes
  checking for Kerberos support... yes
  checking for krb5-config... /usr/kerberos/bin/krb5-config
  checking for DSA_get_default_method in -lssl... yes
  checking for X509_free in -lcrypto... yes
  checking for pkg-config... /usr/bin/pkg-config
  checking for PCRE headers location... /usr/include
  checking for PCRE library location... /usr/lib64
  checking whether to enable the SQLite3 extension... yes, shared
  checking for sqlite3 files in default path... found in /usr
  checking for SQLite 3.3.9+... checking for sqlite3_prepare_v2 in -lsqlite3... no
  not found
  configure: error: Please install SQLite 3.3.9 first or check libsqlite3 is present
  error: Bad exit status from /var/tmp/rpm-tmp.49258 (%build)
     Bad exit status from /var/tmp/rpm-tmp.49258 (%build)

We will need to look in to these dependancies and see if we can possibly build an updated sqlite3 package for EL5

Revision history for this message
Jeffrey Ness (jeffrey-ness) wrote :

Turn out SQLite 3.3.9 had some missing API functionality,
however I have had success with SQLite 3.6.17 pulled from Fedora 12.

I'll get some builds together for testing and let you know.

Revision history for this message
Jeffrey Ness (jeffrey-ness) wrote :

Hello Eduardo,

After porting the SQLite 3.6.17 package over to a sqlite36 naming convention issues started to arise,
since sqlite and sqlite36 both provide the same version of shared library and sqlite3 binary they need to conflict.

Unfortunately sqlite is installed on all EL5 boxes as many core features depend on it:

# rpm -e sqlite
error: Failed dependencies:
        libsqlite3.so.0()(64bit) is needed by (installed) yum-metadata-parser-1.1.2-3.el5.x86_64
        libsqlite3.so.0()(64bit) is needed by (installed) python-sqlite-1.1.7-1.2.1.x86_64
        libsqlite3.so.0()(64bit) is needed by (installed) sqlite-devel-3.3.6-5.x86_64
        libsqlite3.so.0()(64bit) is needed by (installed) python31-3.1.4-1.ius.el5.x86_64
        libsqlite3.so.0()(64bit) is needed by (installed) php-pdo-5.3.9-1.1.rs.el5.x86_64
        libsqlite3.so.0()(64bit) is needed by (installed) rpm-libs-4.4.2.3-22.el5_6.3.x86_64
        libsqlite3.so.0()(64bit) is needed by (installed) rpm-4.4.2.3-22.el5_6.3.x86_64
        libsqlite3.so.0()(64bit) is needed by (installed) rpm-build-4.4.2.3-22.el5_6.3.x86_64
        sqlite = 3.3.6-5 is needed by (installed) sqlite-devel-3.3.6-5.x86_64

This being the case I do not see us moving forward with packaging a updated sqlite replacement package
for php54 under EL5.

Jeffrey-

Changed in ius:
status: New → Won't Fix
Revision history for this message
Jeffrey Ness (jeffrey-ness) wrote :

Looks like Remi has been building php-5.4 for el6 the same way we have,
but on el5 the shared sqlite library is not included:

        --with-pdo-sqlite=shared,%{_prefix} \
  %if 0%{?fedora} >= 11 || 0%{?rhel} >= 6
        --with-sqlite3=shared,%{_prefix} \
  %else
        --without-sqlite3 \
  %endif

I'll see about getting the php54 package to handle el5 in a similar matter.

Changed in ius:
status: Won't Fix → New
assignee: nobody → Jeffrey Ness (jeffrey-ness)
Revision history for this message
Jeffrey Ness (jeffrey-ness) wrote :

Build php54-5.4.0-5.ius has been created for additional EL5 support,
this will be available in IUS Testing on tonights sync.

Revision history for this message
Christiaan Kortekaas (mrangryfish) wrote :

Looks good, but can the php53u-pear and php53u-pecl* packages be ported to php54 too? PHP54 doesn't seem as fast without pecl-apc especially.

Revision history for this message
Jeffrey Ness (jeffrey-ness) wrote :

Hello Christiaan,

Thanks for your response.

Yes, pear and apc will be created for php54 very soon,
and additional modules will be added as requested.

At the moment were trying to focus on getting the php54 package
tested and ported in to stable, but I hope to have these packages available
around the same time php54 hits stable.

Jeffrey-

Revision history for this message
Jeffrey Ness (jeffrey-ness) wrote :

php54 along with pear and apc have been released to IUS Stable

Changed in ius:
status: New → Fix Released
Revision history for this message
Christiaan Kortekaas (mrangryfish) wrote :

Nice work guys! However you have included APC 3.1.9 (stable) which does not support php5.4.

You need to include APC 3.1.10 (beta) which supports php5.4 : http://pecl.php.net/package-changelog.php?package=APC&release=3.1.10

If you use APC 3.1.9 and try and start php-fpm you get an error like:
*** glibc detected *** php-fpm: free(): invalid pointer: 0x00002b27a90ec098 ***

In the mean time you work around this by not installing php54-pecl-apc and instead:

yum install php54-devel
pecl install apc-3.1.10

Then php-fpm starts without any errors. Even though 3.1.10 is (beta) it seems ok.. and is better than 3.1.9 for php54.

We very much appreciate your work on this Jeffrey!

Cheers,
Christ

Revision history for this message
Dustin Henry Offutt (dhoffutt) wrote :

Hello Christ,

Package php54-pecl-apc-3.1.10-ius will be pushed to testing on tonight's sync.

Thank you, Dusty

Revision history for this message
Dustin Henry Offutt (dhoffutt) wrote :

Hello again Christ,

Please be aware of PHP Bug #61695 "Incorrect version tag: APC 3.1.10 shows 3.1.9" (https://bugs.php.net/bug.php?id=61695), which causes the incorrect version of APC to be sourced.

From the link:
========================
Description:
------------
Incorrect version noted in php_apc.h;

#define PHP_APC_VERSION "3.1.9"

Expected result:
----------------
This should read;

#define PHP_APC_VERSION "3.1.10"
========================

Thank you, Dusty

Revision history for this message
Dustin Henry Offutt (dhoffutt) wrote :

Christ,

Apologies for the extra noise. The correct version of APC is sourced, it just reports the wrong version when queried.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.