PHP

Use of undefined constant SIGINT

Recently, while setting up a FreeBSD laptop, I was configuring Phpactor as Language Server for PHP. The idea was to have it working in Vim through the YouCompleteMe plugin.

While trying to start the Phpactor server, I received the following error (among others):

Use of undefined constant SIGINT - assumed 'SIGINT' (this will throw an Error in a future version of PHP)

The reason for this is that, as indicates PHP site:

Process Control support in PHP is not enabled by default. You have to compile the CGI or CLI version of PHP with --enable-pcntl configuration option when compiling PHP to enable Process Control support.

Nonetheless, you are no required to recompile your PHP binaries. Chances are there’s a PHP package which provides this functionality for PHP.

In my case (FreeBSD), I found the package by issuing the following command:

$ pkg search pcntl

And as I’m using PHP 7.4, I installed php74-pcntl-7.4.29 package:

$ pkg install php74-pcntl-7.4.29

After installing the package, the problem mentioned at the beginning of this post was solved.

Tagged , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *