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.

Filter by
Sorted by
Tagged with
8 votes
4 answers
5k views

Is it possible to set up PHP-FPM with different pool-options (xdebug enabled / xdebug disabled)

I've a LEMP environment and need the option to separate all development subdomains from staging (development with xdebug staging without). dev.projectX.mydomain.tld staging.projectX.mydomain.tld ...
Thorsten Scheckenbach's user avatar
8 votes
2 answers
9k views

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 ...
igorw's user avatar
  • 181
8 votes
3 answers
15k views

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 ...
Emmanuel's user avatar
  • 347
8 votes
2 answers
17k views

Nginx ignoring client's HTTP 1.0 request and respond by HTTP 1.1

I am testing using nginx/php5-fpm, with the code <?php header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); // also tested: header("Status: 404 Not Found"); echo $_SERVER["SERVER_PROTOCOL"]; ...
Ryan's user avatar
  • 6,011
8 votes
1 answer
3k views

Requests are never queued after pm.max_children with Nginx and PHP-FPM

As soon as a pool reached pm.max_children, Nginx starts timing out when trying to send new requests to PHP-FPM. "max listen queue" is always 0 in the php-status page. PHP-FPM 5.5.16 Nginx 1.6.1 Here ...
pembo13's user avatar
  • 81
7 votes
1 answer
6k views

Working Nginx fastcgi_cache php-fpm cache and static file caching configuration?

Nginx wiki is very vague with explanation as to how to properly setup nginx with php-fpm with fastcgi_caching for sites which have cookies i.e. wordpress, drupal, vbulletin etc. I downloaded a ...
p4guru's user avatar
  • 963
7 votes
2 answers
9k views

Nginx + PHP-FPM = "Random" 502 Bad Gateway

I am running Nginx and proxying php requests via FastCGI to PHP-FPM for processing. I will randomly receive 502 Bad Gateway error pages - I can reproduce this issue by clicking around my PHP websites ...
user avatar
7 votes
1 answer
7k views

Setting $PATH for weberver user

I tried to add $PATH for all users including the webserver user (i.e. www-data) with different methods such as editing /etc/profile, /etc/environment, etc. In all cases, it works in terminal, but not ...
Googlebot's user avatar
  • 1,067
7 votes
1 answer
13k views

phpMyAdmin having problems on nginx and php-fpm on RHEL 6

We have a web server setup with nginx and php-fpm on Red Hat Linux 6 (RHEL). This machine already has WordPress installed, and it runs great. We have WordPress set up to go to wptest.domain.local. We ...
jmlumpkin's user avatar
  • 197
7 votes
3 answers
31k views

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 ...
Cristian Sepulveda's user avatar
6 votes
1 answer
11k views

Nginx and different versions of PHP FPM + PHP

Due to a better understanding of what I wish to achieve thanks to Mark and his previous answer, I am posting a (hopefully) clearer and slightly different variation of my previous question as that ...
myol's user avatar
  • 181
6 votes
1 answer
3k views

Apache PHP-FPM weird responses with Proxy enablereuse=on

When enabling <Proxy ... enablereuse=on max=10> I start receiving strange responses. When refreshing the current page, the main request loads different responses; like a blank page, responses ...
Will B.'s user avatar
  • 83
6 votes
2 answers
17k views

nginx with php-fpm downloading php files rather than executing them on mac os x (local environment)

I'm having trouble getting PHP files to execute on my local development machine. I seem to have successfully installed nginx and php-fpm also seems to be correctly installed, and running but can't ...
Oliver Tappin's user avatar
6 votes
1 answer
9k views

Munin dynamic graph zoom (dynazoom) not working (Nginx, PHP-FPM)

Debian 7.5 Nginx/1.6.0 PHP 5.6.0RC2 (fpm-fcgi) (built: Jul 11 2014 08:17:52) Munin v2.0.21-2 I been searching all over the net for a few days for answers to my problem but it seems like no one knows ...
Bobby100's user avatar
6 votes
4 answers
7k views

Nginx + PHP 5.3.3 (with php-fpm) - memory usage?

I recently bought Xen VPS (linode.com) with Debian 5.0 Lenny (i386), 512MB RAM. At the moment I have only three small websites (built with Drupal) with about 600 users per day in total running on this ...
user38484's user avatar
  • 313
5 votes
2 answers
10k views

Disable FastCGI Read Timeout in Nginx?

Is there a way to disable the read timeout for FastCGI? (fastcgi_read_timeout) Setting it to zero does not work and just causes an immediate timeout. Nginx 1.0.5 PHP-FPM 5.3.6-13ubuntu3.6 The ...
Kevin Herrera's user avatar
5 votes
2 answers
4k views

Nginx 1.6.3 to 1.8 upgrade

I'm on Linux Mint LMDE. I just receive a upgrade of nginx from 1.6.3 to 1.8.0 with aptitude and now, I got blank page on all my websites Here my configuration : server { listen 80; ...
Bouffe's user avatar
  • 293
5 votes
2 answers
28k views

Phpmyadmin location for nginx

I installed nginx and phpmyadmin. I set up a domain with these parameters to test phpmyadmin: server { listen 80; server_name example.com; root /usr/share/phpmyadmin; index index.php; fastcgi_index ...
MultiformeIngegno's user avatar
5 votes
1 answer
16k views

Apache and multiple PHP-FPM pools

I have two sites that I run from apache 2.2 vhosts with PHP-FPM 5.4 on Ubuntu 12.04. Until now I've been using a server-wide (stock) mod_fastcgi config, but now I want to split this into two FPM pools ...
Synchro's user avatar
  • 3,210
5 votes
2 answers
32k views

Multiple versions of PHP through nginx

EDIT: For future reference Multiple versions of PHP through nginx Nginx and different versions of PHP FPM + PHP I am running Ubuntu 14.10 with a LEMP stack using PHP 5.5.12. I have a number of ...
myol's user avatar
  • 181
5 votes
4 answers
14k views

PHP scripts suddenly load very slow on Apache

I am testing why sometimes my PHP scripts takes long to load over network (>30sec) on my Apache 2.4 Ubuntu server with PHP-FPM 7.4 using mpm_event. The server was working normally in the past few ...
c0dehunter's user avatar
5 votes
1 answer
13k views

php-fpm status page: what are the "queue" items in this report?

So I have a working nginx+php-fpm installation. The php-fpm status report page is activated and I get something like that (do not care about settings, it's a test server under stress tests): pool: ...
regilero's user avatar
  • 1,490
4 votes
3 answers
16k views

Nginx & PHP-FPM - .php File not found - Can't figure out why

I have done days of reading on this issues, as admittedly, I am an Nginx newb. I have read official and unofficial documentation alike and can't seem to solve my problem. Hopefully, someone here will ...
johnnygear's user avatar
4 votes
2 answers
3k views

PHP-FPM chroot with chdir

I am trying to setup a site inside of a PHP-FPM chroot. My paths are as follows: chroot = /var/www/ chdir = www/ The chroot works just fine without chdir. But when I add chdir I get this error on ...
nwalke's user avatar
  • 643
4 votes
2 answers
3k 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 ...
harryg's user avatar
  • 921
4 votes
1 answer
10k views

chroot php-fpm process to user's home

I'm in the process of moving each of my websites that are on a single server from a single PHP instance (whereby all of the files in all websites were owned by apache, and just the default php library ...
David W's user avatar
  • 3,459
4 votes
2 answers
18k views

nginx + php fpm -> 404 php pages - file not found

*2037 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream server { listen 80; ## listen for ipv4; this line is default and implied #listen [::]:...
Mahesh's user avatar
  • 247
4 votes
2 answers
3k views

Securing PHP via open_basedir based on script path

I have several users running PHP scripts on a server and I'd like to lock it down so that their scripts can only access files in their www directory (it doesn't use linux user accounts, so there isn't ...
Tak's user avatar
  • 291
4 votes
2 answers
1k views

php-fpm php_network_getaddresses calls randomly start failing with bad udp cksum

We're running a number of web servers (nginx, php5.6-fpm) on ubuntu instances on AWS. They've been running fine for a number of months, but in the past few days we've started getting issues where ...
Liam Wiltshire's user avatar
4 votes
0 answers
1k views

Apache 2.4 + PHP-FPM + Chromelogger (how to increase HTTP header length limit?)

I have a running Apache 2.4 + PHP-FPM setup. There is one edge case though, when this setup fails - when using Chromelogger. Chromelogger is a server to client debugging tool, which sends it's data ...
mgo's user avatar
  • 141
4 votes
1 answer
5k views

How to free PHP-FPM memory?

There are several discussions complaining high memory usage of PHP-FPM, without any practical approach to overcome. As I explored the problem with numerous tests, the problem is related to the age of ...
Googlebot's user avatar
  • 1,067
3 votes
2 answers
5k views

Finding Nginx/PHP-FPM bottleneck that is causing random 502 gateway errors

I work for a rather busy internet site that is often gets very large spikes of traffic. During these spikes hundreds of pages per second are requested and this produces random 502 gateway errors. Now ...
Mr.Boon's user avatar
  • 1,481
3 votes
2 answers
2k views

PHP-Mcrypt Installation

I need to install php-mcrypt on my CentOS 5.5 VPS, When I try yum install php-mcrypt, it says that it is set to be updated which implies that it is already installed. I looked in the /usr/lib/php/...
Infinity's user avatar
3 votes
1 answer
2k views

Add custom variables to nginx access log from PHP-FPM

With the log_format its possible to include a range of variables such as $http_user_agent: http://nginx.org/en/docs/http/ngx_http_core_module.html#variables But is it possible to include a variable ...
Craig Francis's user avatar
3 votes
2 answers
7k views

Nginx load balance with dedicated php-fpm server

I got server setup with nginx+php-fpm and mysql. I have another server with only installed php-fpm, so wanted to use as load balance. But when I am using this dedicated server with php-fpm as load ...
zion's user avatar
  • 51
3 votes
1 answer
4k views

Rewriting URLs while using mod_proxy_fcgi and PATH_INFO ends up with error 404

I have a virtual host on Apache 2.4.25 with PHP-FPM 7.1.4 connected via mod_proxy_fcgi as follows: <VirtualHost *:80> ServerName example.com DocumentRoot /srv/www/example.com <...
Disassembler's user avatar
3 votes
3 answers
11k views

Getting rid of "Welcome to nginx!"

I've just setup nginx on my Ubuntu staging machince. Entering http://192.168.1.1./index.php works like a charm and loads the index.php file i've put in the /var/www/public_html folder. http://192.168....
Industrial's user avatar
  • 1,599
3 votes
1 answer
20k views

Setting up Apache 2.2 + FastCGI + SuExec + PHP-FPM on Centos 6

I'm trying to follow this very detailed instruction here, I simply changed from www-data user to apache user, and is using /var/www/hosts/sitename/public_html instead of /home/user/public_html ...
mr1031011's user avatar
  • 215
3 votes
4 answers
7k views

How to add a pool to FPM (nginx) without reload/restart fpm itself?

Im building an environment (on a ubuntu 10.04.02 machine) to handle a website with many (should support at least 1000) subdomains, each of them served by a different FPM pool, with a different user. ...
Strae's user avatar
  • 487
3 votes
1 answer
12k views

How to get PHP_AUTH_USER and PHP_AUTH_PW available in nginx?

I have a Magento module that asks for $_SERVER['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] variables. In its documentation, the following setup for apache is proposed: SetEnvIfNoCase Authorization "...
Ricardo Martins's user avatar
3 votes
2 answers
9k views

NGINX returning 404 error on a valid url

We have a site that runs PHP-FPM and NGINX. The application sends invitations to site members that are keyed with 40 character random strings (alphanumerics only -- example below). Today for the ...
Harrison's user avatar
3 votes
2 answers
19k views

Codeigniter in subdirectory on Nginx 404

I'm trying to setup Codeigniter in a subdirectory of my domain. Currently I only get an 404 from Codeigniter on the index page. As soon as a want to go to example.com/api/welcome/index I get a 404 ...
Arodes's user avatar
  • 101
3 votes
2 answers
10k views

What does apc.mmap_file_mask really do?

I want to use APC in a shared environment, but the main problem is of course, opcode sharing. To overcome this, I've thought about using different apc.mmap_file_mask for each user (they're chrooted ...
Alessio Periloso's user avatar
3 votes
1 answer
12k views

Nginx and PHP-FPM 403 Forbidden

I'm using Nginx with PHP-FPM. The requested page is displayed, but firebug shows that the paths to the CSS, JS, and images are returning 403 Forbidden error which breaks the styling. Taking a look at ...
Chris's user avatar
  • 143
3 votes
1 answer
3k views

php-fpm and Nginx dynamic environment variable

FPM configration stats that you can retrieve variables from your current environment. However, on ubuntu using Nginx and PHP-FPM, I can not find a way to retrieve the variable value from the ...
Gadelkareem's user avatar
3 votes
3 answers
4k views

NginX & PHP-FPM, random 502

2010/09/19 14:52:07 [error] 1419#0: *10220 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: [...], server: [...], request: "POST /[...] HTTP/1.1", ...
pestaa's user avatar
  • 477
2 votes
1 answer
1k views

Nginx says file not found when requesting PHP file on different root

I am using a different root for the path /cloud but whenever I try to request any /cloud/*.php file nginx says 404 file not found. I can access /cloud/*.html without any problem. I can even access any ...
Sigma's user avatar
  • 129
2 votes
3 answers
3k views

php-fpm not generating core dump files despite being configured to

I'm running Centos 7 with php-fpm 5.4. I'm encountering a (signal 11) SIGSEGV error in my php-fpm error logs and want to debug it. I've followed the advice of php5 fpm: how do you generate core dump ...
WackGet's user avatar
  • 227
2 votes
1 answer
2k views

mod_rewrite on Debian Stretch breaks php7.0-fpm with AH01071: Got error 'Primary script unknown\n'

We've just built a new Debian 9.8 server to replace our 8.11 server in order to test and upgrade to php7. We've installed apache2, php7.0-fpm and brought over out existing virtual host config, which ...
jaydisc's user avatar
  • 489
2 votes
2 answers
25k views

AH01071: Got error 'Primary script unknown

Debian Linux 8.10, Apache version 2.4.10, FPM/FastCGI. I have created a 1st virtual host. After hours, I could get it working. Then I have created another virtual host, with almost the same config =...
Bruno de Goyrans's user avatar