php

Posted in Development, Zend Framework, php on January 25, 2010

Zend_Pdf and damaged PDF files in acrobat

Playing with Zend_Pdf all my files open perfectly in preview.app. But switching to Adobe Acrobat I got this error: Adobe Reader could not open 'file.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and ... Continue Reading

Posted in Zend Framework, php on January 12, 2010

just released: Zend Framework 1.9.7

Grab the latest version at the Zend Framework website. This update fixes 46 issues. This release also resolves six security vulnerabilities found in the last few weeks. Those vulnerabilities are also patched for the 1.8 and 1.7 branch. Bug [ZF-5156] – Custom pagesize results in fatal ... Continue Reading

Posted in Development, Zend Framework, php on January 8, 2010

Zend_Form, Validators and Custom Error Messages

Below is a code snippet if you want a simple sign-up form on you website using Zend_Form. Features are set email adres to lowercase using Zend_Filter_StringToLower. Use Zend_Validate_Emailaddress, to check the correctness of the email address. Check password for StringLenght; minimal 6 & ... Continue Reading

Posted in php on November 25, 2009

Set all PHP internals to UTF-8

If you have problems with transcoding strings, for example, between ISO-Latin and UTF-8, it can help if you set the internal encoding to UTF-8 ini_set('mbstring.internal_encoding','UTF-8'); ini_set('mbstring.http_input','UTF-8'); ini_set('mbstring.http_output','UTF-8'); Continue Reading

Posted in Zend Framework, php on November 25, 2009

just released: Zend Framework 1.9.6

Grab the latest version at the Zend Framework website. This update fixes 76 issues. The next release is set for December 15th. This new version might be the tagged as 1.10.0. Release Notes – Zend Framework – Version 1.9.6 Bug [ZF-3642] – Wrong count of executed queries [Z ... Continue Reading

Posted in Zend Framework, php on October 27, 2009

just released: Zend Framework 1.9.5

Grab the latest version at the Zend Framework website. Lot’s of Zend_Db fixes in this release. Release Notes – Zend Framework – Version 1.9.5 Bug [ZF-2358] – Zend_Service_Yahoo::webSearch ’site’ option [ZF-2606] – Adding htmlentities() in createElement ... Continue Reading

Posted in php on October 23, 2009

Convert Rijksdriehoekscoördinaten to latitude ...

A Rijksdriehoekscoördinaat is used by the Dutch cadastre. Since all cadastre geo-data is not according the WGS84-standard, you need to convert a Rijksdriehoekscoördinaat (RD) to latitude / longitude values, for use in Google maps for example. You can convert them with this function P ... Continue Reading

Posted in php on October 20, 2009

Geo/Spatial search using Sphinx search and php

I have some databases with geo-location data in it, and wanted it displayed on my iPhone using Layar. Doing some research on this, I found a great presentation on Geo/Spatial search in MySQL. Reading this presentation shows that doing a search of geo-locations in a radius around a geo-loc ... Continue Reading

Posted in Zend Framework, php on October 17, 2009

just released: Zend Framework 1.9.4

Grab the latest version at the Zend Framework website. Lot’s of Zend_Db fixes in this release. Release Notes – Zend Framework – Version 1.9.4 Bug [ZF-6653] – Calling from() and join() “out of order” causes incorrect SELECT generation [ZF-7423] – In ... Continue Reading

Posted in Selenium, Snow Leopard, php, phpUnit on October 16, 2009

User Interface testing on Mac OS 10.6 Snow Leopard ...

Zend framework is my PHP framework of choice, and I like Zend Studio 7 for coding. I try to unit test as much as possible. But when in comes to User Interface testing, plain phpUnit cannot do the job. Then Selenium comes in play. So with’s the big deal? It isn’t working out of ... Continue Reading