View Issue Details

IDProjectCategoryView StatusLast Update
0000916XdebugInstallationpublic2013-03-09 22:07
Reporterterje Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionno change required 
PlatformGNU/LinuxOSUbuntuOS Version12.04.1 LTS
Product Version2.2.1 
Summary0000916: Failed to load xdebug.so, undefined symbol: php_body_write
Description

terjebr@banan:~/xdebug/xdebug-2.2.1$ make test
Build complete.
Don't forget to run 'make test'.

Failed loading /home/terjebr/xdebug/xdebug-2.2.1/modules/xdebug.so: /home/terjebr/xdebug/xdebug-2.2.1/modules/xdebug.so: undefined symbol: php_body_write
Failed loading /home/terjebr/xdebug/xdebug-2.2.1/modules/xdebug.so: /home/terjebr/xdebug/xdebug-2.2.1/modules/xdebug.so: undefined symbol: php_body_write

=====================================================================
PHP : /usr/bin/php
PHP_SAPI : cli
PHP_VERSION : 5.4.6-1ubuntu1
ZEND_VERSION: 2.4.0
PHP_OS : Linux - Linux banan 3.2.0-35-generic-pae 0000055-Ubuntu SMP Wed Dec 5 18:04:39 UTC 2012 i686
INI actual : /home/terjebr/xdebug/xdebug-2.2.1/tmp-php.ini
More .INIs :
CWD : /home/terjebr/xdebug/xdebug-2.2.1
Extra dirs :
VALGRIND : Not used

TIME START 2013-01-14 06:30:00

No tests were run.

Steps To Reproduce

Compile xdebug-2.2.1
Then
Either run make test

Or

Install the xdebug.so file and restart apache.
In the /var/log/apache2/error.log I get

[Mon Jan 14 05:50:05 2013] [notice] caught SIGTERM, shutting down
Failed loading /usr/lib/php5/20090626+lfs/xdebug.so: /usr/lib/php5/20090626+lfs/xdebug.so: undefined symbol: php_body_write
[Mon Jan 14 05:50:06 2013] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.6-1ubuntu1 configured -- resuming normal operations

TagsNo tags attached.
Operating SystemGNU/Linux Ubuntu
PHP Version5.4.6

Activities

pepellou

2013-02-08 14:33

reporter   ~0002424

In May 31 2010, some changes in PHPAPI made the function php_body_write() to be replaced with php_output_write(). See commit here: https://github.com/php/php-src/commit/11d24c1593d6617f73d3f290617bd8994182f4dc#L51L121

By running "git branch -a --contains 11d24c1" in the official php-src repo I found out that this change was introduced since PHP 5.4.1, thus your PHP version includes this change, being "php_body_write" an unexisting symbol.

Your xdebug.so is trying to access that symbol anyway, which suggests me that your "phpize" might be still based on a previous PHP version. Beware that package "php5" and "php5-dev" are different and you might have upgraded the "php5" one (containing the mentioned changes in PHP) and not the "php5-dev" (which contains the 'phpize' command).

To determine if this is your problem, you can just read the output of the "phpize" command. First line shows the PHP Api Version ("20100412" in my case). If that version is previous to 2010 you might have an old one, and thus upgrading it should fix the problem.

terje

2013-02-09 14:20

reporter   ~0002425

Thank you pepellou. It was indeed the case. Ubuntu 12.04.1 ships with php version 5.4.6, but with the php5-dev package only on version 5.3.10.

$ phpize --version
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626

I have reported the problem to Ubuntu. I guess it is their fault.

derick

2013-03-09 22:07

administrator   ~0002441

peppelou, thanks for the analysis. I'm closing this issue on my side then.

Issue History

Date Modified Username Field Change
2013-01-14 05:35 terje New Issue
2013-02-08 14:33 pepellou Note Added: 0002424
2013-02-09 14:20 terje Note Added: 0002425
2013-03-09 22:07 derick Note Added: 0002441
2013-03-09 22:07 derick Status new => resolved
2013-03-09 22:07 derick Resolution open => no change required
2013-03-09 22:07 derick Assigned To => derick