News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

The Geek Stuff:
How to Configure Nginx to Execute PHP Using PHP-FPM
December 23, 2013 @ 11:22:01

On The Geek Stuff site there's a recent post showing you how to set up and configure Nginx to execute PHP using PHP-FPM on your linux-based system. (A related post shows some of the differences between Nginx and Apache on the same site.)

Nginx is pronounced as "Engine-X", which is a web server and reverse proxy server. Nginx is well known for its speed and ability to handle large number of requests simultaneously with optimal use of resources. PHP-FPM stands for "PHP-FastCGI process manager". [...] This tutorial provides instructions on how to install and configure Nginx with PHP-FPM, which will help you to execute PHP programs in Nginx.

He's broken it up into five simple steps, complete with the exact commands you'll need to make it work:

  • Install Nginx
  • Install PHP5-FPM
  • Add PHP Configuration to Nginx
  • Set listen Parameter in php5-fpm www.conf
  • Restart the Nginx and PHP5-FPM and Test it
0 comments voice your opinion now!
nginx phpfpm tutorial install configure linux

Link: http://www.thegeekstuff.com/2013/12/nginx-php-fpm/

Binary Tides Blog:
Setup Apache 2.4 and Php FPM with mod proxy fcgi on Ubuntu 13.10
December 02, 2013 @ 13:06:17

On the Binary Tides blog there's a new setup tutorial showing how to get Apache 2.3 and PHP FPM up and running with mod_proxy FCGI on Ubuntu (13.10, more specifically).

With the arrival of mod_proxy_fcgi Apache finally gets the ability to neatly talk to external fastcgi process managers making it more efficient at the task. Delegating php requests to external fpm servers greatly reduces the load on web servers like apache resulting into efficient utilisation of machine resources and faster processing speed for users on the other end. Along with all that, php fpm can run opcode caching engines like apc in a very stable manner.

The rest of the post is divided up into the steps you'll need to get things up and running

  • Setup Apache (including VirtualHost)
  • Setup Php-FPM
  • Test the setup
0 comments voice your opinion now!
setup configure apache phpfpm modproxy fcgi ubuntu tutorial

Link: http://www.binarytides.com/setup-apache-php-fpm-mod-proxy-fcgi-ubuntu/

BinaryTides.com:
Install Nginx + Php FPM + APC on CentOS 6.4
November 11, 2013 @ 10:10:50

On the BinaryTides site a new tutorial has been posted walking you through all the steps to getting Nginx, PHP FPM and APC working on a CentOS installation, complete with all commands and configuration updates you'll need.

A lamp server runs Nginx web server along with Php and Mysql or MariaDB on a Linux system. Nginx is increasing becoming popular because of its lightweight structure and ability to handle large amounts of traffic in an optimum manner. Mariadb is the replacement for mysql because mysql is not very free anymore. In this tutorial we shall be setting up Nginx with Php FPM on CentOS. The instructions to instal MariaDB shall be covered in another post.

The rest of the post helps you:

  • Install and configure Nginx
  • Create a virtual host
  • Install PHP and FPM (and set up Nginx to use it)
  • Install APC (the "Alternative PHP Cache")
0 comments voice your opinion now!
install nginx phpfpm centos apc tutorial configure

Link: http://www.binarytides.com/install-nginx-php-fpm-centos/

BinaryTides.com:
Setup Nginx + php-FPM + apc + MariaDB on Debian 7 - The perfect LEMP server
August 09, 2013 @ 11:58:39

On the BinaryTides.com site today there's a tutorial they've posted walking you through the full install process to get Nginx, PHP-FPM (with APC) and MariaDb working together on Debian, complete with configuration changes and all the commands you'll need.

Debian is a great choice for setting up linux webservers. According to current stats it is the most popular server OS followed closely by centos. I am a great fan of the apt/dpkg/gdebi commands, which make it so easy to install and update packages on the system. To setup a complete functional php webserver, you need to install a couple of extra things which include a webserver and a database. In this post we shall be setting up nginx, php, php-fpm, apc and maridb.

The tutorial is broken up into three main steps, each with clarification of what's involved:

  • Install Nginx on Debian
  • Install php and php-fpm
  • Install MariaDB on Debian
0 comments voice your opinion now!
lemp server debian phpfpm mariadb apc

Link: http://www.binarytides.com/install-nginx-php-fpm-mariadb-debian

James Fuller:
Simply scale with Nginx, Memcached, PHP-FPM and APC
February 04, 2013 @ 10:46:01

James Fuller has posted a guide to scaling your web application using the nginx web server, memcached, PHP-FPM and APC caching.

We sell an educational product that serves a predictable 15,000 requests per minute for 10+ hours/day, every day. Instead of Apache, we use nginx with PHP-FPM to handle this traffic. This is becoming a very popular setup for many companies with non-trivial traffic, but I have also found success with it in my small 256MB Ram VPS. For various reasons, nginx does a better job with memory and concurrent connection handling than Apache. In this post, I want to talk about some of the reasons you might want to go with this setup.

He talks about some of the efficiency gains that memcache and nginx can give you pretty easily and some of the common uses for nginx, including using it as a reverse proxy. He talks some about Apache's typical request handling and shows the difference between that and how nginx does its "never block, finish fast" handling. He fits in the other pieces - PHP-FPM, memcached and APC - showing how each of them offers their own types of performance gains for different areas of the application.

0 comments voice your opinion now!
scale platform nginx memcached phpfpm apc cache


Kevin Schroeder:
Why is FastCGI /w Nginx so much faster than Apache /w mod_php?
January 08, 2013 @ 12:43:23

In this new post to his site Kevin Schroeder takes a look at the performance difference between Apache+mod_php and Nginx+FastCGI and why the second is noticeably faster than the second.

I was originally going to write a blog post about why NginX with FastCGI was faster than Apache with mod_php. I had heard a while ago that NginX running PHP via FastCGI was faster than Apache with mod_php and have heard people swear up and down that it was true. I did a quick test on it a while back and found some corresponding evidence. Today I wanted to examine it more in depth and see if I could get some good numbers on why this was the case. The problem was that I couldn't.

He uses a "hello world" script as a baseline to do some testing and the ab to run the numbers. His results show a pretty significant difference between the two setups and an "strace" on Apache showed a clear "winner" as to why it's slower (reading the .htaccess file). Once he turned this off, though, Apache jumped up and started performing better than Nginx.

This all makes sense. mod_php has PHP embedded in Apache and so it should be faster. If you're running only PHP on a web server then Apache still seems to be your best bet for performance. And if you are seeing a significant performance difference then you should check if AllowOverride is turned on. If it is, try moving that into httpd.conf and try again.
0 comments voice your opinion now!
nginx apache fastcgi phpfpm modphp performance htaccess


Vance Lucas' Blog:
Nginx + PHP-FPM Blank Pages with Phar Packages
March 08, 2012 @ 12:18:02

Vance Lucas has a new post sharing some of his experience in setting up nginx+PHP-FPM with phar packages that he recently had with setting up a new server instance for a company. The problem showed itself as blank pages, apparently due to a feature in the Suhosin security package.

Ran into this issue when setting up a new VPS for AutoRidge. This happens when using Nginx and PHP-FPM with PHP 5.3+ and the Suhosin patch when trying to run a PHP script using a PHAR package. From what I can gather, the Suhosin patch basically blocks PHP include/require functions from executing files ending with .phar, which results in a PHP segfault that leaves no trace of any error at all.

His solution is a pretty simple one - edit the "suhosin.ini" file to allow for the opening of includes in phar files (suhosin.executor.include.whitelist). You can find out more about the Suhosin security tool on the project's website.

0 comments voice your opinion now!
nginx phpfpm problem phar package suhosin


Pavel Shevaev's Blog:
Make php-fpm execute arbitrary PHP scripts via socket
October 26, 2011 @ 11:19:23

Pavel Shevaev has a quick new post to his blog showing how to get PHP-FPM to execute PHP scripts via a socket request.

We are using APC cache very heavily in our projects and during project deployment the cache must be flushed and warmed up. A common solution to warmup the APC cache is to fetch some special page via HTTP which does the job. The problem with this approach is that it's not reliable enough when PHP is served via several fastcgi back-ends.

To solve the problem, he uses a PHP-FPM module to work with the FastCGI socket and execute any file (as permissions allow, of course). In his case, he uses it to "warm up" his APC cache for the user. A code snippet is provided as an example.

0 comments voice your opinion now!
phpfpm execute socket fastcgi module tutorial


Justin Carmony's Blog:
Setting Up Nginx & PHP-FPM on Ubuntu 10.04
October 25, 2011 @ 13:39:24

Justin Carmony has a new tutorial posted to his blog today about setting up Nginx and PHP-FPM on Ubuntu in a few easy steps (thanks to some package management).

This is another wonderful setup that I've found myself using rather than the traditional Apache & mod_php setup. [...] Ngnix, unlike Apache, doesn't actually load PHP. Instead, it hands it off as a proxy to a "php handler" which acts like an Application Server. So nginx by itself won't serve PHP files, but just static files.

He briefly introduces Nginx and PHP-FPM for those not familiar and points out that this combination is very fast, even without much configuration. The packages are installed with the aptitude installer and minimal changes are made to the php-fm and nginx configuration files (mostly to set up whatever your domain/virtual host is).

0 comments voice your opinion now!
nginx phpfpm configure install ubuntu tutorial webserver


SitePoint PHP Blog:
Lightning-fast WordPress with PHP-FPM and nginx
November 22, 2010 @ 14:52:30

New on the SitePoint PHP blog there's a tutorial combining WordPress and PHP-FPM/nginx to give you a high-performance version of your site.

In this tutorial, I'll show how to build a server capable of withstanding a front-page Digg placement, step by step. This will mean your business stays online when it's most important-when everyone is looking. We'll go through the process of building a super-fast, bulletproof custom web server for WordPress. The technology stack we'll use is Ubuntu, nginx, PHP-FPM, and MySQL. In a future article we'll look at adding memcached to the mix to take performance even further.

He walks you through the full install of each piece of software (on a linux-based system) even helping you compile PHP 5.3. There's some examples of configurations and a few shell commands you'll need to get things linked together and working, but the overall process is pretty quick and painless. Even if you already have a WordPress site, it's not too hard to follow along and drop it right in.

0 comments voice your opinion now!
wordpress tutorial phpfpm nginx install configure



Community Events











Don't see your event here?
Let us know!


code dependency component security symfony2 series podcast install language introduction package composer hhvm unittest facebook application release opinion framework hack

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework