In this new blog postKae Verens shares a method he came up with to change over about 300 domains' worth of email over from qmail to posfix in an orderly, automated fashion.
Yesterday we had to move about 300 domains from one machine to another. We bought a new machine recently and are taking this opportunity to move from Qmail (difficult to use, in my opinion) towards Postfix. After doing one or two by hand, i decided that's stupid - why not just automate the whole thing.
The script reads from vqadmin and pushes that information over to mailadmin who makes the emails over on the postfix side. The script makes heavy use of the cURL extension to get the job done.
The Zend Developer Zone has a new tutorial they posted recently on using the Zend_Tool component to make starting a new Zend Framework application from scratch a much simpler thing.
This tutorial will set you through using Zend_Tool to jump-start development on your next ZF MVC application. Zend_Tool is both RAD tools as well as a framework for exposing your own set of tooling needs to the Zend_Tool user interface. While the areas in which extending Zend_Tool are exhaustive, we will focus merely on obtaining and using the current Zend_Tool toolset.
The tutorial walks you through the installation of the component, how to set it up correctly as a "binary" and how to automatically create a new project with a simple "create project" call. He also points out the ability it has to define some of the basic files for actions of your choosing.
On the PhPL33t blog, there's a guide for automating the creation of email addresses with the Plesk administration application:
In 2003 I wrote "Plesk Auto Email", the first fully funtional Plesk email automation suite. Now, I am going to show you how to do it. You will need a dedicated server with Linux, Plesk 7.5 and higher, php5, mysql5, and root access. This will show you how to code the auto creation, I am not going into deletions and edits at this time because I don't have all night to blog.
Included are the database table to store the commands in, the PHP script to create the commands (the integration into the other piece of software) and the PHP cron script that looks in the command table and executes each as it goes through.
In this new post to his blog today, Raphael Stolt shows how to combine the Zend Framework and Phing to create a simple, quick setup utility for future ZF projects.
After spending too much time on directory and view script shifting to align an 'older' Zend Framework application to the very useful ViewRenderer Action Helper of the follow-up releases I crafted a single Phing buildfile to stick to the recommended conventions and to have a nearly 'one-button' setup solution for any upcoming projects.
He'd found some other packages that did something similar, but wanted to do it with Phing. He includes the requirements (the software) features that the buildfile makes easy to include and some future improvements that could be made to the install to make things even easier. The buildfile is included and any path or configuration changes that might need to be made.
Phing is a "make" replacement that uses XML build files to define tasks in classes.
On the devthatweb blog, there's a new post from Pat Nakajima with a recipe for deploying a PHP application with the help of Capistrano (the Ruby on Rails tools for deploying web applications).
Recently though, I was working on a PHP project, and I decided that the time had come to rewrite my Mint recipe to allow deployment of any PHP project, totally independent of Rails. I set to work, and I'm happy to share the result.
The example makes it a simple matter of using the command "cap deploy:php" to use the recipe and push out your PHP application.
According to this note from the International PHP Magazine website, there's a new tool being offered by Aivosto that allows PHP developers to "reverse engineer" their code back into flow charts and UML activity diagrams.
Visustin is the ideal diagramming tool for software developers and document writers. Save your documentation efforts by automatic charting! Visustin reverse engineers your source code and visualizes it. No manual drawing is required. Your existing code is all you need. If you see a real complex case, print it out as a big mosaic and hang it on your wall.
Functionality includes the automatic creation of a optimized layout, the ability to do a multi-page printout, saving the graphs/charts/etc in various formats, run a "bulk chart" on all of your files at once, and export options including PowerPoint, out to the web, and Word.
You can get the full details on the product (as well as screenshots and a demo) from their website.
Paul Jones, author for the popular Solar PHP framework, has posted the secret to his success of being able to release five versions of the framework in seven days - an automatic release process.
But what I want to talk about in this entry is the release process itself. With the help of Greg Beaver (indirectly) and Clay Loveless (directly), Solar now has a moderate-length PHP script that handles almost all aspects of the release process automatically. Usage is at the command line; issue "php release.php" for a test run, or "php release.php commit" for a full release-and-commit cycle.
With any luck, the lessons I've learned here will be of use to someone else; with more luck, perhaps someone else will see possible improvements and mention them here. Read on for a narrative of how the script came to be.
He not only talks about the package, he also goes through the three iterations that it took to get the package where it is today. It has evolved from a simple PEAR package, to an automatically adjusting PEAR package, and enhancing it to add administrative functionality to maintaining it. He notes that there are still a few manual tasks that have to be done, but overall, it's a nice and easy process.
Matthew Weir O'Phinney has been working with PHPUnit and the SPL (Standard PHP Library) in PHP for a bit now, and he's discovered a way to integrate the two to automate the testing procedure.
I've actually come to enjoy the PHPUnit2 style of tests. In the end, I find that my tests are much less verbose than the way I was performing them with phpt, and I tend to test for failure rather than success; failure should be the exception to the rule. The myriad of 'assert' methods make this relatively easy (though some operate in unexpected ways -- try testing assertSame() on two objects that contain PDO handles, for instance).
One thing that was missing for me was an easy way to run all tests in a directory, ala 'pear run-tests'. However, I was initially disappointed. The demonstrated way to do this is to manually require each test file and add the class contained therein to the test suite. Basically, I was going to need to touch the file every time I added a test class to the suite. Bleh!
So, he set about working up his own solution - a regular expresion-based, recursive class that would locate the testing files and perform the specified actions. He shares the solution with a good bit of example code included with the post.