
昔のXAMPPはとてつもなく簡単で、ローカル環境で実験するのに良かったんですが、今また入れてみたら難しくなっていました。セキュリティの設定が増えてちょっとめんどくさい仕様になっていたのである程度できたところをメモっていきます。
まずダウンロードするところ、ここはxamppのサイトのMac OS Xのところを普通にダウンロードしてOK。速度がやたら重いのでゆっくり待つ。

インストールして起動するとまずこんな画面が出る。
普通に Start 、Go to application でとりあえず xamppのdashboardが表示されます。昔のxamppだったらここで完全に起動してPHPもCGIもなんの苦労もなく動くんですが、こっからちょっとめんどくさい。

まず一個づつ、GeneralタブはStartしたんで
Services
普通にStart All で全部起動します。

続いて
Network
これは General タブの Open terminal を使うため Enable にしておきます。xamppのterminalとMacについてるのでは違うOSのようです。だからxamppからterminalを起動すると今まで使ってたコマンドは使えず新しくエディターなりをapt-getで入れます。
debianでインストールになるんですが非常に速度遅いのでエディター1個30分は待つと思ってるのが無難です。
Volumes
/opt/lampp にアクセスするので Mount しておきます。

ここまでで初期設定終わり。
PHP My admin にセキュリティで起動できない。

General タブの Go to application を押すとブラウザにこの画面が出る。
でも何にも設定してないとここまでしかいきません。

右上の5項目がありますが、phpMyAdminがセキュリティで http-xampp.conf
を編集しないと使えません、みたいなことが出てくる。検索してやり方を調べて編集してみます。
まずMac内でhttp-xampp.confを探すのではなく、mountした /opt/lampp
から探します。xamppは別のOSがバーチャルで起動していると考えた方がいいです。

色々と検索していろんな方法が載ってました、が、xamppの初期画面のHow to Guides にphpMyAdminの設定方法が載ってました。これだけで充分です。
phpMyAdminを許可する設定
To enable remote access to phpMyAdmin from other hosts, follow these steps:
- Launch the stack manager by double-clicking the XAMPP icon in the mounted disk image.
- Ensure that Apache and MySQL services are running in the “Services” tab of the stack manager (or start them as needed).
- Open a new terminal from the “General” tab of the stack manager.
- Edit the /opt/lampp/etc/extra/httpd-xampp.conf file.
- Within this file, find the block below:
1 .Launch the stack manager by double-clicking the XAMPP icon in the mounted disk image.
設定のコピペです。
VolumesのMountをする。

2 Ensure that Apache and MySQL services are running in the “Services” tab of the stack manager (or start them as needed).
Apache MySQLをStartします。

3. Open a new terminal from the “General” tab of the stack manager.
Generalタブの Open terminalを起動します。
4. Edit the /opt/lampp/etc/extra/httpd-xampp.conf file.
xamppのterminalから
/opt/lampp/etc/extra/httpd-xampp.conf
を開いて編集します。
ここで、xamppからterminalを開くと、今まで使っていたエディタが
使えなかったのでxampp用にapt-get install でインストールしておきます。
個人的にemacsが楽なので apt-get install emacs 、debianでインストールに
なるからかとても速度は遅いです。

編集する箇所。
<Directory /opt/lampp/phpmyadmins>


一箇所しかないので迷わないはず。
<Directory “/opt/lampp/phpmyadmin”>
AllowOverride AuthConfig
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>
こんな具合に、
Require local
を
Require all granted
に書き換えるだけです。
最後にxamppを再起動。
これでphpMyAdminの設定は完了。
もしApacheがそれで起動しなくなったら設定ファイルをもう一度見てみる。
Require all granted
の部分が色が違うので誤って
Require Require all granted
などになってないか確認。