LoginSignup
12
15

More than 5 years have passed since last update.

OSXにphp7+xdebugをインストール

Last updated at Posted at 2015-12-07

 ⚠︎ 現在はliipのphpをインストールするとxdebugがインストールされ個別にインストールする必要はありません。
 ⚠︎ 何かの理由でxdebugをソースインストールしたい場合のみ有用な記事です。

php7のインストール

バイナリパッケージをインストール

curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0

xdebugのインストール

git clone git@github.com:xdebug/xdebug.git
cd xdebug
/usr/local/php5/bin/phpize 
./configure
make
sudo make install

※ 現在のXdebug v2.4.0RC3-devはphpStormでの実行でまだ不安定です。

設定ファイル設置

/usr/local/php5/php.d/50-extension-xdebug.ini
zend_extension=xdebug.so

確認

PHP本体とxdebugのバージョン

$ php -v

PHP 7.0.0 (cli) (built: Dec  2 2015 13:35:31) ( NTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.4.0RC2, Copyright (c) 2002-2015, by Derick Rethans

インストールされているモジュール

$ php -m

[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
imap
intl
json
ldap
libxml
mbstring
mcrypt
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_pgsql
pdo_sqlite
pgsql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xdebug
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Xdebug
Zend OPcache

ini編集

/usr/local/php5/php.d/99-liip-developer.ini
date.timezone = Asia/Tokyo

感謝

xdebugのパッケージを開発してメンテナンスしている@derickrさんに感謝。php7への対応はハードワークだったに違いありません。

php5.6.16とphp7.0.0のモジュールのdiff

apc
apcu
ereg
http
igbinary
memcache
memcached
mhash
mongo
mssql
mysql
OAuth
pdo_dblib
propro
raphf
redis
solr
ssh2
xhprof
12
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
15