php

Install XAMPP for Apache, mysql, PHP and more

XAMPP is a good packaging of a full WAMP (Windows, Apache, mysql, PHP) stack.

HOWTO: Build a PHP Development Environment on Windows

This tutorial will walk you though setting up a complete development environment on Windows. I am using Windows 7 Home Premium, 64-bit. This setup also works well on Windows XP, and I have heard this also works on Vista, although I have never run Vista myself.

In the end we will have the following installed:

  1. Apache Web Server
  2. PHP for server-side processing
  3. mysql database server
  4. phpmyadmin for managing mysql databases via a web browser
  5. SVN Server for source code version control

SOLUTION: symfony 1.4 doctrine:generate-module error: The "xxxForm" form only accepts a "xxx" object

When trying to execute php symfony doctrine:generate-module frontend account Account I only got the following error (verbose output is at the end of this post.)

The "AccountForm" form only accepts a "Account" object.

This was driving me nuts. As it turns out it was all caused because I had a table named "form" in my database. Apparently this causes a classname conflict after code generation.

I revised my schema.yml to rename form to input_form and Form to InputForm.

Local variables not appearing in xdebug 2.0.6-dev with XAMPP on windows

I have been cursing my Netbeans 6.9.1 / XAMPP 1.7.3 / xdebug 2.0.6-dev installation for some time because variables are not displayed while debugging. Further, when I enable watches under PHP options in Netbeans, it warns me that xdebug is known to be unstable with that feature, and they are right! (Socket errors all over the place!)

I upgraded xdebug to 2.1.0 and I notice the difference immediately. My local variables are listed and have values.

Reference the following to assist with your upgrade:

How to list the methods of a PHP object at runtime

This is handy to inspect a PHP object for the methods available at runtime:

// Extract methods from an instance of the class:

$methods = get_class_methods($product);

foreach ($methods as $method_name) {
    echo "$method_name\n";
}

// Extract the methods from the name of the class:

$methods = get_class_methods('Mage_Catalog_Model_Product');

foreach ($methods as $method_name) {
    echo "$method_name\n";
}

Xdebug wizard to detect and recommend binary selection

It can be a challenge sometimes to determine which version of the xdebug binary is required for your system's configuration. This handy xdebug binary recommendation wizard will accept and parse your phpinfo(); or php -i output. It will tell you which version is installed and recommend a newer version, if applicable. It also has a link to the appropriate binary package and instructions for installation.

eZ Components proposes adoption by Apache Software Foundation as Zeta Components

I just discovered that the core developers of eZ components have left eZ Systems, but have worked out an arrangement with eZ Systems to donate the source code to the Apache Software Foundation.

Zeta Announcement Apr 19, 2010

Tobias Schlitt's blog post

Netbeans IDE

Netbeans is a powerful IDE (integrated development environment) that supports many languages. It got its start as a Java IDE, and in fact its written in Java, so it runs on Windows, Linux, and Mac.

Netbeans is open source and free of licensing costs.

At the time of this writing, I am using Netbeans 6.8 for PHP development.

PHP Frameworks

In no particular order, here is a list of PHP frameworks that I am considering:

ez Components purports to be an "Enterprise" PHP library. This is very appealing to me, in that I am not interested in making a blog in 20 minutes. My typical applications need to integrate with back-end corporate systems, have non-trivial security and filtering rules, and the like. The framework at first glance is much larger than some competitors listed here, so likely carries with it a larger learning curve. As much as I enjoy the intellectual excercise of framework development, I'd much rather have the productivity and consistency across my programming team that a framework brings. More on this after I build my first experiment with ezComponents.