I am attempting to use pthreads with Apache FPM. Step 1. After installing and recompiling php according to: https://blog.programster.org/ubuntu16-04-compile-php-7-2-with-pthreads The server works as expected and I can run pthreads from CLI. Step 2. Then I need to run threads from a web server so I followed the instructions from: https://antrecu.com/blog/run-php7-fpm-apache-mpmevent-ubuntu-1604 After sudo service apache2 restart && sudo service php7.0-fpm restart: