Zend Thread Safety is a Thread-safe PHP interpreter for use with the Apache HTTP Server.
Questions tagged [zts]
20 questions
5
votes
1 answer
Why PHP ZTS is disabled by default?
Why ZTS is disabled by default and we should compile PHP source to achieve Threading ability?
Is there any limitation or side effect when we enable ZTS? Is it unstable?

Mostafa Lavaei
- 1,960
- 1
- 18
- 27
5
votes
1 answer
PHP, enable ZTS, Pthreads
I need ZTS to be enabled in php. So I recompiled php from source with '--enable-maintainer-zts' option. Now I have:
"php -v"
PHP 7.0.11 (cli) (built: Oct 3 2016 12:19:10) ( ZTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright…

Makhach
- 51
- 1
- 4
4
votes
4 answers
how to install new php parallel (7.2+) on windows and maybe wampserver
new php parallel. it's new and there is no troubleshooting about it anywhere and the only documentation about it, is php.net itself which is not enough.
this is what I did (per instructions):
installed latest version of WAMP(3.1.9 x64).
installed…

Miky1992
- 133
- 1
- 5
4
votes
1 answer
Call to get resource in PHP 7.3.4 intermittently returns nullptr
I am investigating a crash which is occurring when our C++ program calls ts_resource(0) in PHP 7.3.4.
The code was written by a developer who has since left the company and I have very little knowledge of PHP. The original code was written for PHP…

KRag
- 51
- 3
2
votes
2 answers
How to compile PHP 7.1 with ZTS
I see on the github PThread project page that php7+ is supported.
I have php7.1.6 on an ubuntu distribution (16.04)
I can't find any PPA that offer php7.1-zts.
How can i enable zts on php7.1 to install pthreads ?

Khorwin
- 445
- 1
- 9
- 27
2
votes
1 answer
pthread on PHP extension
I develop actually an PHP extension (PHP 5.6) (this extension will be only used on Linux server), in this extension I would like to use C pthread.
Is it possible to make an PHP extension which uses pthread, without having to compile PHP with the ZTS…

simon
- 1,180
- 3
- 12
- 33
1
vote
1 answer
setlocale() has been disabled for security reasons
PHP 7.4.16 (ZTS) with parallel extension installed running Laravel 7.
ini_get('disable_functions'); returns an empty string.
I can write a script that calls setlocal(0,0) from the main process and it works without throwing an exception. This error…

Jesse Skrivseth
- 481
- 2
- 13
1
vote
0 answers
How can I fix memory leak in my Codeigniter app running PHP with Pthreads ? Fatal Error: Allowed memory size of 2147483648 bytes exhausted
I am running a CodeIgniter App on top of Nginx and PHP-FPM .
PHP was manually compiled with ZTS and Pthreads support
I am trying to run the pending tasks from the App with a cron (php spark task:run tasks) in CLI and getting this error every time…

Optimus Servers
- 47
- 8
1
vote
1 answer
PhalconPHP install undefined symbol: compiler_globals
I installed php 7.2.2 with ZTS enabled.
PHP 7.2.2 (cli) (built: Jul 20 2018 17:47:46) ( ZTS DEBUG )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.2, Copyright (c)…

Maarten Raaijmakers
- 615
- 2
- 8
- 20
0
votes
0 answers
PHP-FPM (ZTS) service stuck on 'activating' but is working, then fails after 20 Minutes
i have quite a weird problem with my php-fpm.service. I use Ubuntu 22.04 and I compiled PHP (ZTS) 7.4.33 and 8.0.26 from source with --with-apxs2=/usr/bin/apxs2, --enable-parallel and other Options successfully. Created the phplib.so and configured…

wayneOS
- 1,427
- 1
- 14
- 20
0
votes
1 answer
PHP ZTS Container stops immediately
I am attempting to create a Docker container using the official PHP 7.4 ZTS image without making any modifications. However, when I start the container, it immediately stops as if the entrypoint is incorrect.
My Dockerfile contains the following…

Ivan Stadius
- 17
- 4
0
votes
0 answers
How to install ZTS and pThreads in CentOS 7?
I have this installation of CentOS 7 linux in my server. Currently I use
pcntl_fork
but I find it a very crude solution and wanted to use pThreads. My problem is my server running CPanel/WHM has no option for installing pThreads.
So, how do I…

gprialde
- 1
- 4
0
votes
1 answer
Recompile PHP with ZTS enabled on MAC OS X
Homebrew PHP does not support a thread-safe php binary. Is there any way to enable ZTS in brew version.
I tried phpbrew as well but, I am getting an error "Command too long". Could you please suggest me the best way to enable ZTS in MACOS Catalina.

Deep Swaroop Sachan
- 148
- 1
- 1
- 8
0
votes
0 answers
How to enable zts and re-compile php on ubuntu18.04
I'm not native, sorry my bad grammar.
I'm using PHP 7.3.8 on Ubuntu 18.04 and I want to enable ZTS and recompile PHP. I have tried several times but didn't work.
May you guide me?
I tried https://www.rapidspike.com/blog/php7-pthreads/
and in…

Karen Parsa
- 1
- 1
0
votes
0 answers
Docker PHP: pthreads and fpm
I have project running on Apache and PHP7 to handle web requests (UI, Forms, etc), it's build on Symfony components, if that makes any difference.
In addition to this, I have a console command that is using pthreads to sent emails concurrently (for…

Dan F.
- 1,353
- 16
- 23