Category Archives: PHP

International PHP Conference 2009

Like the last years I will attend the International PHP Conference which will be held in Karlsruhe, Germany. I’ll present a half day workshop about “Unittesting for dummies” together with Lars Jankowfsky from swoodoo. On monday I’ll do a talk called “Fix your acrchitecture” where I will speak about anti patterns in business, processes and developement. I’ll be in Karlsruhe until wednesday evening, so if you want to meet me… :-)

Zend Debugger for Snow Leopard

Yesterday Zend released the Snow Leopard compatible 64 bit ZendDebugger binary. So I can debug again. :-)

imac:extensions thorsten$ file ZendDebugger.so 
ZendDebugger.so: Mach-O universal binary with 2 architectures
ZendDebugger.so (for architecture i386):Â Â  Â Mach-O bundle i386
ZendDebugger.so (for architecture x86_64):Â Â  Â Mach-O 64-bit bundle x86_64

Installing PHP 5.3 with MacPorts

I’m using MacPorts on my iMac and my MacBook Pro for PHP development. Yesterday I mentioned that MacPorts switched their stable PHP 5 package from PHP 5.2.10 to PHP 5.3.0 and I decided to do the switch as well. Upgrading packages with MacPorts is very easy, it’s just a

imac:~ thorsten$ sudo port upgrade outdated

Just hit enter and MacPorts starts to build all packages which have to be updated. My problem was that PHP 5.3.0 didn’t installed automatically:

Error: Target org.macports.activate returned: Image error:
/opt/local/include/php/ext/ereg/php_ereg.h already exists and
does not belong to a registered port.  Unable to activate port php5.

So I tried to uninstall the PHP 5 package and re-install it once again. But also the same problem the second time. So I decided to do the hard way and I removed all the PHP library stuff.

imac:~ thorsten$ rm -rf /opt/local/include/php
imac:~ thorsten$ rm -rf /opt/local/include/php

Now I tried it once again:

imac:lib thorsten$ sudo port install php5 +apache2 +macosx +mysql5 +pear +postgresql83 +sqlite
--->Â  Installing php5 @5.3.0_0+apache2+macosx+mysql5+pear+postgresql83+sqlite
--->Â  Activating php5 @5.3.0_0+apache2+macosx+mysql5+pear+postgresql83+sqlite
You may need to update your php.ini for any changes that have been made
in this version of php. Compare /opt/local/etc/php5/php.ini with
/opt/local/etc/php5/php.ini-development (if this is a development server) or
/opt/local/etc/php5/php.ini-production (if this is a production server).

If this is your first install, you need to activate PHP in your web server.

To enable PHP in Apache, run
 cd /opt/local/apache2/modules
 /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
--->Â  Cleaning php5

Then I restarted Apache… and PHP 5.3.0 is running on my iMac! :-)