php

Drush segmentation fault

Have been seeing segmentation faults coming from "drush cron" runs recently.

Seems that the issue is related to a conflict between the curl and pgsql php components.

On debian - the php cli config loads the config files under /etc/php5/cli/conf.d

If it loads curl.so before it loads pgsql.so then when releasing a postgres connection it will segfault.

Workaround is simply to load pgsql first. Files in the conf.d directory are loaded alphabetically.

PHP segmentation fault if both curl and postgres modules loaded (debian)

Technical:

Running some porting scripts (command line PHP) for drupal yesterday - and for the first time trying out postgres.

I kept getting a segmentation fault at the end of each script.

Turns out that there is some issue with the curl and postgres php modules.

For a workaround on debian see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=411982#120 - it changes the order of loading.

Running xdebug 2.0.4 on OSX Leopard apache/php

This is based on the information on http://developers.sugarcrm.com/wordpress/2008/11/25/enabling-xdebug-under-os-x-leopard/. Download xdebug 2.0.4 (or later - but this is based on the 2.0.4 build) - extract it.

Apache2, NameVirtualHosts, SSL and SERVER_PORT

I was experiencing odd things integrating to google maps - although I have both an API key for http and https - only https was working.

It turns out that the setting of the apache environment variable SERVER_PORT was always 443 irrespective of whether I was using http/80 or https/443 from the client.

I have several NameVirtualHosts on different IPs.

In apache2.conf:

Subscribe to RSS - php