2

I am trying to install phpdbg on OS X. The docs say to cd to /usr/src ... I don't have that directory. What normally goes in /usr/src/php-src/sapi? The php source? If so, where can I find the equivalent directory on OS X? I can't find a php-src directory using finder.

From the docs:

Installation To install phpdbg, you must compile the source against your PHP installation sources, and enable the SAPI with the configure command.

cd /usr/src/php-src/sapi 
git clone https://github.com/krakjoe/phpdbg
...
bernie2436
  • 22,841
  • 49
  • 151
  • 244

2 Answers2

2

In the docs, the directory /usr/src/php-src is used as a sample location to indicate the source directory the copy of PHP compiled on your system. Instead, use the directory containing the source for your local PHP install.

If you installed PHP through a package manager instead of compiling it yourself, find the corresponding source package in the package manager, install the source package, and use the directory it installed to instead of /usr/src/php-src.

You will also need to use the same compiler and toolchain used by the upstream package manager.

Charles
  • 50,943
  • 13
  • 104
  • 142
1

If you use homebrew, it's easy.

With PHP 5.6, I think it's included by default. I haven't upgraded from PHP 5.5, yet.

I already had php55 installed (substitute install for reinstall if this is a new install).

brew reinstall php55 --with-phpdbg

(This is reported to work for PHP 5.4 too. I haven't tried it.)

Kevin G.
  • 585
  • 3
  • 5