LoginSignup
0
0

More than 1 year has passed since last update.

PHP5.6 + Xdebugのインストール (2022)

Posted at

MacにPHP5.6 + XDebugをインストールします。

PHPはbrewでインストール

brew install php@5.6

パスを通します。

export PATH="/opt/homebrew/opt/php@5.6/bin/:$PATH" 

または(インテルの場合)

export PATH="/usr/local/opt/php@5.6/bin:$PATH"

次にxdebugのインストールをしますが古すぎてpeclではインストールできません。またソースインストールもphpizeのautoconfのエラーで失敗します。

以下のようにソースインストールに必要なautoconfをソースからインストールします。

curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
tar xzf autoconf-latest.tar.gz
cd autoconf-*
./configure --prefix=/usr/local
makea
sudo make install

次にPHP5.6に対応したXdebug 2.5.5をソースからインストールします。

  curl -OL https://xdebug.org/files/xdebug-2.5.5.tgz
  tar xzf xdebug-2.5.5.tgz 
  cd xdebug-2.5.5
  phpize
  ./configure
  make
  sudo make install

PHPStorm 2022.1.4でPHP 5.6+Xdebugが動作するのを確認しています。

0
0
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
0
0