Topic: Installing pecl extension which support zts, using remi php-devel

Hi,

I have successfully install php extension which support zts using remi, and running now.
Btw, I need another extension, timezonedb, to support zts. And I have install remi's php-devel.

Then, I Install it using command: pecl install timezonedb, but only non-thread-safe extension installed.
How to do it correctly?


Thanks.

This is my remi repository entry in yum:
*I Have remove "http://" string.

[remi]
name=Les RPM de remi pour Enterprise Linux 6 - $basearch
#baseurl=__rpms.famillecollet.com/enterprise/6/remi/$basearch/
mirrorlist=__rpms.famillecollet.com/enterprise/6/remi/mirror
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-php55]
name=Les RPM de remi de PHP 5.5 pour Enterprise Linux 6 - $basearch
#baseurl=__rpms.famillecollet.com/enterprise/6/php55/$basearch/
mirrorlist=__rpms.famillecollet.com/enterprise/6/php55/mirror
# WARNING: If you enable this repository, you must also enable "remi"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-php56]
name=Les RPM de remi de PHP 5.6 pour Enterprise Linux 6 - $basearch
#baseurl=__rpms.famillecollet.com/enterprise/6/php56/$basearch/
mirrorlist=__rpms.famillecollet.com/enterprise/6/php56/mirror
# WARNING: If you enable this repository, you must also enable "remi"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-test]
name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch
#baseurl=__rpms.famillecollet.com/enterprise/6/test/$basearch/
mirrorlist=__rpms.famillecollet.com/enterprise/6/test/mirror
# WARNING: If you enable this repository, you must also enable "remi"
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-debuginfo]
name=Les RPM de remi pour Enterprise Linux 6 - $basearch - debuginfo
baseurl=__rpms.famillecollet.com/enterprise/6/debug-remi/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-php55-debuginfo]
name=Les RPM de remi de PHP 5.5 pour Enterprise Linux 6 - $basearch - debuginfo
baseurl=__rpms.famillecollet.com/enterprise/6/debug-php55/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-php56-debuginfo]
name=Les RPM de remi de PHP 5.6 pour Enterprise Linux 6 - $basearch - debuginfo
baseurl=__rpms.famillecollet.com/enterprise/6/debug-php56/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-test-debuginfo]
name=Les RPM de remi en test pour Enterprise Linux 6 - $basearch - debuginfo
baseurl=__rpms.famillecollet.com/enterprise/6/debug-test/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Re: Installing pecl extension which support zts, using remi php-devel

You DON'T need this extension wink
(else it will be available in the repo)

The PHP package doesn't use the internal tzdata, but the system one. So this extension have no value. If system tzdata package is latest version, PHP will use it.

Notice: ZTS is not supported upstream [1].... better to use php-fpm with apache in thread mode.


[1] http://fr2.php.net/manual/en/install.unix.apache2.php

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: Installing pecl extension which support zts, using remi php-devel

> The PHP package doesn't use the internal tzdata, but the system one. So this extension have no value. If system tzdata package is latest version, PHP will use it.

So timezonedb ext, coded in a way, that it can not be build in thread safe mode?
*I know a little about php ext development.

Thanks.

Re: Installing pecl extension which support zts, using remi php-devel

timezonedb, like all ext, cannot be build for ZTS using the pecl command.
It can probably be build manually (using zts-phpize...)

But again. This extension have no value with RPM of PHP.

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: Installing pecl extension which support zts, using remi php-devel

> It can probably be build manually (using zts-phpize...)

Thanks for your tips, it is working now.
In the beginning I'm confused "zts-php-config zts-phpize" with "php-zts-config phpize-zts".

Re: Installing pecl extension which support zts, using remi php-devel

But again, I really think you DON'T need this extension.

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: Installing pecl extension which support zts, using remi php-devel

> But again, I really think you DON'T need this extension.

But I really don't understand what you mean. sad

In my experiences, this extension affected php's timezone related function, for example: timezone_identifiers_list().
This extension update php's timezone's entry list.

Re: Installing pecl extension which support zts, using remi php-devel

This extension update "internal" php timezone database.
This is required is you use a old PHP version.

BUT the RPM DON'T use the "internal" timezone database, but the system one.
So, as far as you update the tzdata package, you have the latest timezone database.

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: Installing pecl extension which support zts, using remi php-devel

> This extension update "internal" php timezone database.
> This is required if you use a old PHP version.

Oh yes, previously, I use 5.3 version.
Now I'm upgrade to 5.4.