a programmer's best friend :: Entries from August 2006 |
Sunday, August 27. 2006Analyzing aide (advanced intrusion detection environment) output with PHP
Since we started hosting our sites on our own server we had some nasty cracker-attacks (most often certainly script-kiddies) causing lots of traffic by hosting crappy italian movies or by installing rootkits. To at least have a chance recognizing whether the system had been compromised we started to use aide some time ago. Aide keeps track of changes in the filesystem and provides us with a human-readable report once a day.
However, sometimes changes in the filesystem happen because of (security-)updates and not because a cracker exchanged your ps binary against his own personal version. Continue reading "Analyzing aide (advanced intrusion detection environment) output with PHP" Sunday, August 20. 2006New releases of patTemplate and patForms
After I finally finished my book (and my contribution to Exploring PHP) I finally have enough time to work on all of my open source projects again and today made two new releases. patTemplate 3.1.0b1 contains tons of changes since the last stable version. Most of the features that users have been requesting for years have been incorporated into this release, like the possibility to read templates from a database:
It is now also possible to use any PHP function or method as a default value for a variable which allows you to prefill a value with the current timestamp. Furthermore I have been putting a lot of work into the new patTemplate manual.patForms 0.9.0b3 mostly contains bugfixes and provides several install-groups for the PEAR installer, which allow you to choose your form renderer when installing patForms. This will hopefully be one of the last beta version for patForms 0.9.0 as we plan to release a stable version during the next 4-6 weeks. Both packages can easily be installed using of PEAR channel server at pear.php-tools.net. Creating PEAR-installable nightly builds
If you incorporate a "release early, release often" policy for your projects, it helps you to detect bugs in an early development stage of your application. In many cases making a release takes some time and you do not release new versions as often as you intended. We had these problems with our projects over at www.php-tools.net. That's why we created snaps.php-tools.net, a site where you can download nightly builds of our projects as ZIP, TAR.GZ or TAR.BZ2 archive. This saves the users, who want to test the latest development versions the hassle checking out the latest version from our subversion repository. The problem of this technique was, that most users use the PEAR installer to deploy our packages and if they downloaded a ZIP file, it's not possible to use the PEAR installer on this file. That's why we came up with a solution to create nightly builds that are installable with the PEAR installer. Read on, if you are interested in how this can be achieved...
Continue reading "Creating PEAR-installable nightly builds" Friday, August 18. 2006PHP Design Patterns finished Today I received a message from O'Reilly, that my book PHP Design Patterns is now going to print and is scheduled to be released in September 2006. The work of the last six months is finally bearing fruit and I will be able to spend my spare time on coding again instead of just writing. If you wondered, why patTemplate or any of my other open source projects did not show any progress, this announcement should answer your questions.I put nearly all of my thoughts on software architecture, OO design and patterns into this book and thus it consists of 370 pages dealing with OO development in PHP 5.1, creational patterns, structural patterns, behavioural patterns as well as enterprise patterns and MVC architectures. Furthermore it covers SPL, Propel and patTemplate to provide some real-life examples of the patterns. If you intend to buy the book, you should be warned that it has been written completely in German. If you still are interested, you will find more information on the book as well as the code example on the website or you can already pre-order it from Amazon. Thanks go to gERD, luckec and Frank who supported me with their knowledge as well as Toby, who introduced me to O'Reilly. Thursday, August 17. 2006patForms Gettext Patch
Usually i18n and multi language support is not a big issue in web business. Even if web-sites seem to be global players, most of them get along with support for very few languages. patForms for example comes with support for English, French and German and therefore covers pretty much everything I ever wanted.
On the contrary non-French, non-English and non-Germans may blame patForms for lack of support for Danish, Swedish, Spanish, Russian etc. Rightly, I suppose. Unfortinately, the supported languages are within the form elements and rules. Hence it would mean to change a lot of files (classes) to simply add another languaga's messages. Knowing that we started to introduce support for extrernal translation tables - stored in ini-files. Another idea was to use the PHP Gettext extension which should be available on most servers. The two major advanteages of this method are: (1) You simply don't have to bother about NLS (native language support) while you write some geek patForm rules or element. (2) Gettext is widly spread and comes with a bunch of tools to extract translatable strings and maintain translation tables. This makes it fairly simple to add support for additional languages like Spanish, Danish and even Gungan. So far, patForms does not use Gettext. Still, I created a patch which works extremly well. I love to invite you to test this patch and and tell me what you think about patForms using Gettext. Please also tell me your opinon whether we should move to Gettext for the next release of patForms. Download: - Zip file: patForms-Gettext.zip 512 kByte - Tar Bz2 archive: patForms-Gettext.tar.bz2 188 kByte Checkout from our Subversion repository $ svn co http://www.php-tools.net/svn/patForms/branches/gettext/ Links: - PHP Gettext - GNU Gettext - Translation editor PO Edit, KBabel Monday, August 7. 2006Der Zauberlehrling - Sorcerer's ApprenticeRecently the German PHP Magazine published the August 2006 issue. The principal topic is AJAX and Web 2.0 technologies, including an article covering the PEAR package HTML_AJAX This article's target is (1st) to give a brief introduction to AJAX and how things work from Javascript an PHP side in contrary. Also (2nd) I wanted to show that you actually don't have to muck around with a mess of Javascript (browser compatibility issues and such) because it's it is all done by the Joshua Eichorn's HTML_AJAX framework. Unfortunately, four odd pages arn't enough to build up a complete application. Still, it tells you where to begin and how you can add Web 2.0 features to your site within minutes. Also there is one more crux: it's German only Sunday, August 6. 2006patTemplate 3.1.0a2 released
I just released patTemplate 3.1.0a2. This will be the last alpha version for 3.1.0 and I hope to release a stable version during the next 6-8 weeks. The major changes since 3.0.1a1 include:
Exploring PHP to be published soonThe article I contributed showcases how event-driven-development can be used to create component based, flexible applications that allow you to easily plug in new features without modifying the core application. The examples in the book use PEAR's Event_Dispatcher. Other articles cover unit testing with SimpleTest (by Frank), the generation of 3D images with PEAR's Image_3D (by Kore), migration to PHP 5 and refactoring (by Sandro) as well as news on PHP 6 (by Christian). The editor for the book is Markus Nix, he compiled all the articles. If you take a closer look at the cover, you might see that there are different names listed on the cover than those mentioned in the blog. This is because some of the original authors did not manage to deliver their articles in time and have been replaced. The planned release date for the book is 08/17/2006, so keep your eyes open. |
php_network_getaddresses: getaddrinfo failed: Name or service not knownphp_network_getaddresses: getaddrinfo failed: Name or service not known |