<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 20:39:33 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Systems Architect Blog: Apache2 vs Nginx for PHP application]]></title>
      <guid>http://www.phpdeveloper.org/news/19382</guid>
      <link>http://www.phpdeveloper.org/news/19382</link>
      <description><![CDATA[<p>
On the Systems Architect blog there's a recent post from <i>Lukasz Kujawa</i> about <a href="http://systemsarchitect.net/apache2-vs-nginx-for-php-application/">comparing Apache2 and Nginx</a> for PHP applications, specifically when using the PHP-FPM module. His tests are based on the results from three different application types - a large Zend Framework 1 app, a small PHP script and a WordPress installation.
</p>
<blockquote>
If you've ever been trying to squeeze more out of hardware you must have come across <a href="http://nginx.org/en/">Nginx</a> (engine x). Nginx usually appears in context of PHP-FPM (FastCGI Process Manager) and APC (Alternative PHP Cache). This setup is often pitched to be the ultimate combo for a web server but what that really means? How much faster a PHP application is going to be on a different web server? I had to check it and the answer as often is - that depends.
</blockquote>
<p>
He ran the tests on an Amazone EC2 instance and optimized the server to ensure that there was a little interference as possible. The used the Zend Optimizer Plus opcode cache and PHP 5.4 and set the logs to go to memory instead of disk. Graphs included in the post show the results of the benchmarking of each application, with the differences (in most cases) not being that wide of a gap.
</p>
<blockquote>
There isn't big difference between Apache2 and Nginx in PHP context. Yes, Nginx can be much faster when delivering static content but it won't speed up PHP execution. Running a PHP script seams to be so CPU challenging task that it completely eclipse any gain from a web server.
</blockquote>]]></description>
      <pubDate>Fri, 29 Mar 2013 10:41:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[James Fuller: Simply scale with Nginx, Memcached, PHP-FPM and APC]]></title>
      <guid>http://www.phpdeveloper.org/news/19129</guid>
      <link>http://www.phpdeveloper.org/news/19129</link>
      <description><![CDATA[<p>
<i>James Fuller</i> has <a href="http://www.jblotus.com/2013/02/01/simply-scale-with-nginx-memcached-php-fpm-and-apc/">posted a guide to scaling</a> your web application using the nginx web server, memcached, PHP-FPM and APC caching.
<p>
<blockquote>
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 <a href="http://www.php.net/manual/en/install.fpm.php">PHP-FPM</a> 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 <a href="http://www.linode.com/?r=8ab874aa33b39b129030c8e53132a9d5ce87a06f">256MB Ram VPS</a>. 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.
</blockquote>
<p>
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.
</p>]]></description>
      <pubDate>Mon, 04 Feb 2013 10:46:01 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kevin Schroeder: Why is FastCGI /w Nginx so much faster than Apache /w mod_php?]]></title>
      <guid>http://www.phpdeveloper.org/news/19008</guid>
      <link>http://www.phpdeveloper.org/news/19008</link>
      <description><![CDATA[<p>
In <a href="http://www.eschrade.com/page/why-is-fastcgi-w-nginx-so-much-faster-than-apache-w-mod_php/">this new post</a> to his site <i>Kevin Schroeder</i> takes a look at the performance difference between Apache+mod_php and Nginx+FastCGI and why the second is noticeably faster than the second.
</p>
<blockquote>
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. 
</blockquote>
<p>
He uses a "hello world" script as a baseline to do some testing and the <a href="http://httpd.apache.org/docs/2.2/programs/ab.html">ab</a> 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. 
</p>
<blockquote>
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.
</blockquote>]]></description>
      <pubDate>Tue, 08 Jan 2013 12:43:23 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Vance Lucas' Blog: Nginx + PHP-FPM Blank Pages with Phar Packages]]></title>
      <guid>http://www.phpdeveloper.org/news/17648</guid>
      <link>http://www.phpdeveloper.org/news/17648</link>
      <description><![CDATA[<p>
<i>Vance Lucas</i> has a new post sharing some of his experience in <a href="http://www.vancelucas.com/blog/nginx-php-fpm-blank-pages-with-phar-packages/">setting up nginx+PHP-FPM with phar packages</a> 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.
</p>
<blockquote>
Ran into this issue when setting up a new VPS for <a href="http://autoridge.com/">AutoRidge</a>. 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.
</blockquote>
<p>
His solution is a pretty simple one - edit the "suhosin.ini" file to allow for the opening of includes in <a href="http://php.net/phar">phar</a> files (suhosin.executor.include.whitelist). You can find out more about the Suhosin security tool <a href="http://www.hardened-php.net/suhosin/">on the project's website</a>.
</p>]]></description>
      <pubDate>Thu, 08 Mar 2012 12:18:02 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Justin Carmony's Blog: Setting Up Nginx & PHP-FPM on Ubuntu 10.04]]></title>
      <guid>http://www.phpdeveloper.org/news/17040</guid>
      <link>http://www.phpdeveloper.org/news/17040</link>
      <description><![CDATA[<p>
<i>Justin Carmony</i> has a new tutorial posted to his blog today about <a href="http://www.justincarmony.com/blog/2011/10/24/setting-up-nginx-php-fpm-on-ubuntu-10-04/">setting up Nginx and PHP-FPM on Ubuntu</a> in a few easy steps (thanks to some package management).
</p>
<blockquote>
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.
</blockquote>
<p>
He briefly introduces <a href="http://nginx.org/">Nginx</a> and <a href="http://php-fpm.org/">PHP-FPM</a> 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).
</p>]]></description>
      <pubDate>Tue, 25 Oct 2011 13:39:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Slawek's Blog: Efficient file serving in PHP application with nginx]]></title>
      <guid>http://www.phpdeveloper.org/news/16104</guid>
      <link>http://www.phpdeveloper.org/news/16104</link>
      <description><![CDATA[<p>
In a <a href="http://www.leftjoin.net/2011/03/efficient-file-serving-in-php-application-with-nginx/">quick new post</a> to his blog today <i>Slawek</i> looks at a method he's come up with to more efficiently serve up files in a PHP application using the <a href="http://nginx.org/">nginx</a> web server.
</p>
<blockquote>
Sometimes we need to serve files directly from application, especially when file access is restricted by account permissions. Using readfile() to achieve this can successfully kill our web server - even without huge load. To avoid performance problems we can use nginx X-Accel-Redirect feature, and serve files from application through nginx server.
</blockquote>
<p>
He sets up an example situation - serving up gallery images for a basic site - and shows how to configure the nginx server with the "/gallery" directory and the PHP code you'll need to push the "X-Accel-Redirect" header along with the contents of the image.
</p>]]></description>
      <pubDate>Fri, 25 Mar 2011 12:34:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Lightning-fast WordPress with PHP-FPM and nginx]]></title>
      <guid>http://www.phpdeveloper.org/news/15473</guid>
      <link>http://www.phpdeveloper.org/news/15473</link>
      <description><![CDATA[<p>
New on the SitePoint PHP blog there's <a href="http://blogs.sitepoint.com/2010/11/19/lightning-fast-wordpress-with-php-fpm-and-nginx/">a tutorial combining WordPress and PHP-FPM/nginx</a> to give you a high-performance version of your site.
</p>
<blockquote>
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.
</blockquote>
<p>
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.
</p>]]></description>
      <pubDate>Mon, 22 Nov 2010 14:52:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Content with Style: Zend Framework with nginx and php-fastcgi]]></title>
      <guid>http://www.phpdeveloper.org/news/14909</guid>
      <link>http://www.phpdeveloper.org/news/14909</link>
      <description><![CDATA[<p>
On the Content with Style blog today there's <a href="http://www.contentwithstyle.co.uk/content/zend-framework-with-nginx">a new post</a> showing you how to get the Zend Framework up and running with the nginx web server running PHP as a FastCGI.
</p>
<blockquote>
Since I while I heard good things about nginx and wanted to use it for my Zend Framework MVC applications. I just got a Ubuntu server working after one of those days that seem to be a never ending Google search and debugging session, so I thought I'd share the outcome with you. 
</blockquote>
<p>
They show you how to install the needed packages, set up FastCGI and configure it to work with nginx and, of course, configure nginx to use the FastCGI. Included in the nginx config is a pointer to the Zend Framework's document root. Setting up the Zend Framework and creating an application isn't a part of the tutorial.
</p>]]></description>
      <pubDate>Thu, 05 Aug 2010 11:06:02 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Mike Willbanks' Blog: Getting Started with Nginx and PHP-FPM]]></title>
      <guid>http://www.phpdeveloper.org/news/14784</guid>
      <link>http://www.phpdeveloper.org/news/14784</link>
      <description><![CDATA[<p>
<i>Mike Willbanks</i> has <a href="http://blog.digitalstruct.com/2010/07/12/getting-started-with-nginx-and-php-fpm/">written up an introductory guide</a> to getting your own Nginx+PHP-FPM (a <a href="http://php-fpm.org/">FastCGI process manager</a> for PHP) server up and running.
</p>
<blockquote>
[These technologies] offer a great solution for finally getting rid of that old sloppy mod_php in Apache. Do you have the same issue where your apache instances have started to run too large? This might be the time to start to move forward.
</blockquote>
<p>
He talks about setting up the PHP-FPM instance with a custom compile, adding in an init script (from the fpm branch on the PHP svn), installing Nginx and configuring them both to work together. He also helps you set up a sample site (and virtualhost) that will run the PHP-FPM stuff on each request. 
</p>]]></description>
      <pubDate>Tue, 13 Jul 2010 13:47:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ole Markus' Blog: Gentoo Linux and PHP-FPM]]></title>
      <guid>http://www.phpdeveloper.org/news/14721</guid>
      <link>http://www.phpdeveloper.org/news/14721</link>
      <description><![CDATA[<p>
Because of a recent addition to the the Gentoo PHP package (FPM support) they're looking for people to test it out and report back the results. To help, <i>Ole Markus</i> has <a href="http://olemarkus.org/2010/06/gentoo-and-php-fpm/">written up some instructions</a> on how to get it up and working on your system with <a href="http://nginx.net/">nginx</a>.
</p>
<blockquote>
PHP just added the FPM patch to their 5.3 branch, making it likely that PHP 5.3.3 will support the FPM SAPI. The FPM SAPI is an improved fcgi SAPI that allows for more advanced configuration than the original fcgi SAPI. One of the most useful features is process management, which makes it very useful for lightweight webservers, such as <a href="http://nginx.net/">nginx</a>, that does not handle process management of fcgi themselves.
</blockquote>
<p>
There's only a few commands you'll need to get this new package installed and working with your local nginx install with the help of the emerge and layman tools. He also includes the configuration change you'll need to make to the nginx config file to get it working as a FastCGI module.
</p>]]></description>
      <pubDate>Tue, 29 Jun 2010 13:53:39 -0500</pubDate>
    </item>
  </channel>
</rss>
