Docker image with Apache 2.2 and PHP 5.3

If you feel nostalgia or you just need to run an old piece of PHP code here is a Docker image with Apache 2.2 and PHP 5.3 based on Debian Stretch: As this container is aimed for development the UID of the www-data user is set to 1000. The reason being that usually the first…

PHP 8.0.0 alpha

PHP 8.0.0 alpha 1 was released yesterday so I immediately went and compiled new images – kenashkov/php:8.0.0-alpha-1-cli-stretch and kenashkov/php:8.0.0-alpha-1-swoole-4.5.3-alpha (Swoole master is used, as 4.5.2 doesnt compile against PHP 8) and here is a good article outlining the new things in PHP 8 (JIT & Union Types yay!!!).

PHP blogs and resources collection

This is a list of the blogs of various people contributing to the PHP and other PHP resources in no particular order. Core PHP contributors Julien Pauli Nikita Popov Anthony Ferrara Sara Golemon Derick Rethans Joe Watkins Zeev Suraski Andi Gutmans (old blog) Ilia Alshanetsky Anatoliy Belsky PHP ecosystem contributors Fabien Potencier Benjamin Eberlei Nicolas…

Swoole 4.5.0

Swoole 4.5.0 is available! One thing that is not mentioned in the notes there is that the \Swoole\Server::getInstance() got removed as it was considered that not every code/library should have access to the Server instance. Instead now only the worker ID is available through \Swoole\Server::getWorkerId(). There is a bug though and this method can not…

An old bug that turned out to be exploitable UAF vulnerability

Almost two year ago I reported a bug #76047 for which initially I didn’t understand the root cause until Nikita Popov explained it was a Use after free issue in debug_backtrace() obtained in destructor. Back then I didn’t manage to get a short reproduction case until yesterday when it was reported that there is an…

Swoole 4.4.12 is out

Swoole jumped few versions from 4.4.8 to 4.4.12 but a lot of changes got in. including a fix allowing Swoole to work with PHP 7.4 Preload. The docker images I have are updated.

Performance comparison between Swoole and Apache/mod_php

I just finished a performance comparison between Swoole and Apache/mod_php (PHP 7.3) but not just in synthetic tests but tests that are closer to real world application. If you find a mistake or you would like to have anything added please create a Pull Request or let me know here in the comments. To view…

PHP 7.4 RC5 is out

In the last day of October PHP released RC5 of the next minor version 7.4. The most important fix in this version is the __set() call when a non-initialized typed property is set. Due to this we had to do a workaround in Guzaba2 framework but this is now fixed. The new images based on…

PHP 7.4 Debian Stretch images

Since there are still no official images for PHP 7.4 (RC4) based on Debian stretch I have created some. The Swoole image also has several other modules. There are also some bash scripts for container start in the Github repo. The changes in the Dockerfile compared to 7.3 include the addition of −−with-pear (Pear is…

Connection Pools and resource management in Swoole

Introduction In this post I will explain the idea of resource pool and how it should be used. A resource pool is a limited pool from which a resource is obtained, used and then released back to the pool for other threads to use it. Usually these pools are actually connection pools so from now…