Skip to content
Advertisement

How to compile pcntl for PHP 7.4 and above?

I am attempting to compile the pcntl extension for PHP 7.4 and PHP 8 with the following commands (from Mac):

JavaScript

However, the make command is throwing the following error for every version of PHP >7.3:

JavaScript

How do I get around this error or get a compiled version of pcntl.so?

This same process works for PHP 4 to PHP 7.3

Advertisement

Answer

Download the latest MAMP version (which includes PHP 7.4.10 and PHP 8).

Then changed ./configure:

  • PHP 7.4.*: ./configure --with-php-config=/Applications/MAMP/bin/php/php7.4.12/bin/php-config
  • PHP 8.*: --with-php-config=/Applications/MAMP/bin/php/php8.0.0/bin/php-config

Afterwards my make command successful ran and generated the expected pcntl.so file.

Full command:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement