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

learn more… | top users | synonyms (2)

1
vote
1answer
31 views

Nginx serving .PHP as a download only when .php is added with arguments

Here is my current nginx config: server { server_name mydomain.example; access_log /srv/www/mydomain.example/logs/access.log; error_log /srv/www/mydomain.example/logs/error.log; root ...
6
votes
1answer
1k views

Nginx + PHP-FPM produce 502 bad gateway instead of fatal error?

I'm currently testing Symfony2 with Nginx and PHP-FPM. I also use Xdebug. Symfony2 comes with a Demo bundle, I wanted to test the new handling of fatal errors which comes with Symfony 2.2.0 by ...
16
votes
7answers
72k views

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 ...
4
votes
2answers
3k views

Nginx + PHP-FPM Timeouts, almost zero load consumption?

I've got a server running on a Linode with Ubuntu 10.04 LTS, Nginx 0.7.65, MySQL 5.1.41 and PHP 5.3.2 with PHP-FPM. There is a WordPress blog on it, updated to WordPress 3.2.1 recently. I have made ...
3
votes
2answers
7k views

403 Forbidden when trying to access a folder in document root of nginx

When I access index.php, it works fine. But on localhost/pset7, it gives a 403. Here is the permission log, -rw-r--r--. 1 root root 51 Jul 31 14:21 index.html -rw-r--r--. 1 root ...
0
votes
0answers
13 views

Jail php (nginx + unix socket) in a folder

I have to store two php applications in a single server. Following my current setup: /etc/php5/fpm/pool.d/app1.conf [app1] user = app1 group = app1 listen = /var/run/php5-fpm-app1.sock listen.owner ...
-1
votes
0answers
8 views

Php-fpm pools configuration for multiple websites in Centos 7

After following this tutorial for installing Lemp on Centos 7, I decided to host multiple sites on the same Virtual Server. Using Nginx i created a server block for each site, and everything worked ...
2
votes
1answer
28 views

Run a specivic (older) php version with nginx, php-fpm on debian

In order to migrate old php software, I want to run php 5.3.* so I: Removed php via apt-get purge php* Added the corresponding http://snapshot.debian.org/archive/debian/ to the sources Installed ...
0
votes
1answer
1k views

Vagrant, nginx 404 - fastcgi sent in stderr unable to open primary script

Was googleing a lot of and didn't find solution for this. Have found few accepted answers here on stackoverflow, but they didn't helped me. I am using vagrant for development, or at least trying to ...
1
vote
1answer
45 views

PHP 7 and 5.6 parallel in Nginx

I want to use PHP 7 with newer apps and PHP 5.6 with apps, that doesn't work with PHP 7. So I try to configure Nginx to enable different PHP versions for different pathes. But it doesn't work: # ...
2
votes
1answer
2k views

Getting 502 bad gateway after updating php to 5.5

On my ubuntu 12.10 server I upgraded php to 5.5. After getting 502 errors on my wordpress site I did some googling and discovered I need to change my nginx configs to match the passing of php scripts ...
3
votes
1answer
38 views

php-fpm and nginx @ high CPU usage?

My server is with DigitalOcean with the following plan: 2 Core Processor 2 GB Memory My website is receiving thousands of visitors, however, both CPU cores are @ 100%: The issue seems to be with ...
0
votes
1answer
20 views

nginx + php-fpm is extremely slow

I have a very low tier VPS - 1GB ram and 1 CPU w/ 30gb SSD running CentOS (v7.2.1511). The server only servers php-fpm (v5.4.16) and nginx (1.6.3). Mysql and Mongo databases are on another server. I ...
0
votes
3answers
3k views

Laravel on nginx+php-fpm returns blank page

I'm having this issue with Laravel which is served by nginx + php-fpm, it's just returning a blank page. Neither nginx nor php nor laravel are logging any errors at all. When running the index.php ...
1
vote
0answers
22 views

PHP page refuses to appear despite checking php-fpm, SELinux, and nginx

Problem I have a small web server that hosts a small PHP page that performs a very small function. I used to host this on another machine. I move the website to a new machine with a different ...
3
votes
1answer
1k views

NGINX Internal Load Balancing + PHP-FPM Upstream causing random double request / submission

We are having a very serious problem where during seemingly random times, we get a duplicated request that is processed by our application. Typically, a user submits a form and occasionally will save ...
0
votes
1answer
2k views

PHP-FPM Can't create enough children and stops serving requests

I'm new to PHP-FPM and I've noticed at random intervals it will seemingly just lock up. [26-Dec-2014 22:50:16] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or ...
0
votes
2answers
1k views

Chroot doesn't work in PHP5-FPM + nginx

I have added two line in: "/etc/php5/fpm/php-fpm.conf". There are: chroot = /home/user/www/public_html chdir = / In the server section of my: /etc/nginx/sites-available/default: root ...
2
votes
2answers
3k views

Optimize php-fpm and varnish for a powerfull server

My setup is: Intel® Core™ i7-2600 and RAM 16 GB DDR3 RAM varnish+nginx+php-fpm+apc for a not very heavy WordPress blog with W3 Total Cache and CDN My problem is that after 55 hits per second ...
0
votes
0answers
18 views

Why was my max_children reset on server restart?

A week ago, I modified my /etc/php-fpm.conf file and changed pm.max_children = 215 to pm.max_children = 130 Last night, I scheduled a reboot and this morning, when I came in we were again at ...
0
votes
1answer
48 views

PHP 7 cannot connect to MySQL

I have compiled LAMP servers for hundreds of times. However I am facing issues with PHP 7. I compiled it properly, but it cannot connect to MySQL in localhost. phpinfo shows PDO and mysqli are ...
2
votes
2answers
2k views

jetty server executing php

I want to configure so that jetty runs PHP files, but have been unsuccessful so far. I have Jetty WTP tools installed in my Eclipse IDE. When I start up the Jetty server. I got the exception: ...
0
votes
1answer
2k views

PHP-FPM save sessions in memcached

I'm trying to switch my session_handler to memcached, I'm not sure if it worked, it does not look like it did. vi /etc/php5/fpm/php.ini session.save_handler = memcached session.save_path = ...
0
votes
0answers
28 views

NGINX returning 404 error for just one file

I have an NGINX setup with virtual hosts running on Ubuntu 15. On one of them, suddently, a file called assigndocs.php returns a 404 error. But just that one file. All the solutions I found answer ...
1
vote
4answers
2k views

Nginx or php-fpm error?

I found my vps nginx error log like this 2013/04/06 03:28:04 [alert] 8557#0: mmap(MAP_ANON|MAP_SHARED, 5242880000) failed (12: Cannot allocate memory) 2013/04/06 04:05:30 [alert] 10299#0: ...
-3
votes
1answer
19 views

php5-fpm works for a bit and then stops (nginx/wordpress) [closed]

I'm running wordpress on an nginx/php5-fpm setup and every few minutes, php stops working. When someone tries to subscribe, it works at first and then it stops and takes the user to a 500 server ...
-1
votes
2answers
43 views

Making php use specific network interface / IP

TL;DR: Is there a runtime or php.ini directive for IP/network interface? Setup: Debian, NginX, php-fpm The machine has multiple IPs configured in the network interfaces. Each virtual host in NginX ...
4
votes
6answers
8k views

Nginx not logging PHP errors

When accessing some PHP scripts on my website, I'm getting the dreaded 500 error message. I'd like to know what's wrong to fix it, but Nginx isn't logging any PHP errors in the log file I have ...
0
votes
1answer
1k views

Temporarily website outages, fastcgi PHP communication abborted

I've noticed that my web server has occasional 1-5 minute outages every day. I've checked the Apache error log and found the following: [Sun May 10 14:13:19.299784 2015] [fastcgi:error] [pid ...
1
vote
3answers
1k views

Creating Multiple Users on Single PHP-FPM Pool

Have PHP-FPM/FastCGI up and running on my cPanel/WHM server but I'd like have it allow for multiple users off of a single pool. Getting all vhosts to run off a single pool is simple by adding this to ...
0
votes
1answer
1k views

Nginx alias or rewrite for Horde Groupware ActiveSync URL does not process the rpc.php file

I'm trying to setup a Horde groupware with Nginx. The webinterface works but I do not get the ActiveSync specific URL to work. The Horde Wiki explains how to use it with an Apache Webserver here. My ...
1
vote
2answers
4k views

Nginx upgrade to 1.8 - Now getting 502 bad gateway

Today I upgraded my localhost server from nginx 1.6.3 to 1.8.0 and now all my local websites are getting a 502 bad gateway. A standard nginx config file is as follows server { charset utf-8; ...
3
votes
1answer
71 views

Passing Apache variable into SetHandler directive

I'm trying to have dynamically determined Unix socket used for different separated PHP "apps" (different sockets lead to different PHP-FPM pools) on my Apache (2.4.18) server (using mod_proxy_fcgi): ...
0
votes
1answer
1k views

Apache fast-cgi and php-fpm on Ubuntu 14.04 - Run PHP File as the owner

I am trying to setup FastCGI and PHP-FPM so that a php file can be executed as the owner of the file. I am trying to replace SuPHP with FastCGI and fpm. Earlier, I had folders with different owners ...
0
votes
1answer
1k views

Running php-fpm pool with root privileges?

I want one of the pools run with root privileges. Is this possible? I've tried putting user = root group = root but it didn't start. Figured it out by adding a user to /etc/sudoers file with: ALL = ...
0
votes
1answer
80 views

Centos 7 nginx php upgrading

My currently running website works great and it currently using php 5.4.45 FPM/FastCGI, however I would like to upgrade to php 5.5.9+ for an api documentation subdomain that has that php requirement. ...
1
vote
1answer
139 views

Backend fetch failed - varnish wont fetch drupal backend

I run a drupal 7 application(3backends) and i have 3 varnish servers continuously denying to fetch backend. I have read many similar error here but still cant solve my problem, throwing 503 varnish ...
0
votes
0answers
24 views

IPTables Reverse Proxy Breaking PHP-FPM | nginx/php-fpm/iptables/centos

Information: I have been trying to make a reverse proxy on my server using iptables rules. I use nginx to reverse proxy on SSL to port 8080 where I run another nginx server. The problem: IPTables ...
0
votes
1answer
1k views

Multiple server blocks in nginx: Php not working on server 2

I have a nginx server running on my webserver. I would like to achieve the following: example.com + www.example.com -> /my/web/dir/www pma.example.com -> /my/web/dir/pma The first point is not ...
-1
votes
1answer
63 views

How to solve “The apache2 configtest failed.” in ubuntu 12.04 lts [duplicate]

After update my php got the error: The apache2 configtest failed. Output of config test was: apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of ...
4
votes
1answer
4k views

PHP FPM keeps hanging

I have tried all sorts of options but every couple days (mostly every day) FPM stops serving pages and I get a 502 (from cherokee webserver) The logs are filled with the following: [15-Sep-2014 ...
1
vote
2answers
1k views

Nginx + php-fpm - recv() error

I get the follow error in the nginx log [error] 17734#0: *6643 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: [cut], server: [cut], request: ...
-1
votes
1answer
171 views

Switching from MPM Worker to Event with PHP-FPM

CentOS 7, Apache 2.4, FPM/FastCGI, MariaDB My 512M VPS is eating up memory with one development WordPress site, so I'm hoping this will lead me down a path of better tuning; if not, please inform. I ...
0
votes
0answers
21 views

Apache: A lot of connections gracefully finishing?

at the moment I'm mentioning that a lot of connections are gracefully finishing if I visit my apache2 status-page. What does that mean and why are they gracefully finishing? Some of them are in this ...
1
vote
3answers
273 views

How can I trace the cause of php-fpm terminating?

I have VPS (4 core, 6GB) running centos, nginx and php-fpm, with very little traffic (I have never published the url). Every few weeks (at different times), php-fpm terminates with only the following ...
3
votes
1answer
1k views

nginx & php-fpm [debug] 11: Resource temporarily unavailable

New Development The core php error logs are below, but the site specific error logs show this. The memory on my php.ini file is : memory_size 1024; so it's not php's memory limit. I've also ...
0
votes
1answer
1k views

Codeigniter URL only work for default router

I've installed Codeigniter on Nginx with this configuration : server { listen 80; server_name myserver; root /usr/share/nginx/html; index index.php index.html index.htm; error_log ...
-1
votes
0answers
16 views

hhvm genrates segmentation fault with high memory usage

I was tring to read a csv file on my 2gb ubuntu nginx-hhvm vps server by using spout develobed by box inc (open source). And my hhvm stopped with segmentation fault. when i tested the same script on ...
3
votes
1answer
22 views

PHP FPM, location nesting vs unnested for avoiding code execution

Is there any advantage using: location ~ \.php { location ~ \..*/.*\.php$ { return 403; } fastcgi_pass ...
4
votes
6answers
21k views

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 ...