1

When I run php -v I get

PHP 5.6.32-1+ubuntu16.04.1+deb.sury.org+1 (cli)

So then I go to xdebug wizard, paste in the output from php -i, follow the steps

When I run phpize I get

Cannot find build files at '/usr/local/lib/php/build'. Please check your PHP installation

So I did phpize5.6 and got

PHP Api Version: 20131106

Zend Module Api No: 20131226

Zend Extension Api No: 220131226

which matches the wizard. Now when I run ./configure, I get

checking Check for supported PHP versions... configure: error: not supported. Need a PHP version >= 5.5.0 and < 7.2.0 (found 5.3.10)

However, if I run it like ./configure --with-php-config=php-config5.6 I can get the end of the wizard. It says to

Run: cp modules/xdebug.so /usr/lib/php/20131226

Edit /etc/php/5.6/cli/php.ini and add the line zend_extension = /usr/lib/php/20131226/xdebug.so

But now I get

Failed loading /usr/lib/php/20131226/xdebug.so: /usr/lib/php/20131226/xdebug.so: undefined symbol: zend_pass_function

So it looks like there is something wrong with the php installation. It seems to use 5.3, but php -i shows 5.6. Do you have any ideas on why that is and how I could best resolve it?

1 Answer 1

2

Ok, so I solved this by first searching /usr for 5.3.10

This led me to see that I had used phpbrew a while ago, although I was using the system-installed version of php rather than the phpbrew version.

Switching to the phpbrew version 5.6 (instead of the system 5.6) resolved the error.

In future I can remove phpbrew and go back to the regular php following advice here.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.