Archive for June 25th, 2007

Jonathan Snook’s Blog: Elemental: Conditional Content with CakePHP

In the new blog entry, Jonathan Snook shows how to implement “conditional content” on your CakePHP application.

I finally got around to implementing conditional content here on Snook.ca. I’ve wanted to do this since I moved to the new design just over a month and a half ago. […] With a little bit of late night development and some quick help from Larry (aka PhpNut, the lead developer of CakePHP), I’ve developed what I have dubbed “Elemental”.

In his example he shows the two parts making up the functionality - the controller with new methods (in app_controller.php) and a new helper called “Elemental”. Using the methods enableElement and disableElement you can turn off and on different chunks of code that are stored in an element array.

Continue Reading · Add comment

PHPBuilder.com: Cross-Platform Database PHP Development

On PHPBuilder.com today, there’s a new tutorial focusing on the development of PHP applications that can be run on different database environments without many changes to the actual application.

There are several options available to interact with multiple database engines with PHP, such as Pear DB and MDB2. However, there may instances where you will be required to develop your own custom database interface that connects to many different database engines using a single unified syntax. This article will address the development of a class that will do exactly that. In addition, we will include the ability to replicate data among several databases in real time.

They create their own abstraction layer that has the ability to make the connection, replicate data between connections, handle some errors and work with database configuration data. The tutorial shows you how to use the script for three different database types - MySQL, Oracle, and MS SQL.

Continue Reading · Add comment

WorkingSoftware.com.au: Configuring PHP4 and PHP5 to run concurrently on FreeBSD

From Iain Dooley on WorkingSoftware.com.au today, there’s a new tutorial covering the installation of PHP4 and PHP5 onto a FreeBSD server.

So, briefly here is my little recipe for getting PHP4 and PHP5 to run concurrently on FreeBSD using Apache 2.2 and mod_proxy.

He points out one method that’s been posted to get this all working, but notes that there are a few issues he found with it. That’s the point of this post - to rectify and solve those problems to have you on your way to a happily working PHP4/PHP5 installation.

His guide is broken up into the key steps:

  • Compiling with mod_proxy from FreeBSD ports
  • Installing another Apache instance
  • PHP Installation
  • Configuring and running Apache
  • and a bug, Bug 37770, he came across where the proxy would just stop working

Continue Reading · Add comment

php|architect: June 2007 Issue Released

As the php|architect site mentions, the latest issue of the php|architect magazine has been released - the June 2007 edition.

Highlights from the issue include:

  • An introduction to r3
  • Apache Error Documents with PHP
  • Printing from PHP

And, of course, the two usual columns - Security Corner (Stefan Esser) and Test Pattern (Jeff Moore). You can order this issue as a stand-alone issue or save even more on it and subscribe today to a full year and save 15% off buying each issue alone.

Continue Reading · Add comment

Secunia.com: SUSE update for PHP4

According to this new advisory from Secunia today, the SuSE linux group has released a new package update for the PHP4 distribution on their operating system:

SUSE has issued an update for php4. This fixes some vulnerabilities and a weakness, where one has an unknown impact and the others can be exploited by malicious, local users to gain escalated privileges, and by malicious, local users and malicious people to bypass certain security restrictions.

The issue is marked as “Less critical” but it’s still a good idea to update, especially when it relates to security issues. You can find more information at the original advisory on the Novell site.

Continue Reading · Add comment