View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0001706 | Xdebug | Installation | public | 2019-10-01 11:22 | 2019-10-01 18:27 | |||||||||||||||||||||
Reporter | peterdd | Assigned To | derick | |||||||||||||||||||||||
Priority | high | Severity | block | Reproducibility | have not tried | |||||||||||||||||||||
Status | resolved | Resolution | no change required | |||||||||||||||||||||||
Platform | Laptop | OS | macOS HighSierra | OS Version | 10.13.6 | |||||||||||||||||||||
Product Version | 2.7.2 | |||||||||||||||||||||||||
Summary | 0001706: cannot install Xdebug with pecl on macOS High Sierra | |||||||||||||||||||||||||
Description | I tried following Install instructions for mac on xdebug.org, but the suggested solution using pecl does not work. Usually I do not use php on the mac directly, but use vagrant boxes or remote servers. But to try Xdebug as totally Xdebug noob thought it would be easier to setup the local before fiddling with remote debugging setup from mac with vscode/otherIDE <---> virtualbox vagrant boxes | |||||||||||||||||||||||||
Steps To Reproduce | I tried this as user peter (and when failed also as root without success): peter:~/test/phplocal>pecl install xdebug creating libtool
|
+----------------------------------------------------------------------+ | INSTALLATION INSTRUCTIONS | ========================= | |||
---|---|---|---|---|---|
See https://xdebug.org/install.php#configure-php for instructions | |||||
on how to enable Xdebug for PHP. | |||||
Documentation is available online as well: | |||||
- A list of all settings: https://xdebug.org/docs-settings.php | |||||
- A list of all functions: https://xdebug.org/docs-functions.php | |||||
- Profiling instructions: https://xdebug.org/docs-profiling2.php | |||||
- Remote debugging: https://xdebug.org/docs-debugger.php | |||||
NOTE: Please disregard the message | |||||
You should add "extension=xdebug.so" to php.ini | |||||
that is emitted by the PECL installer. This does not work for | |||||
Xdebug. | |||||
+----------------------------------------------------------------------+
running: find "/private/tmp/pear/temp/pear-build-peterEAO0Gq/install-xdebug-2.7.2" | xargs ls -dils
4319700431 0 drwxr-xr-x 3 peter wheel 96 1 Okt 12:46 /private/tmp/pear/temp/pear-build-peterEAO0Gq/install-xdebug-2.7.2
4319700983 0 drwxr-xr-x 3 peter wheel 96 1 Okt 12:46 /private/tmp/pear/temp/pear-build-peterEAO0Gq/install-xdebug-2.7.2/usr
4319700984 0 drwxr-xr-x 3 peter wheel 96 1 Okt 12:46 /private/tmp/pear/temp/pear-build-peterEAO0Gq/install-xdebug-2.7.2/usr/local
4319700985 0 drwxr-xr-x 3 peter wheel 96 1 Okt 12:46 /private/tmp/pear/temp/pear-build-peterEAO0Gq/install-xdebug-2.7.2/usr/local/Cellar
4319700986 0 drwxr-xr-x 3 peter wheel 96 1 Okt 12:46 /private/tmp/pear/temp/pear-build-peterEAO0Gq/install-xdebug-2.7.2/usr/local/Cellar/php
4319700987 0 drwxr-xr-x 3 peter wheel 96 1 Okt 12:46 /private/tmp/pear/temp/pear-build-peterEAO0Gq/install-xdebug-2.7.2/usr/local/Cellar/php/7.3.4_1
4319700988 0 drwxr-xr-x 3 peter wheel 96 1 Okt 12:46 /private/tmp/pear/temp/pear-build-peterEAO0Gq/install-xdebug-2.7.2/usr/local/Cellar/php/7.3.4_1/pecl
4319700989 0 drwxr-xr-x 3 peter wheel 96 1 Okt 12:46 /private/tmp/pear/temp/pear-build-peterEAO0Gq/install-xdebug-2.7.2/usr/local/Cellar/php/7.3.4_1/pecl/20180731
4319700990 576 -rwxr-xr-x 1 peter wheel 294592 1 Okt 12:46 /private/tmp/pear/temp/pear-build-peterEAO0Gq/install-xdebug-2.7.2/usr/local/Cellar/php/7.3.4_1/pecl/20180731/xdebug.so
Build process completed successfully
Installing '/usr/local/Cellar/php/7.3.4_1/pecl/20180731/xdebug.so'
Warning: mkdir(): File exists in System.php on line 294
PHP Warning: mkdir(): File exists in /usr/local/Cellar/php/7.3.4_1/share/php/pear/System.php on line 294
Warning: mkdir(): File exists in /usr/local/Cellar/php/7.3.4_1/share/php/pear/System.php on line 294
ERROR: failed to mkdir /usr/local/Cellar/php/7.3.4_1/pecl/20180731
peter:~/test/phplocal>
Here some more environment info:
peter:~>php --version
PHP 7.3.4 (cli) (built: Apr 19 2019 01:39:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.4, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.4, Copyright (c) 1999-2018, by Zend Technologies
peter:~>brew list |grep php
php
php72
php72-tideways
peter:~/test/phplocal>brew list php
/usr/local/Cellar/php/7.3.4_1/.bottle/etc/ (4 files)
/usr/local/Cellar/php/7.3.4_1/.bottle/var/log/php-fpm.log
/usr/local/Cellar/php/7.3.4_1/bin/pear
/usr/local/Cellar/php/7.3.4_1/bin/peardev
/usr/local/Cellar/php/7.3.4_1/bin/pecl
/usr/local/Cellar/php/7.3.4_1/bin/phar
/usr/local/Cellar/php/7.3.4_1/bin/phar.phar
/usr/local/Cellar/php/7.3.4_1/bin/php
/usr/local/Cellar/php/7.3.4_1/bin/php-cgi
/usr/local/Cellar/php/7.3.4_1/bin/php-config
/usr/local/Cellar/php/7.3.4_1/bin/phpdbg
/usr/local/Cellar/php/7.3.4_1/bin/phpize
/usr/local/Cellar/php/7.3.4_1/homebrew.mxcl.php.plist
/usr/local/Cellar/php/7.3.4_1/include/php/ (316 files)
/usr/local/Cellar/php/7.3.4_1/lib/httpd/modules/libphp7.so
/usr/local/Cellar/php/7.3.4_1/lib/php/ (15 files)
/usr/local/Cellar/php/7.3.4_1/pecl
/usr/local/Cellar/php/7.3.4_1/sbin/php-fpm
/usr/local/Cellar/php/7.3.4_1/share/man/ (8 files)
/usr/local/Cellar/php/7.3.4_1/share/php/ (159 files)
|
This looks like some strange configuration on your machine. I see that in your configure output, you have: Which is something odd, as it should have "extensions" where it has "pecl". Another important warning at the end of pecl install is: Warning: mkdir(): File exists in /usr/local/Cellar/php/7.3.4_1/share/php/pear/System.php on line 294 Which is strange, as /usr/local/Cellar/php/7.3.4_1/pecl is a file (that you just used with "pecl install"). Of course it can not make a subdirectory of this. There is a workaround however, by tweaking the pecl tool's configuration and php.ini directive for settings. First, change the extension dir in your php.ini file (use php --ini to find which file to use). Either change the extension_dir to /usr/local/Cellar/php/7.3.4_1/extensions/20180731, or add the directive if it doesn't exist: extension_dir=/usr/local/Cellar/php/7.3.4_1/extensions/20180731 Then check whether that worked, with: Now "pecl install xdebug" should work. If it still does not work, please ask for further support on Stackoverflow, as this is not a bug in Xdebug: |
|
I do not think I have unusual machine, I just use Homebrew on an old Macbook Pro to install a handful opensource stuff and do not fiddle much with that machine, mainly running just web browsers. I found related bug report here https://github.com/Homebrew/homebrew-core/issues/41081 After trying back and forth, the php install with Homebrew now includes Xdebug: I uninstalled the php7.3.4 with: brew uninstall php then brew install php which is now php version 7.3.10 and tried another package install: and got a similiar error: .... Build process completed successfully Warning: mkdir(): File exists in System.php on line 294 Warning: mkdir(): File exists in /usr/local/Cellar/php/7.3.10/share/php/pear/System.php on line 294 So this is/was probably a Homebrew/PHP/PECL problem. Homebrew seems to work a lot with symbolic links: peter:~>ls -l /usr/local/bin/php Probably this confuses pecl? peter:~>php -v There is also a php-fpm that probably comes with macOS High Sierra included?: peter:~>php-fpm -v
|
Date Modified | Username | Field | Change |
---|---|---|---|
2019-10-01 11:22 | peterdd | New Issue | |
2019-10-01 13:45 | derick | Assigned To | => derick |
2019-10-01 13:45 | derick | Status | new => resolved |
2019-10-01 13:45 | derick | Resolution | open => no change required |
2019-10-01 13:45 | derick | Note Added: 0005156 | |
2019-10-01 18:27 | peterdd | Note Added: 0005157 |