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

Mattias Geniar:
The PHP circle from Apache to Nginx and back
November 20, 2014 @ 10:26:28

In this new post to his site Mattias Geniar goes in circles...from Apache to Nginx and back in terms of how it relates to PHP.

As with many technologies, the PHP community too evolves. And over the last 6 or 7 years, a rather remarkable circle has been made by a lot of systems administrators and PHP developers in that regard.

He talks about the "early days" and the rise of Apache as the "A" in the LAMP stack. Then Nginx was created/released and PHP developers saw it as a viable option. He talks about how PHP worked with this server and the solutions that were found to "hack" them together. There were issues around the relationship, though, and - in the author's perspective - the circle has come back around to Apache, just with a bit more smarts about how it's configured.

0 comments voice your opinion now!
circle apache webserver nginx opinion configuration phpfpm

Link: http://ma.ttias.be/php-circle-apache-nginx-back/

SitePoint PHP Blog:
How to Run Multiple Versions of PHP on One Server
November 07, 2014 @ 10:54:27

The SitePoint PHP blog has a new tutorial by Thien Tran Duy showing you how to run multiple versions of PHP all on the same server. The key is in using a few custom configuration options (you'll be compiling PHP manually for this) to place the different versions in different locations.

In this particular post, we'll demo a solution to install multiple versions of Phalcon and PHP and run them on a single web server. PHP 5.5.x and 5.6.x will be used here, but you can replace them with other versions. Any servers that support PHP-FPM should be enough but we recommend using Nginx. The environment used in this tutorial is Fedora OS - a Linux system, but the instructions are almost identical for any other *nix OS.

The tutorial also includes the installation of a few other PHP extensions including APC caching, memcache and ioncube. He walks you through the installation of Nginx first to get the web server up and running. Then he starts in on the PHP installs and the requirements to ensure you have to be able to compile from the PHP source. He shows how to pull the different versions of PHP down (5.3, 5.4, 5.6 and master) from the GitHub repository and execute the "buildconf" to make the configure script. He includes the example configuration command with options, ensuring it will work with PHP-FPM and the Nginx server. He then reproduces the process, making slight changes, for the other versions of PHP. Finally, he shows the installation of the two different versions of Phalcon and configuring it to all work with the installed web server.

0 comments voice your opinion now!
multiple version one server language tutorial phpfpm nginx

Link: http://www.sitepoint.com/run-multiple-versions-php-one-server/

PHP.net:
PHP 5.4.28 Released
May 02, 2014 @ 10:06:22

The PHP development group has officially release the latest update for the stable PHP 5.4.x line - PHP 5.4.28.

The PHP development team announces the immediate availability of PHP 5.4.28. 19 bugs were fixed in this release, including CVE-2014-0185. All PHP 5.4 users are encouraged to upgrade to this version.

The CVE fix involves an issue around a PHP-FPM bug that could allow for privilege escalation due to default permissions. Users of previous releases in the PHP 5.4.x series and PHP-FPM are strongly encouraged to update to this latest release. You can download this release from the main downloads page (Windows users go here.

0 comments voice your opinion now!
language release bugfix phpfpm cve20140185

Link: http://php.net/index.php#id2014-05-01-1

PHP.net:
PHP 5.5.12 release
May 01, 2014 @ 09:09:43

The PHP development group has officially released the latest version of the language in the 5.5.x series - PHP 5.5.12:

The PHP Development Team announces the immediate availability of PHP 5.5.12. This release fixes several bugs against PHP 5.5.11, as well as CVE-2014-0185 regarding PHP-FPM. All PHP users are encouraged to upgrade to this new version.

Among the bugs fixed in this release are things around cURL support, DateTime functionality, Fileinfo and Json handling. The PHP-FPM issue (CVE-2014-0185) relates to a possible issue in the FPM functionality that would allow for possible privilege escalation due to insecure default configuration. It is highly recommended that PHP-FPM users update to this latest version immediately. As always you can download this latest version from the main download page or for Windows users, windows.php.net.

0 comments voice your opinion now!
language release php5512 cve phpfpm bugfix upgrade

Link: http://www.php.net/archive/2014.php#id2014-04-30-1

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



Community Events





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


mvc security voicesoftheelephpant opinion introduction package version laravel tool library composer language release podcast community series framework symfony update interview

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