Showing entries 1 to 5
Displaying posts with tag: php5 (reset)
05.12. Doctrine 2

Introduction

Object-relational mapping (ORM) frameworks have been around for several years now and for some people, ORM is already outdated by now. As we have seen with other technologies and concepts before, PHP is not exactly what we call an early adopter among the programming languages. Thus it took some time for ORM to grow up in the PHP context.

There have been some frameworks before Doctrine 2 that implement ORM (remember e.g. Propel) specific tasks but most of them lack the required maturity to be used in large projects. With Doctrine 2, PHP takes a huge step into the right direction Doctrine 2 is fast, extensible and easy to use.

This article will take you on a tour through the main concepts of Doctrine 2 in the first part and then explain how to use it in a real world application in the second part. Since at the time of writing …

[Read more]
PHP 5.3.4 and MySQL 5.5.8 GA (libmysql)

This content has been updated and moved to a new place. As you are probably aware, PHP 5.3.4 does not compile with MySQL 5.5 GA. The details can be seen in MySQL bug queue. Basically, the problem boils down to incorrect installation of MySQL headers. MySQL 5.5 build system does not install the headers under the include-prefix/mysql directly but instead installs under the include-prefix directory itself. So, when the PHP build system looks for the MySQL headers, it cannot find …

[Read more]
MySQLnd Plugins: Writing a MySQL Query Logger in PHP

During the development of an application, not all time is spent on writing code. A lot of time is spent on reading debug output, crawling through log files and firing up the debugger to figure out what the application does. While the debugger helps us to inspect details of a running application on a testing environment, logfiles are often the only indication of the origin of an error on a production system. In this blogpost I want to describe how to log SQL statements on an existing application without touching any existing line of code at all. We will use a new MySQLnd Extension developed at the Mayflower OpenSource Labs for that purpose.

As an example, I will use PHProjekt 6. The project is particularly suitable for demonstration purposes as it has a logging infrastructure for function calls, but does not log SQL statements. …

[Read more]
Passing the Zend Certified Engineer exam

After successfully passing the MySQL 5.0 Developer exams earlier this year the next step was preparing for the Zend Certified Engineer.

For preparation I first took php|architect's Zend PHP 5 Certification Study Guide from the bookshelf and started reading. The book gives a good overview of the topics covered in the exam and I even learned a few things while reading that I did not knew of before. Unfortunately it contains too many errors and mistakes in the printed examples and there is no errata on the internet.

After reading through the book I first did not really knew how to proceed in preparing for the exam. I did not have the feeling of being prepared to pass an exam, although I would think myself of a quite good and experienced PHP programmer. A really good thing is that everyone at Mayflower has the possibility to take some text exams at …

[Read more]
On ?On PHP? and version numbers

Matt has a good post on the recent push to make people use PHP 5. He makes several good points, and I’m just jumping on the same bandwagon.. forcing a version # change, just because the engine works better is pointless. Going into the political arena a little bit, making people switch to PHP 5 is like changing CAFE standards, it won’t do a thing for the billions of cars already out there, and it won’t change the basic dependence on crude oil. It’s just a lot of hot air to make the choir sing to themselves, again.

I’ve been running PHP 5 on my systems for the past 3 years, without any issues. Even some of the code I wrote in PHP 4, works flawlessly (with the same bugs) in PHP 5 as PHP4. Which brings me to the main point.. End Users don’t care or want to know what the engine is doing . If the application does something they want, they’ll use it. If …

[Read more]
Showing entries 1 to 5