I have a question about PHP. I use Ubuntu but I have different PHP builds that I built myself in /opt/php. I have a problem (using PHP 5.3.8) when enabling an extension doing the following synopsis
cd my-ext
/opt/php/5.3.8/bin/phpize
./configure --args...
make
make install
And I get the following error:
PHP_FE_END (undefined function)
From a Japanese blog and PHP SVN source (see links below)
http://d.hatena.ne.jp/SeaHacker/20110825
http://marc.info/?l=php-cvs&m=131161504128077
Apparently, the hack is to replace PHP_FE_FUNCTION
by {NULL,NULL,NULL}
so I added this in my code:
sed -i 's|PHP_FE_END|{NULL,NULL,NULL}|' /opt/php/5.3.8/ext/**/*.c
sed -i 's|ZEND_MOD_END|{NULL,NULL,NULL}|' /opt/php/5.3.8/ext/**/*.c
And this fixes the bug. But I am not a C expert so I know it works but I don't know why so it's kind of frustrating. Anybody could shred some light on that matter?