Wednesday, February 13, 2008

 

Whether to INI or not

So I've had enough of different PHP versions compiled in different modes (ZTS or DEGBUG) and having to change the php.ini file every now and then on my dev machines. So I added conditional INI support:

[IF (ZEND_DEBUG_BUILD == true) && (ZEND_THREAD_SAFE == true)]
zend_extension_debug_ts=/usr/src/${PHP_BRANCH}/xdebug.so
[ELSEIF ZEND_DEBUG_BUILD == true]
zend_extension_debug=/usr/src/${PHP_BRANCH}/xdebug.so
[ELSEIF ZEND_THREAD_SAFE == true]
zend_extension_ts=/usr/src/${PHP_BRANCH}/xdebug.so
[ELSE]
zend_extension=/usr/src/${PHP_BRANCH}/modules/xdebug.so
[ENDIF]

I used square brackets for the conditionals, as it seemed the way that comes with the least potential for INI handling. This is because right now we ignore section names anyway.

The patch can be downloaded here and allows for the following:
If you are interested in this stuff, you can either comment on this blog entry or follow the discussion on internals@php.net here.

Blogged with Flock

Labels:


Comments: Post a Comment



Links to this post:

Create a Link



<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]