Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Today I installed/updated my previous php 5.3.x to 5.4.11. Did it accordingly how do I upgrade from php 5.3 to php 5.4.6 in ubuntu?

Install was successful, but it seemed to me, that xdebug was outdated due to a warning message when viewing php -v to check the success of installation.

So I updated pear/pecl, removed previous installation of xdebug
sudo pecl uninstall xdebug

Set php_ini setting in pear/pecl and tried once more to sudo pecl install xdebug. When installation was finishing for some reason it showed me, that php_ini is not pointing to php.ini(when it actually was).

Nevertheless, installation was successful except, that when I tried to add /usr/lib/php5/20090626+lfs/xdebug.so to a file in /etc/php5/mods-available and symlink to that file in /etc/php5/conf.d, after restarting server I got for php -v

sandbox@ubuntu:~$ php -v
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/xdebug.so' - /usr/lib/php5/20090626+lfs/xdebug.so: undefined symbol: php_body_write in Unknown on line 0
PHP 5.4.11-1~precise+1 (cli) (built: Jan 24 2013 15:22:16)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Does anyone know how to fix it? I really need Xdebug to be on my side)

UPDATE: Forgot to mention, that everything is happening on Ubuntu Server 12.04, that is located on VirtualBox under Windows host system.

UPDATE 1: I was suggested to move 20090626+lfs directory elsewhere, since it might shadow the newer version, but no. After moving it away I tried to reinstall xdebug( sudo pecl uninstall xdebug & sudo pecl install xdebug ), but for somereason it was installed to same place. When viewing pecl config I see

PHP extension directory        ext_dir          /usr/lib/php5/20100525+lfs

, but during installation of xdebug it prints out following

checking for PHP extension directory... /usr/lib/php5/20090626+lfs
share|improve this question

migrated from serverfault.com Feb 22 '13 at 15:24

This question came from our site for professional system and network administrators.

3 Answers 3

in my case php5-dev was already installed and i got the unable to load... message, too. Uninstalling xdebug did the trick for me:

sudo pecl uninstall xdebug

and then

sudo pecl install xdebug

the install directory changed now and i needed to modify my /etc/php5/mods-available/xdebug.ini to point to the new xdebug.so

share|improve this answer
up vote 1 down vote accepted

php5-dev needed to be installed.

sudo apt-get install php5-dev
share|improve this answer

Include the follow lines in the php.ini file.

[xdebug]
zend_extension=xdebug.so

Edit the file /etc/php5/cli/conf.d/xdebug.ini

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

In the follow URL http://icdif.com/computing/2011/05/01/xdebug-ubuntu/ you get the simple tutorial to setup the xdebug but do not forget to run the command:

sudo pecl install xdebug (this commando

restart the apache

sudo /etc/init.d/apache2 restart

and perfert!

Works like a charme!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.