UNIXベースなので以下のコマンドでインストールしてみる。
/Applications/XAMPP/xamppfiles/bin/pear upgrade pear channel-update pear.php.net /Applications/XAMPP/xamppfiles/bin/pear upgrade pear upgrade PEAR /Applications/XAMPP/xamppfiles/bin/pecl install xdebug
コンパイルで大量のエラーが出て上手くいかないはずだ。
■解決策
Komodo Remote Debugging Package Downloadsで、「Downloads > PHP Remote Debugging Client > Mac OS X (universal)」をクリックしてダウンロードし、PHPのバージョンに合ったファイルを以下のコマンドでコピーする。
cp /Users/[user]/Downloads/Komodo-PHPRemoteDebugging-6.1.0-60797-macosx/5.x/xdebug.so /Applications/XAMPP/xamppfiles/lib/php/php-5.x.x/extensions/no-debug-non-zts-20xxxxxx/xdebug.so
設定ファイル
以下のコマンドを実行する。
vi /Applications/XAMPP/xamppfiles/etc/php.ini
次に、以下の一行を加える。
[xdebug] zend_extension ="/Application/XAMPP/xamppfiles/lib/php/php-5.x.x/extensions/no-debug-non-zts-20xxxxxx/xdebug.so" xdebug.remote_enable = 1 xdebug.remote_host = 127.0.0.1 xdebug.remote_port = 9000 xdebug.remote_handler = dbgp xdebug.profiler_enable = 1 xdebug.profiler_output_dir = "/Applications/XAMPP/xamppfiles/htdocs/_xdebug_profiler" xdebug.profiler_output_name = cachegrind.out.%s
基本設定
ついでにマルチバイト系の設定をし忘れてたのでやっておく。
mbstring.language = Japanese mbstring.internal_encoding = UTF-8 mbstring.http_output = UTF-8 expose_php = Off
500個めの記事でしたーσ°▽°)σ
ピンバック: webネタ