Estou tentando configurar o fastcgi (fcgi) no meu servidor local.
Seguiu os seguintes passos
apt-get remove libapache2-mod-php5
apt-get install libapache2-mod-fcgid
apt-get install php5-cgi
a2dismod mpm_prefork
a2enmod mpm_worker
Um wrapper / usr / local / bin / php-wrapper com o seguinte conteúdo:
#!/bin/sh
# Set desired PHP_FCGI_* environment variables.
# Example:
# PHP FastCGI processes exit after 500 requests by default.
PHP_FCGI_MAX_REQUESTS=10000
export PHP_FCGI_MAX_REQUESTS
# Replace with the path to your FastCGI-enabled PHP executable
exec /usr/bin/php-cgi
Também está incluído o seguinte em /etc/apache2/sites-enabled/000-default
<Ifmodule mod_fcgid.c>
# FCGID registers a handler named fcgid-script
AddHandler fcgid-script .php
Options +ExecCGI
FcgidWrapper /usr/local/bin/php-fcgid-wrapper
</IfModule>
colocou isso sob o bloco vhost e
<Ifmodule mod_fcgid.c>
# Context - server config
FcgidMaxProcesses 150
# Otherwise php output shall be buffered
FcgidOutputBufferSize 0
</IfModule>
fora do bloco vhost de acordo com o tutorial
Estas etapas foram listadas no Tutorial e depois de concluir as etapas quando reinicio o apache, recebo o seguinte erro:
[Sun Feb 14 22:52:07.754730 2016] [:crit] [pid 4125:tid 140496425252736] Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP.
AH00013: Pre-configuration failed
Action 'restart' failed.
The Apache error log may have more information
Eu pesquisei sobre esse erro a maioria deles sugeriu apt-get install php-cgi
por isso não sei como depurar este problema.
os registros do apache mostram isso
[Sun Feb 14 21:12:15.855814 2016] [core:notice] [pid 3362] AH00094: Command line: '/usr/sbin/apache2'
[Sun Feb 14 21:12:24.602322 2016] [mpm_prefork:notice] [pid 3362] AH00169: caught SIGTERM, shutting down
[Sun Feb 14 21:12:29.981599 2016] [mpm_prefork:notice] [pid 3432] AH00163: Apache/2.4.7 (Ubuntu) mod_fcgid/2.3.9 PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Sun Feb 14 21:12:29.981673 2016] [core:notice] [pid 3432] AH00094: Command line: '/usr/sbin/apache2'
Alguém pode me guiar ou me ajudar como isso está acontecendo?