Where is x-debug for Php 7.1 ? :/

(Eöras) #1

Hello, i’m sorry but i used brew update && brew upgrade yesterday, and i see brew install a lot of new repo, and now i don’t know why but i didn’t see my module xdebug working anymore :confused:

When i look my phpinfo() i didn’t see xDebug anymore, and i can’t install is. When i try he tell me hombrew/php is depreciated.

I have to wait update?

Ty for your help.

How to build php72 with tidy support?
(Roman) #2

Use pecl for this: https://github.com/Homebrew/homebrew-core/issues/26007#issuecomment-377715665

(Eöras) #3

So we can’t install xdebug with brew anymore right?

(Eöras) #4

I’m trying to install pecl or pear but no one work… how can i install this ? Why all changed and all are depaciate now i didn’t understand nothing :cry:

I just want my xdebug work again back :frowning:


Used PECL to install php xdebug module, but PECL didn't config php.ini properly
(Eduard Rozenberg) #5

With php72 I tried pecl install xdebug but it doesn’t work for me. Tries to install to bad or undesirable locations.

The manual approach is the way to go, for now.

Download xdebug source: https://xdebug.org/files/xdebug-2.7.0alpha1.tgz
(other versions at https://xdebug.org/download.php)

Untar and build the source:

$ tar xvf xdebug-2.7.0alpha1.tgz
$ cd xdebug-2.7.0alpha1
$ phpize
$ ./configure
$ make
$ cd modules
$ ls
$ cp xdebug.so /usr/local/opt/php/lib/php/<somedir>

The directory where you copy the module is up to you, and the suggested dir above may get cleared out at the next php update, so you’ll have to go through the process again.

You also need to add some lines to php.ini or to a file you create in for ex. /usr/local/etc/php/7.1/conf.d/. The lines should look like:


In my case (php 7.2), I have a file /usr/local/etc/php/7.2/conf.d/ext-xdebug.ini that contains these lines.

Then restart httpd service.

(Eöras) #6

OK this work now. I did

  • Uninstall brew and all package
  • Install brew
  • install brew install php@7.2

With this, pecl work fine.

BUT i always have to runs as SUDO because he don’t have right to do nothing :confused: and pecl upgrade don’t work but… xdebug is already installed … Voilà

(Kevin Abel) #7

With php72 I tried pecl install xdebug but it doesn’t work for me. Tries to install to bad or undesirable locations.

What is bad or undesirable about the location? /usr/local/lib/php/pecl was specifically chosen to avoid problems when php is upgraded by brew. By manually moving it into /usr/local/opt/php/ it’s going to disappear when the next version is upgraded.

Please have a look at the default installed php 7.2 config file at /usr/local/etc/php/7.2/php.ini.default and compare it to you modified php.ini. You should notice that it includes a line extension_dir = "/usr/local/lib/php/pecl/20170718" that references the upgrade safe directory for pecl (or manually built) modules to go.

If you don’t like where pecl puts the extension= in your php.ini you can disable that feature, but the default config is just fine as long as you double check what you’re doing.

(Eduard Rozenberg) #8

Thanks for the detail Kevin.

Earlier today when I tried pecl install xdebug I got an error that it couldn’t create the directory it was trying to save to (/usr/local/Cellar/php/7.2.4/pecl/20170718/). When I looked, /usr/local/Cellar/php/7.2.4/pecl was a file - I don’t know why. Subsequently I uninstalled and reinstalled php and now it works fine. Strange.

(Eduard Rozenberg) #9

I think I was wrong, and probably what I saw when I looked at /usr/local/Cellar/php/7.2.4/pecl was that it is a symlink to another directory, not a file. Still not sure what caused the xdebug error earlier but it worked fine just now after php reinstall earlier today.

(Wouter Samaey) #10

When installing php@7.1 there is no --with-pear option, so how do I get PECL?

(Sean Molenaar) #11

Pear and pecl are now included into the package by default.

(Pedro Cruz) #12

so if i have php@7.1 projects, how i can put xdebug on my project?

EDIT: i already tryed with pecl install xdebug and cant find the xdebug image

(Eduard Rozenberg) #13

What does that mean can’t find image?

What is the error.