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.
2053 questions
183
votes
18 answers

How do you restart php-fpm?

I need to reload my php.ini and there's nothing in the help dialog about restarting it.
Galen
  • 1,983
  • 2
  • 12
  • 10
119
votes
16 answers

Nginx 1 FastCGI sent in stderr: “Primary script unknown”

My first time using Nginx, but I am more than familiar with Apache and Linux. I am using an existing project and when ever I am trying to see the index.php I get a 404 File not found. Here is the access.log entry: 2013/06/19 16:23:23 [error] 2216#0:…
We0
  • 1,389
  • 2
  • 10
  • 11
102
votes
1 answer

Differences and dis/advanages between: Fast-CGI, CGI, Mod-PHP, SuPHP, PHP-FPM

There are few different php "wrappers"(?). What are differences between them? Tried to google some, but cant seem to find informations. (mod-php is not googleable). Why might I choose one over another?
Gacek
  • 1,181
  • 2
  • 9
  • 10
73
votes
2 answers

php5-fpm: server reached pm.max_children

I have Nginx + php5-fpm. Several times per hour my website stucks and in logfile I see the following: WARNING: [pool www] server reached pm.max_children setting (5), consider raising it. /etc/php5/fpm/pool.d/www.conf file contains the following…
user1821484
  • 1,119
  • 2
  • 13
  • 18
67
votes
3 answers

Is the PHP option 'cgi.fix_pathinfo' really dangerous with Nginx + PHP-FPM?

There has been a lot of talking about a security issue relative to the cgi.fix_pathinfo PHP option used with Nginx (usually PHP-FPM, fast CGI). As a result, the default nginx configuration file used to say: # NOTE: You should have…
Totor
  • 2,876
  • 3
  • 22
  • 31
54
votes
7 answers

PECL command produces long list of errors

Currently running PHP 5.4 on CentOS 6.5. I installed the webtatic php55w package then installed PEAR+PECL without issue along with redis and mongo through PECL. Shortly after, I realized 5.5 is not compatible with the framework I was working with so…
eComEvo
  • 971
  • 3
  • 17
  • 31
38
votes
6 answers

Increase PHP-FPM's max upload/post size

I'm running php5-fpm under Nginx on Ubuntu 14.04. I want to increase the max upload size. I have edited my /etc/php5/fpm/php.ini to have the following lines defined as below: upload_max_filesize = 20M post_max_size = 25M and I restarted php5-fpm…
harryg
  • 841
  • 2
  • 10
  • 19
36
votes
13 answers

Apache 2.4 + PHP-FPM + ProxyPassMatch

I recently installed Apache 2.4 on my local machine, together with PHP 5.4.8 using PHP-FPM. Everything went quite smoothly (after a while...) but there is still a strange error: I configured Apache for PHP-FPM like this:
apfelbox
  • 465
  • 1
  • 5
  • 7
36
votes
3 answers

nginx + php-fpm - where are my $_GET params?

I have a strange problem here. I just moved from apache + mod_php to nginx + php-fpm. Everything went fine except this one problem. I have a site, let's say example.com. When I access it like example.com?test=get_param $_SERVER['REQUEST_URI'] is…
egis
  • 507
  • 1
  • 4
  • 8
36
votes
9 answers

Nginx + php-fpm "504 Gateway Time-out" error with almost zero load (on a test-server)

After debugging for 6-hours - I am giving this up :| We have a nginx+php-fpm+mysql in LAN with almost 100 wordpress (created and used by different designers/developers all working on test wordpres setup) We are using nginx without any issues from…
rahul286
  • 1,647
  • 4
  • 20
  • 25
35
votes
1 answer

Constantly have to reload PHP-FPM

We have a fairly heavily loaded server running nginx and PHP-FPM. We have 6 websites on this server, running PHP-FPM and nginx. Software is all vBulletin 3.8 and WordPress. Databases are on a separate server. Now, because these are highly popular…
Kevin
  • 767
  • 3
  • 12
  • 23
31
votes
3 answers

How to get php-fpm to log to stdout / stderr when running in a docker container

I have php-fpm in a docker container and in the Dockerfile I edit the fpm config file (/etc/php5/fpm/pool.d/www.conf) to set up access logs to go to /var/log/fpm-access.log and error logs to go to /var/log/fpm-php.www.log: # Do some php-fpm config #…
Tom
  • 4,157
  • 11
  • 41
  • 52
27
votes
9 answers

Apache2 Proxy timeout

I have Apache2 with PHP + PHP-FPM configured according to: http://wiki.apache.org/httpd/PHP-FPM I am writing a script that will take a long time to execute on an internal Vhost, but keep getting timed out, everything runs flawlessly if the script…
wyqydsyq
  • 385
  • 1
  • 3
  • 9
23
votes
4 answers

nginx + PHP-FPM = "permission denied" error 13 in nginx log; configuration mistake?

I've got nginx 0.7x + PHP-FPM running under PHP 5.2.10 on one RHEL5 server, but trying to duplicate that setup under the bundled-in PHP-FPM in PHP 5.3.3 on a second server, I'm having some trouble with permission errors every time there's a GET. FPM…
Peter Kirn
  • 333
  • 1
  • 2
  • 5
22
votes
2 answers

What is the difference between using upstream and location for php-fpm?

I've been searching around but couldn't find a straight answer, if someone could please clarify this, would be greatly appreciated, thanks! location ~ \.php$ { try_files $uri = 404; fastcgi_pass unix:/run/php-fpm/php-fpm.sock; …
Van Nguyen
  • 568
  • 3
  • 6
  • 15
1
2 3
99 100