Questions tagged [php-fpm]

PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.

PHP-FPM provides a number of useful features over the traditional FastCGI php implementation. It is implemented as a daemon that controls one or more PHP process 'pools' which can be independently configured. Main configuration options for each pool include:

  • Socket on which requests are received (either local or TCP)
  • Separate php.ini settings for specific application requirements
  • Dynamic process control. FPM can dynamically change the number of worker processes depending on pool load.
  • Uid/gid for the pool workers
  • In-flight configuration updates - a change to the pool configuration will be rolled out gracefully across all pool workers without losing connections.
2118 questions
8
votes
2 answers

Apache2 fcgid (not FastCGI) with PHP FPM

Apache2 has a built in fastcgi replacement, called fcgid. That's fine, but it lacks the FastCgiExternalServer directive, which I used to connect to the PHP-FPM. How can I do the same with the fcgid module in apache2? My goal is to use php-fpm with…
Jauzsika
  • 651
  • 1
  • 4
  • 10
8
votes
2 answers

PHP5-FPM does not create unix socket directory within /var/run

I've set up my php5-fpm to bind to a unix domain socket within /var/run/php5-fpm. /etc/php5/fpm/pool.d/www.conf listen = /var/run/php5-fpm/$pool.sock The problem is that it will not automatically create the php5-fpm directory. When I reboot the…
igorw
  • 181
  • 1
  • 3
8
votes
3 answers

What is wrong in my php-fpm configuration?

I have a 64-bit server but only 256MB of RAM. So, I moved to nginx server with fast-cgi to connect to PHP. I have PHP 5.3.6 running. The issue is that after every two or three days when I try to access any PHP page then I get server internal error.…
AppleGrew
  • 417
  • 2
  • 6
  • 14
8
votes
7 answers

How do I make Nginx redirect all requests for files which do not exist to a single php file?

I have the following nginx vhost config: server { listen 80 default_server; access_log /path/to/site/dir/logs/access.log; error_log /path/to/site/dir/logs/error.log; root /path/to/site/dir/webroot; index index.php index.html; …
Richard
  • 836
  • 2
  • 8
  • 21
8
votes
3 answers

Nginx + Php5-fpm not rendering php files

I've spent hours figuring out how to install Nginx + Ruby Enterprise Edition + PHP5-fpm and MYSQL, finally it is all installed and all seems to have started fine. But for some reason php files are not being processed. .html files work fine, but when…
Emmanuel
  • 347
  • 1
  • 9
  • 20
7
votes
3 answers

AH01071: Got error 'Primary script unknown\n' apache2.4 php-fpm7.2

I seem to be getting these lines in my /var/log/apache2/error.log and the corresponding records in /var/log/apache2/access.log /var/log/apache2/error.log [Fri Sep 20 02:28:36.654357 2019] [proxy_fcgi:error] [pid 28619:tid 140003157985024] [client…
Dan
  • 173
  • 1
  • 1
  • 7
7
votes
2 answers

Docker + Nginx + PHP-FPM error: [emerg] 1#1: host not found in upstream

I have a docker setup for LEMP stack that I cloned from this repo. Everything works nicely on my development machine running window 10, but when I push the image to docker hub and pull it on my VPS no matter what I do I always get this error:…
samayo
  • 277
  • 3
  • 5
  • 17
7
votes
1 answer

Setting max_execution_time for PHP7 and Nginx

I followed this guide and updated the values: /etc/php/7.0/fpm/php.ini and change/add this: max_execution_time = 300 and /etc/php/7.0/fpm/pool.d/www.conf as well and change/add this: php_admin_value[max_execution_time] = 300 and…
Nimbuz
  • 149
  • 1
  • 1
  • 8
7
votes
3 answers

proxy_fcgi:error (70008)Partial results are valid but processing is incomplete. AH01075

I have a server running with: Ubuntu 16.04 Apache 2.4.18 WORKER-MPM PHP 7.0.8-0ubuntu0.16.04.3 PHP-FPM OPcache 7.0.8-0ubuntu0.16.04.3 On the browser there is an ajax script that each 5 sec sends a query to a php file to update a timestamp on the…
Cristian Sepulveda
  • 171
  • 1
  • 1
  • 6
7
votes
1 answer

Nginx - populate REQUEST_URI with rewritten URL

I have an Nginx configuration that is for a new PHP application that has the same functionality as another legacy PHP application, but different URLs. I want to preserve the paths of the old application, replacing the /foo path prefix with /page…
chiborg
  • 1,083
  • 2
  • 13
  • 27
7
votes
1 answer

php slowlog causing ptrace error in docker container

I have an AWS Linux host machine running a centos 7 docker container with 5.5.25 and php-fpm running inside it. Php is exposed outside of the docker container over port 9000 and is serving requests to an nginx server. This setup has been working…
Andrew Kett
  • 321
  • 2
  • 9
7
votes
4 answers

Nginx error stating connection refused to PHP-FPM port

Newly create LEMP stack running PHP-FPM on Ubuntu 14.04 x64. Attempting to access some PHP in my webroot. Browser is showing 502 Bad Gateway and Nginx error log is showing the following (my IP and production IP removed): TIME [error] 22838#0: *7…
sparecycle
  • 459
  • 1
  • 6
  • 19
7
votes
1 answer

why is php-fpm running as nobody?

I recently installed php-fpm on my server (CENTOS 6.5 x86_64 standard, WHM 11.44.1 (build 7)) following the instructions here: http://infoliser.com/how-to-configure-apache-2-2-with-php-fpm-using-whm-cpanel-and-easyapache/ The server API, as revealed…
zaxxon
  • 73
  • 1
  • 3
7
votes
2 answers

SElinux label for php-fpm sockets

I'm attempting to set up multiple instances of php-fpm to run multiple versions of php through apache 2.2 running on centos 6.5. At some point in the future this will end up in a shared hosting environment, so I need the tightest security…
Mikk3lRo
  • 183
  • 1
  • 7
7
votes
2 answers

Docker + nginx + Php-FPM 502 Bad Gateway

I'm trying to install php-fpm and nginx via docker and I have a problem with nginx which returns me a 502 Bad gateway error, however when I try to go on any HTML file only displays correctly. What must I do to a php file works correctly with this…
Flug
  • 131
  • 1
  • 1
  • 8