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)

27
votes
7answers
50k views

How do you restart php-fpm?

I need to reload my php.ini and there's nothing in the help dialog about restarting it.
12
votes
7answers
51k views

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

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 ...
11
votes
5answers
12k views

Why are my PHP files downloading instead of processing with Nginx

I have seen the same problem, and many resolutions for it pointing to adding the type handler, but that was for Apache. I am using Arch Linux, Nginx, PHP and PHP-FMP and I cannot figure out why php ...
10
votes
4answers
14k views

Nginx + php5-fpm = “File not found”

I've hit a wall whilst setting up a site using nginx / fpm. The page displays "File not found", and this appears in the nginx error.log: FastCGI sent in stderr: "Primary script unknown" while reading ...
9
votes
4answers
13k views

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 ...
9
votes
3answers
29k views

nginx fastcgi “Primary script unknown” when configuring userdir

I hate configuring nginx. It's so complicated. How do I get PHP to work in my user dirs? Here's the relevant part of my nginx.conf: location ~ ^/~(.+?)(/.*)?$ { autoindex on; ...
8
votes
1answer
4k views

The strange case of Mr. Time To First Byte

I've got a webserver on a Linode 1024 VPS based on Ubuntu 11.10 Nginx 1.0.5 PHP 5.3.6 (with PHP-FPM, APC) Varnish 3.0.2 And a couple of blogs there based on WordPress 3.3.1. One of them is a ...
8
votes
2answers
4k views

pecl install mongo - keeps compiling with wrong module API

Working with Ubuntu 12.04 here, nginx and php5-fpm I had mongo working well on php 5.3, then I added the ondrej/php5 ppa and updated to php5.4. It kept GD and CURL extensions, but not mongo. I ...
7
votes
3answers
24k views

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 ...
7
votes
4answers
17k 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 ...
7
votes
1answer
1k views

NGINX on OSX - Performing terribly slow

I I've been trying to get NGINX up and running on my OSX 10.7 Lion computer. I have it running however simple html pages every few are taking a long time to load; for example: <html> ...
7
votes
3answers
965 views

Can I globally set $_SERVER['REDIRECT_URL'] before script execution?

I'm in the process of migrating many sites from an old to a new server configuration. Each site is based on a similar (but sadly not identical) codebase, using mod_rewrite URLs. Ubuntu 8.04 LTS => ...
6
votes
4answers
5k 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 ...
6
votes
6answers
361 views

How to keep programs from source up to date?

I'm designing a new server setup for hosting multiple websites. (Shared hosting for my clients over at SliceHost.) I've recently moved away from the traditional LAMP setup and chosen Ubuntu, Nginx, ...
6
votes
2answers
3k views

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 ...
6
votes
1answer
4k 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 ...
5
votes
1answer
4k views

Blank Page: wordpress on nginx+php-fpm

Good day. While this post discusses a similar setup to mine serving blank pages occasionally after having made a successful installation, I am unable to serve anything but blank pages. There are no ...
5
votes
1answer
234 views

Is there a limit setting a php_admin_value in php-fpm?

I am trying to set a large value in the configuration of a pool in php-fpm, but at some point it just doesn't start anymore. php_admin_value[disable_functions] = ...
5
votes
1answer
3k views

PHP-FPM's chroot and chdir directory

I am setting up php-fpm with chrooting enabled. Now I see that there are two options, and I want to know what the exact difference is. The setup has: chroot = /var/www/domains/domain.tld/ ; Chdir to ...
5
votes
1answer
8k views

Apache MPMs - Worker vs Prefork

I'm trying to figure out what which is the best Apache MPM I can install on my VPS. I saw some benchmarks and MPM Worker seems to perform better than the Prefork one but for some reason everyone seems ...
5
votes
1answer
2k views

Access PHP-FPM's /status page manually (bypass Apache)

There is a PHP5.3.3 bug that won't allow me to view php-fpm's /status page via Apache2. Is there a way to manually access this data? I cannot upgrade the box (Ubuntu 10.10, php5.3.4 not supported). ...
5
votes
1answer
1k 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 ...
5
votes
1answer
1k views

Apache 2.4 with PHP-FPM .htaccess redirection

I have Apache 2.4 set up with PHP-FPM on a server. To pass from Apache to PHP-FPM I use the following: ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9001/hosting_files/site.com/admin_secure/$1 ...
5
votes
1answer
2k 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 ...
5
votes
1answer
5k 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 ...
4
votes
2answers
9k views

Nginx and PHP-FPM running out of connections

I keep running into errors like these, [02-Jun-2012 01:52:04] WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 8 children, there are ...
4
votes
3answers
5k views

Php5-fpm Crash if much visitors

I decided to change my OP to Nginx from Litespeed because i read much about the low resource that Nginx would cost. Im running a Wordpress site with 500 users online Okay thanks Guys for that much ...
4
votes
1answer
922 views

Cannot loopback to localhost php gateway causing nginx to timeout while setting up firewall with ufw

I'm setting up ufw for the first time. Using Ubuntu 10.04 LTS on an OpenVZ VPN and have the following rules: sudo ufw allow 22/tcp sudo ufw allow 25/tcp sudo ufw allow 53 sudo ufw allow 80 sudo ufw ...
4
votes
3answers
4k views

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 ...
4
votes
1answer
7k views

nginx yet another rewrite or internal redirection cycle

Yet another redirection cycle, yes. Have looked at other questions, but just can't seem to get it to work. server { listen 80; server_name localhost; charset utf-8; ...
4
votes
1answer
595 views

Apache + PHP-FPM = random “Error parsing script headers” + Seg Faults

I have PHP-FPM setup with Apache 2.4 using proxy_fcgi, all works fine, but every one in 4-6 requests, Apache returns a blank page. This happens on my main site http://danielhe.com/, but not subdomain ...
4
votes
2answers
218 views

PHP Upload File leads to blank page

I have the following code: <html> <body> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <input ...
3
votes
2answers
2k 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"]; ...
3
votes
3answers
252 views

Caching PHP pages, Varnish, nginx, other?

I have a web application running on a low end box (1gb RAM), serving a mixture of static and dynamic (php) pages. These PHP pages are querying a MYSQL database which does not change often at all - ...
3
votes
3answers
11k views

Nginx/FPM/PHP all php files say 'File not found.'

i just installed nginx 1.1.13 and php 5.4.0 on a centos 5.8 final 64bit machine. Nginx and PHP/Fpm are running, and I can run php scripts via ssh command line, but in the browser I keep getting 'File ...
3
votes
4answers
7k views

Nginx and PHP-FPM on OS X

I've been wanting to try out Nginx with PHP-FPM. I installed Nginx via Macports. I read that PHP 5.3.3 includes PHP-FPM, however, the PHP 5.3.3 configuration on Macports does not enable it. Can ...
3
votes
5answers
4k views

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

nginx not able to connect to php-fpm socket

I setup a system similar to the tutorial here: http://vladgh.com/blog/varnish-nginx-and-php-533-ubuntu-1010 I'm having issues with nginx connecting to the php5-fpm socket, but from what I can tell ...
3
votes
3answers
6k views

APC shared memory problems

i have nginx+php-fpm and APC installed on a freebsd server, and i'm experiencing constant problems with php-fpm connected somehow with APC. php-fpm freezes in 'lockf' state (in top) and thus site is ...
3
votes
2answers
3k views

Nginx + php-fpm - Each php-fpm process 70-100% cpu when running

I have a situation in which the following is taking place: We are on linode with 8-core, 8gb of ram , 2.6 ghz - using nginx + php-fpm - we are getting extremely high graphs of cpu usage (which we ...
3
votes
2answers
314 views

How To Use User Directories With Nginx With Authentication

I am using Debian based host and using Nginx and PHP-FPM, I wants to enable user directories in nginx and wants multiuser support with basic authentication also. That means when Alex open ...
3
votes
1answer
70 views

cannot restart php5-fpm

I've made some changes in the .ini files and wanted to restart php5-fpm. /etc/init.d/php5-fpm restart Jan 20 14:25:48.171577 [ERROR] bind() for address '/var/lib/php5-fpm/apps.sock' failed: ...
3
votes
2answers
6k 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 ...
3
votes
2answers
1k 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 ...
3
votes
1answer
808 views

Nginx PHP-FPM Basic Auth

I have nginx with php-fpm installed on Debian Squeeze. Directory tree is: /var/www/mysite index.php secret_folder_1 admin.php static.html secret_folder_2 admin.php static.html pictures ...
3
votes
3answers
2k views

http benchmarking?

im running varnish->nginx(php-fpm) and im using ab but it keeps messing up. [root@localhost src]# ab -k -n 100000 -c 750 http://192.168.135.12/index.php This is ApacheBench, Version 2.0.40-dev ...
3
votes
2answers
271 views

nginx+apache2.4+php-fpm - SERVER[“REMOTE_ADDR”] and php_admin_value

I'm trying to get server work in the way nginx->apache2.4->php-fpm(via mod_proxy_fcgid) (nginx for serving static files) (I'm not sure apache is even needed now). It works but I got few questions. ...
3
votes
2answers
2k views

Graceful upgrade from php53u to php54

We are running a CentOS 6 node using iuscommunity repo, and want to upgrade previously installed php53u to php54. However, this introduces a dependency conflict between php53u & php54. Does ...
3
votes
2answers
2k views

APC Server Cache Fragmentation

I'm running a Wordpress site with APC and W3TC on CentOS 5.5 which gets around 10000 pageviews a day (including ajax and WP-Admin). The server is a low-level VPS and has a max of 376MB RAM. Recently ...