This week I finally took the plunge and upgraded most of the servers I work with from PHP 7.1 to PHP 7.2. (Some of them still can't be brought forward due to dependencies that use mcrypt.) I ran into a few snags with the upgrade to 7.2 and thought I'd document them here. This may be useful if you:
- Run CentOS Linux 6.x (6.9 in my case),
- Want to install PHP 7.2,
- Need pthreads support in PHP, and
- Prefer to compile PHP from source
In order to build PHP 7.2 with pthreads on CentOS 6, you must upgrade to autoconf 2.64, which must be done manually instead of via the yum package manager. You'll also have to first build PHP 7.2 without pthreads, then use this "bootstrap" copy to prepare the pthreads extension before compiling PHP a second time.
Start by installing autoconf 2.64. The latest version available through yum is 2.63, which isn't sufficient to build PHP's configure script.
It's critical that you supply the
--prefix=/usr option when ...