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/

Pascal Martin:
PHP Version Statistics - October 2014
October 28, 2014 @ 11:23:13

Pascal Martin's latest post (in French, but the English version is coming soon) shares some statistics he's gathered around the usage of various software around the web, more specifically those involved in web-based applications.

I've collected statistics about the use of different PHP versions several times. The first time was in September 2011 and the most recent was in November 2013. At this point, PHP 5.2 still accounted for 34.4% of all PHP installations with PHP 5.3 moving up to 48.7%. This new data was collected the weekend of October 19th, 2014. At this point, the current stable versions of PHP are 5.4.34, 5.5.18 and 5.6.2. PHP 5.3 is no longer maintained (since August 14th 2014) and PHP 5.2 hasn't been supported for 4 years now.

He's broken up the statistics into a few different sections:

  • Web server software
  • Usage of major versions of PHP
  • Usage of minor versions of PHP
  • Versions in use under each of the major version numbers

He includes both the raw numbers (percentages) and some graphs showing the results in a bit more consumable fashion. It's interesting to see that, despite it being quite an old version now, PHP 5.3.x still has the largest share in the usage results.

UPDATE: He's posted the English version now as well.

0 comments voice your opinion now!
usage statistics oct2014 version major minor webserver

Link: http://blog.pascal-martin.fr/post/statistiques-versions-php-2014-10

SitePoint PHP Blog:
Asset Access Restriction Methods - Block Unwanted Visitors
September 05, 2014 @ 10:11:45

In a new tutorial from the SitePoint PHP blog today Jeroen Meeus looks at a way to protect parts of your application from being used and abused. He shows you how to protect various parts of you site, including images and actual pages, with the help of either your web server or bits of code.

When building an awesome web app or website, we sometimes want people to be able to embed parts of our web app/website into their own. That could be an iframe holding a 'like' button, a simple image that they want to reuse or even our entire app embedded in an iframe. But how do we control who has access, who is allowed to use up our bandwidth and query our service? We define the problem as controlling access to assets. By assets we mean: anything that can be queried from our site.

He talks about the problem of "lifting" content and how to fall back to a "deny all, allow some" mentality. He starts with examples of Apache configurations that use mod_rewrite to only allow requests that come from the current domain (trusted) and the "files" directive coupled with Deny/Allow. He also includes an nginx example, showing the same request handling. The code examples show how to use PHP and Javascript to prevent access the same way.

0 comments voice your opinion now!
asset protection method webserver configuration code tutorial

Link: http://www.sitepoint.com/asset-access-restriction-methods-block-unwanted-visitors/

Master Zend Framework:
Running the ZF2Skeleton with PHP's Built-in Webserver
April 24, 2014 @ 09:25:07

The Master Zend Framework site has posted the first in their screencast series with a look at running the ZF2Skeleton with PHP's built-in webserver.

In this screencast we'll go through the creating an application from the ZF2Skeleton project on Github and getting it up and running, using PHP's built-in web server. [It requires] PHP 5.4 or higher and Curl.

The screencast, coming in just over 3 minutes, briefly introduces you to the ZF2Skeleton project and shows you how to run it as a single process though PHP's own web server (useful for debugging). As a part of the installation, he also helps you get Composer installed as that's what Zend Framework 2 uses to install its packages correctly.

0 comments voice your opinion now!
screencast tutorial webserver builtin zf2skeleton

Link: http://www.masterzendframework.com/casts/001

PHPClasses.org:
OpenSSL Serious Security Bug Does it Affect Your PHP sites?
April 10, 2014 @ 11:55:37

In the wake of the announcement of the Heartbleed vulnerability in the widely used OpenSSL software, the PHPClasses blog has posted a look at how it relates to PHP applications and how you can see if your application is effected.

Just a few days ago it was publicly announced a serious security bug called Heartbleed that affects secure sites based on the OpenSSL library. Read this article to learn more about this security problem, how to test if your Web server or SSH server is vulnerable, how it may affect your PHP sites, what you should do to fix the problem.

They start with a look at the bug, what it is and why it's such a big problem. It talks about what kinds of applications are vulnerable (hint: it has nothing to do with the PHP) and how you can test to see if your server is secure. The rest of the post talks about how to resolve the issue and how it relates to OpenSSL connections to other servers and SSH.

0 comments voice your opinion now!
openssl bug heartbleed security effect webserver

Link: http://www.phpclasses.org/blog/post/231-OpenSSL-Serious-Security-Bug-Does-it-Affect-Your-PHP-sites.html

MakeUseOf:
Create The Perfect PHP Development Environment In Android
March 05, 2014 @ 10:39:17

On the MakeUseOf site there's a recent post showing how you can create the "perfect PHP development environment" on your Android-based device. Obviously, it's much more useful on a tablet, but in theory it could be used on a smartphone.

It turns out you can actually code on Android productively. For the longest time, it has been accepted that whilst computers are for productivity and creativity, Tablets exist purely to allow the passive consumption of content. I believed that as well. I'm a software developer by trade, and I use a 13" Macbook Pro to write all my code. I wouldn't have it any other way. OS X comes with everything I need to be productive as a developer, and I've built my workflow around that. Android on the other hand? I've never really thought about writing code on Android. [...] But then I bought a decent Bluetooth keyboard, and everything changed. I've now built a PHP development environment around my 2012 Nexus 7 tablet, and I love it.

He breaks it down and shows some of the tools he uses for his development including the use of VIM Touch for editing and the Palapa Web Server for local hosting of his applications. Screenshots of the setup and configuration are also included.

0 comments voice your opinion now!
development environment android vimtouch palapa webserver

Link: http://www.makeuseof.com/tag/create-perfect-php-development-environment-android/

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:
Managing Gettext Translations on Shared Hosting
February 11, 2014 @ 13:09:19

On the SitePoint PHP blog today Aurelio De Rosa makes some recommendations about handing gettext translations on shared hosting. The problem with shared hosting is the need to reset the web server (Apache) to get it to read the updated translation files. His workarounds uses an external script that can dynamically pull in the latest translations without the restart.`

For serious translations we can use Gettext. This approach enables us to have different files for every targeted language which helps in maintaining separation between the business logic, the presentation layer, and the translations (which we can see as an add-on of the presentation layer). With Gettext, we can parallelize the process because while we're working on some features of the website, translators can still work on translations using software like gettext functionality to set the current language and extract a "HELLO_WORLD" string. He then moves on to the use of the Audero Shared Gettext library. This library creates a "mirror" of the translation file requested and forces those updates into the current domain. Code examples of its use are included showing a basic pull and merge process.

0 comments voice your opinion now!
gettext tranlsation dynamic loading webserver shared hosting tutorial

Link: http://www.sitepoint.com/managing-gettext-translations-shared-hosting

Gonzalo Ayuso:
How to run a Web Server from a PHP application
November 11, 2013 @ 11:53:06

Gonzalo Ayuso has put together a post showing how (by implementing the Reactor design pattern) he created a simple web server inside a PHP application. It combines a few Symfony2 components and the React library to build a simple server in a bit more programatic way.

Normally we deploy our PHP applications in a webserver (such as apache, nginx, ). I used to have one apache webserver in my personal computer to play with my applications, but from time to now I prefer to use PHP's built-in webserver for my experiments. It's really simple. [...] With PHP we cannot do it. Sure? That assertion isn't really true. We can do it. I've just create one small library to do it in two different ways. First running the built-in web server and also running one React web server.

The idea is that all that would be needed is a stand-alone PHP script that could be run anywhere and start up its own web server, no other software required. He includes a simplified version of the example, showing how to make servers with both React and PHP's own server. He also includes an example of a basic Silex application that uses it as well as some benchmarks (with Apache ab) for each of the implementations and their request/response times on average for simple and Silex requests.

0 comments voice your opinion now!
builtin webserver server example react silex

Link: http://gonzalo123.com/2013/11/11/how-to-run-a-web-server-from-a-php-application/

SitePoint PHP Blog:
An Interview with the Appserver.io Crew
October 08, 2013 @ 09:57:15

On the SitePoint PHP blog there's a new post interviewing the company behind Appserver.io, an application server written for PHP and in PHP.

What if you could reliably run PHP without Nginx or Apache, but also without relying on its internal server? What if you could do async operations in PHP with true multi threading, fully taking advantage of multi core processors without hacks or a jungle of callbacks? What if you had drag and drop installation support for your PHAR packaged web apps in an environment identical to its production counterpart? Enter Appserver (application server).

They talk with Tim Wagner, Johann "Hans" Zelger and Stefan Wilkommer about the tool and what kinds of features it has to offer PHP developers. There's mention of "servlets", configuration of the platform and the results of some of the benchmarks they've run comparing it to other web servers. There's lots more in the full interview so be sure to check into it if you're intrigued by this interesting addition to the PHP world.

0 comments voice your opinion now!
interview appserverio platform webserver servlet

Link: http://www.sitepoint.com/interview-appserver-io-crew/


Community Events





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


podcast community series security framework symfony list library composer interview conference release artisanfiles version opinion laravel voicesoftheelephpant tool language introduction

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