Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Your Email:
Blog Feed

PHP Blog

Running background processes in PHP

Friday, July 18th, 2008

So you’ve just built a fantastic processing routine for your application. You’ve checked and double checked the integrity of user input, and you’re doing some serious processing. There’s only one problem: it’s too slow. There’s a simple solution: forking your processing script, and running the code as a background process asynchronously. It can email your user when it’s done: they’ll wait. In this tutorial, I’ll show you how to get started with background processes in PHP. (more…)

SimpleTest: Unit Testing for PHP

Monday, July 14th, 2008

We recently looked at front-end testing of web applications with Selenium. Today, we’ll take another approach to testing your PHP applications: backend unit testing for your actual PHP code. As part of our posts on test driven development, here’s a quick intro to using SimpleTest to test your PHP applications. (more…)

Getting Started with ORM in PHP

Monday, July 14th, 2008

ORM, or Object Relational Mapping, is a database design approach that simplifies managing complex databases for programmers. Instead of direct database access, an ORM layer in a PHP framework can make “objects” stored in a database behave like actual objects from a programming perspective - for example, creating a new “car” stored in the database could involve a call to $car->new(). By abstracting actual database access, web development can be more productive and result in more reliable applications. Here’s a quick intro to ORM in PHP. (more…)

Load testing your web application with Apache Bench

Thursday, July 3rd, 2008

Often you need solid metrics on the performance of your web application. Benchmarking your website can provide insight into which sections of your application might need major optimizations, and helps in dealing with scalability issues. Apache Bench, or ‘ab’, is a command line load testing utility which ships with Apache, and allows you to simulate load on a web server. In this tutorial, I’ll show you how to get started with ab. (more…)

Benchmarking PHP frameworks

Thursday, July 3rd, 2008

Over on the AVNet Labs blog, Ekerete Akpan has posted a few results from his recent framework benchmarks to much controversy. His tests covered a few major PHP frameworks, such as CodeIgniter, CakePHP and Zend Framework, along with baseline results for serving static HTML and procedural PHP versions of the same page. He also covered some basic Ruby on Rails, including Passenger (mod_rails?) and Ruby Enterprise. Here are some of his more interesting findings. (more…)

Phing: A build system for PHP

Thursday, June 26th, 2008

As PHP applications grow in size and complexity of structure, developers often find themselves putting together a “deployment plan” - that is, a set of steps to go through each time they want to take the code and package, deploy or test it. This process could involve creating some deployment-specific configuration files, packaging up the code, storing the current state in version control, even setting up the database. Phing is a build system for PHP, based on Apache Ant, that aims to automate many of these processes and simplify application deployment for PHP developers. (more…)

WebGrind: web-based frontend for XDebug PHP profiling

Wednesday, June 18th, 2008

Webgrind is a web-based Xdebug profiling frontend for PHP similar to kcachegrind. Webgrind provides a simple PHP-powered interface for examining the output of XDebug’s profiling reports, for a quick and simply overview of the performance costs in various areas of your PHP application.
(more…)

Debugging CakePHP applications in Zend Studio for Eclipse

Friday, May 30th, 2008

After I recently upgraded to Zend Studio for Eclipse, I noticed one troubling feature of my setup - I couldn’t debug applications with “pretty urls”. Zend Studio for Eclipse has a great debugging platform setup, even with a dedicated IDE layout for debugging, and the Zend Studio Debugger backend on the server is quite powerful in itself. In this tutorial, I’ll show you how to make use of that power and debug your Cake applications with Zend Studio for Eclipse. (more…)

Wordpress Comment Styling Round Up

Friday, May 30th, 2008

One question I hear people asking a lot is how to style the comment section in Wordpress. I didn’t have time to go in depth in my tutorial Designing and Coding a Wordpress Theme from Scratch but here are a few links from my del.icio.us to some blogs that break it down in far more detail.


(more…)

Yahoo! SearchMonkey: revisiting PHP, platform-style

Thursday, May 22nd, 2008

When it comes to making your site important, platforms trounce software hands down. Facebook learned this the easy way; today, the myriad of Facebook applications available make the social networking site a typical destination for a significant proportion of internet users. Indeed, many users now browse new content on their favourite sites via their respective Facebook apps. Platform wins. Yahoo! is about to accomplish the same, this time in web search, and has opted for PHP.

(more…)

Blog Categories Blog Archives