News Feed
Sections




News Archive
feed this:

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

Stephan Hochdörfer:
Silex running on HHVM
April 09, 2014 @ 09:14:12

Stephan Hochdörfer has a quick new post to his site today showing how he was able to setup a Silex-based application to run on the HHVM (HipHopVM) from Facebook.

First of all I assume you already got HHVM running with nginx. If this is not the case feel free to follow these steps to get everything up and running. To install Silex we will use Composer, so let`s install all the needed requirements and Composer itself.

He includes all the commands you'll need to get the Composer dependencies installed (curl, git, unzip) and to pull it down and move it to the right location post-install. He adds a line to his ".bashrc" to enable it for HHVM and creates the sample "composer.json" for the Silex install. Finally, he includes the updates to make to the nginx configuration to handle the needed redirects to the Silex front controller.

0 comments voice your opinion now!
hhvm silex install configure nginx tutorial framework

Link: http://blog.bitexpert.de/blog/silex-running-on-hhvm/

SitePoint PHP Blog:
CMS Showdown Nginx, Ghost, PHP and Phalcon
March 20, 2014 @ 12:58:18

On the SitePoint PHP blog today Bruno Skvorc has written up the first part of his look at installing Ghost with Nginx and Phalcon on his hosting provider. This is the first post in his "showdown" series of trials on various CMS systems.

You might be wondering why I'm writing about Ghost on a PHP oriented channel - this series will be a showdown of all the various PHP based CMS' I can find, benchmarked against each other and against Ghost, as I look for the next best alternative. Since my DigitalOcean droplet already runs Nginx as a reverse proxy for the blog, I'll also be deploying all the CMS' on that same installation, each on its own subdomain.

He walks you through the whole process from start to finish:

  • Installing PHP on Nginx
  • Setting up a virtual host on a subdomain
  • Installing Phalcon
0 comments voice your opinion now!
sitepoint cms showdown nginx phalcon ghost

Link: http://www.sitepoint.com/cms-showdown-nginx-ghost-php-phalcon

Inviqa techPortal:
Speedy Sites Nginx and PHP
February 21, 2014 @ 11:55:17

On the Inviqa techPortal site today they have a new post from Barney Hanlon in his "Speedy Sites" series. This time he looks at using nginx to speed up your PHP applications.

In the previous article in this series, we looked at using Apache with mod_pagespeed to perform on-the-fly enhancements to decrease page load times. Getting an optimised page is only half the battle however; we need to ensure that our backend is doing as little work as possible in order to be highly scalable. In this article, we look at how we can achieve this while improving performance - all with nginx.

He starts with an introduction to nginx for those not familiar with this alternative web server and how it integrates with PHP. He walks you through the installations and configuration of a basic setup and running some benchmarks with siege. Finally, he shows how to enable PHP support on the install via the "php5-fpm" package (FastCGI).

0 comments voice your opinion now!
speed webserver nginx fastcgi fpm install configure tutorial

Link: http://techportal.inviqa.com/2014/02/20/speedy-sites-nginx-and-php/

SitePoint PHP Blog:
Nginx, PHP5.5 and Phalcon on OpenShift
January 02, 2014 @ 10:43:42

On the SitePoint PHP blog today Bruno Skvorc goes through the full installation process around getting Nginx and Phalcon up and running on an OpenShift instance.

In this tutorial, adapted from the step by step trial and error procedure of duythien, and with his full blessing, we'll cover the installation procedure of Phaclon on yet another environment: OpenShift. The procedure is bloody - OpenShift does not make it easy for us to deploy custom environments - but the rewards are well worth it.

As he mentioned, it's not the easiest process, but he's laid it all out there to help make it simple for you. He's broken it up into a number of different steps:

  • Setting up your OpenShift account (using the free tier)
  • Creating and cloning an application
  • Cloning a helper repo with a ".openshift" file included
  • Grabbing the latest Phalcon and making the config file to set it up correctly
  • Configuring Nginx
0 comments voice your opinion now!
nginx phalcon openshift tutorial install configure

Link: http://www.sitepoint.com/nginx-php5-5-phalcon-openshift

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/

Web & PHP Magazine:
December 2013 Issue Released - "Merry Nginxmas"
December 12, 2013 @ 13:47:12

The Web and PHP Magazine has released their latest issue - December 2013, "Merry Nginxmas". This issue includes articles like:

  • Merry Nginxmas: A beginner's guide
  • Automate ALL the Phings!
  • How PHP manages variables
  • Compile Your Style: Structuring and automating CSS
  • Open source spotlight: PHP-CPP
  • End-to-end tests: not the be-all and end-all

Web & PHP offers all of their issues at no cost, so head over and grab a copy for yourself. Unfortunately this is also the last ever issue of the magazine but they have plenty of back issues on their site if you want more great content.

0 comments voice your opinion now!
webandphp magazine dec13 issue nginx

Link: http://webandphp.com/December2013

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/

Systems Architect Blog:
Apache2 vs Nginx for PHP application
March 29, 2013 @ 10:41:38

On the Systems Architect blog there's a recent post from Lukasz Kujawa about comparing Apache2 and Nginx 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.

If you've ever been trying to squeeze more out of hardware you must have come across Nginx (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.

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.

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.
0 comments voice your opinion now!
apache2 nginx performance benchmark zendframework1 wordpress native


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



Community Events





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


developer wordpress code project api list framework threedevsandamaybe configure bugfix podcast application library language release introduction laravel series interview community

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