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

SitePoint PHP Blog:
Stress-test your PHP App with ApacheBench
June 27, 2014 @ 12:55:58

In this recent post to the SitePoint PHP blog Bruno Skvorc looks at using a popular tool from the Apache project, Apache Bench (or just "ab") to stress-test your application.

There's no telling when your app might attract a throng of visitors at once. [...] Regardless of the reason, massive influxes of visitors are a double-edged sword: they get you what you always wanted - a chance to prove your worth to a large chunk of the internet's population - but also often bring with them what you always feared: absolute downtime. [Some] platforms usually offer plugins that can optimize your application while it's up, so you can fine tune it as you go along, but why not try and predict issues while still developing locally and save yourself time, money and effort in the long run?

He bases the testing off of a Laravel Homestead virtual machine instance and tests a simple "hello world" PHP page to minimize any overhead from other processing. He includes the commands to make a simple ab request and mentions the kinds of request it provides on completion. He moves on from there to something a bit more complex - an actual Laravel-based application using the default "HomeController" and "showWelcome" action/view combination.

0 comments voice your opinion now!
apache bench ab tutorial laravel homestead stress test

Link: http://www.sitepoint.com/stress-test-php-app-apachebench/

Allan MacGregor:
Flexible PHP Development with PHPFarm
April 21, 2014 @ 10:44:31

Allan MacGregor has a post today talking about a handy tool he uses in his development to have multiple versions of PHP running side-by-side: PHPFarm.

If you have been working with PHP for a while, chances are that you have come across with a project, extension or script that requires to be tested on multiple PHP versions, for simple CLI scripts this seems easy enough but what happens when you are working with complex applications, developing for frameworks or multiple versions of them? [...] This setup can quickly become cumbersome and it is not easily scalable. [...] Getting multiple PHP versions running side by side can be challenging and over the year devs have released multiple solutions like PHPEnv or the new , personally I use PHPFarm.

He walks you through the installation and configuration of the tool. He also shows you how to get a few different versions of PHP installed, including custom configuration files. He also includes a bit at the end of the post about getting it all to work with Apache (via mod_fastcgi and some custom configuration changes).

0 comments voice your opinion now!
flexible development phpfarm install configure tutorial apache

Link: http://coderoncode.com/2014/04/18/flexible-php-development-phpfarm.html

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/

Rob Allen:
Setting up PHP & MySQL on OS X Mavericks
November 04, 2013 @ 09:52:25

For those that have made the switch to OSX Mavericks and are wondering how to get PHP and MySQL into a working state, Rob Allen has posted a quick guide to getting it all set up.

With OS X 10.9 Mavericks, Apple chose to ship PHP 5.4.17. This is how to set it up from a clean install of Mavericks. Note: If you don't want to use the built-in PHP or want to use version 5.5, then these are [other] alternatives: a binary package from Liip, Zend Server and a Homebrew install.

He provides all the commands you'll need to get things up and running including checking file/directory permissions, installing MySQL and using the command line to work with Apache (no more "Web Sharing"). He also includes the configuration changes to be made to the php.ini including how to enable Xdebug. There's lots of other good things included in the guide as well like setting up Composer, PHPUnit and how to compile a few handy extensions.

0 comments voice your opinion now!
osx mavericks mysql install configure apache extension pear pecl phpunit

Link: http://akrabat.com/computing/setting-up-php-mysql-on-os-x-mavericks/

Brandon Savage:
Compiling PHP 5.5 From Scratch
May 15, 2013 @ 09:48:41

Brandon Savage has a new post to his site today showing you how to compile and install PHP 5.5, the next major upcoming release for the language (in RC status as of the time of this post though).

There's always a lag behind new releases of PHP and releases of packages for operating systems such as Ubuntu. This lag time means that you could be kept from upgrading to the latest and greatest PHP for a year or more, unless you use an outside repository like Dotdeb. [...] Instead, I roll my own version of PHP. It's simple and easy to do, and something that any developer can do. Here's my instructions for doing so on a fresh Ubuntu installation.

He gives a reason or two why you might want to "roll your own" installation and helps you get the environment prepared via some "aptitude" install commands for supporting software. Commands are included for installing needed dependencies, configuring/building PHP and updating Apache to use this new install. He finishes it up with a few smaller things to do like making the php.ini and enabling the Zend opcode caching extension.

0 comments voice your opinion now!
compile language release candidate version tutorial install apache

Link: http://www.brandonsavage.net/compiling-php-5-5-from-scratch

Systems Architect:
Distributed application in PHP with Apache Zookeeper
April 03, 2013 @ 10:24:29

On his Systems Architect site Lukasz Kujawa has posted an introduction to Apache Zookeeper and how to use it in your PHP applications. Zookeeper is "a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services."

Apache ZooKeeper is the coolest technology I recently came across. I found it when I was doing a research about Solr Cloud features. [...] Running multiple application as one logical program is nothing new. In fact creating such a software was one of my first jobs many years ago. This type of architecture is confusing and very tricky to work with. Apache ZooKeeper tries to provide a generic set of tools to manage such a software.

He shows you how to get the PHP extension for Zookepper (along with needed libraries) compiled and installed in your server setup. He includes a sample class that shows you how to connect to the Zookepper server and add a "watcher" your PHP script will respond to when changes happen. The post also has a "Watcher" class example, showing how to use Zookeeper as part of a distributed application. There's some links at the bottom of the post that can also help you get more details on Zookeeper and the PHP interface.

0 comments voice your opinion now!
distributed application apache zookeeper tutorial extension

Link: http://systemsarchitect.net/distributed-application-in-php-with-apache-zookeeper/

Learn Computer:
Is LAMP Pack Still Strong?
April 01, 2013 @ 12:55:09

On the "Learn Computer" site there's a recent post that wonders if the web development standard of the LAMP (Linux, Apache, MySQL and PHP) stack is "still strong" and will still stand up with new technologies.

This year in tech (like almost every other year) has been filled with buzzwords. Many of them this year, however, are based around big data processing and web content: NoSQL, Hadoop, BigTable - the list goes on. With all the fuss around these new technologies, one might be tempted into thinking that these are the technologies of the future, and that from now on our servers and websites will be built upon, leaving technologies like LAMP in the dust.

They talk about some of the things the LAMP stack doesn't do well like difficulties with scalability on both the web server and database side. There's also mention of the things that it does do well, like getting things up and running quickly and with a solid structure.

That being the case, the LAMP stack is still going very strong, and it's definitely still extremely viable in small and medium-sized deployments; there are no signs of it waning in that regard, and I'd expect it to be a standard deployment for many companies and organizations for quite some time to come.
0 comments voice your opinion now!
lamp opinion strength platform linux apache mysql


Iwan Luijks:
E-mailing with PHP on Windows using Apache James
March 06, 2013 @ 12:02:48

Iwan Luijks has a recent post looking at how you can send email through PHP on Windows via the Apache James server.

eveloping in PHP on Windows? Yep me too! Unfortunatly in opposite to developing on Linux, sending e-mail from PHP on Windows requires some more setup than just a bit of sendmail configuration. In this post I explain how to setup an Apache James Server and use it for e-mailing from PHP, all from and to your localhost.

He walks you through the download and installation and includes the changes you'll need to make to get it up and running correctly. He helps you test it's working correctly and how to get PHP set up and pointing to it for mail delivery. Finally, he has a line of PHP (using mail) to test the install and send a sample message.

0 comments voice your opinion now!
email windows apache james server tutorial setup


Kevin Schroeder:
Why you should not use .htaccess (AllowOverride All) in production
February 25, 2013 @ 10:31:09

Kevin Schroeder has posted the results of some research he did around using the "AllowOverride" setting in Apache. He found some interesting differences when it was set to "all".

Commonly known as .htaccess, AllowOverride is a neat little feature that allows you to tweak the server's behavior without modifying the configuration file or restarting the server. [...] Beyond the obvious security problems of allowing configuration modifications in a public document root there is also a performance impact. What happens with AllowOverride is that Apache will do an open() call on each parent directory from the requested file onward.

He includes the output from a strace call in the post - first showing the function calls with it set to "none" then the same request with the setting on "all". More "open" calls are being made in the second run, increasing the execution time by a decent amount.

0 comments voice your opinion now!
apache allowoverride all htaccess production setting performance


NetTuts.com:
Setting Up A Staging Environment
February 15, 2013 @ 10:49:39

On NetTuts.com today Gabriel Manricks walks you through setting up a staging environment using Vagrant to install and setup a virtual machine running Apache 2 and PHP 5.4.

Creating a staging environment is specific to your production environment. There is no magic solution that works in every situation. But most cases follow a similar pattern, and I'll cover all the key points as we go along. It's fair to assume that most people deploy their apps with some kind of versioning tool (like GIT). [...] Besides GIT, you have to think about the languages, software, and "special" features your production servers offer.

All of the commands and configuration files you'll need to make the automatic setup work are included in the article. It's based on a Debian (Squeeze) base image and uses packages to install the needed software. They also install other PHP extensions like mycrypt, GD, curl, APC and database support (MySQL, SQLite and Postgres). They help you get Apache set up to serve the application and work with git and its hooks to push the code and run Composer.

0 comments voice your opinion now!
staging environment tutorial vagrant git apache deployment hooks



Community Events





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


interview introduction laravel framework threedevsandamaybe testing configure release install unittest code series developer refactor list opinion language podcast community wordpress

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