こんにちは、ウェブソリューション事業部のかねこです。
桑ちゃんに「MacにもXAMPPあるよ!」と教えてもらったので、早速入れてみました。
途中、phpMyAdminがエラーになったのを解決したので、せっかくだから記録に残しておきます。
入手はここです!
http://www.apachefriends.org/jp/xampp-macosx.html
インストール後、起動してApache Web Server起動したらエラーになりました。がーん

ブラウザでlocalhostアクセスしたところ、まさかのIt Worksが表示された。
よく考えたら、自前で入れたhttpdがうごいてたのでターミナルから
sudo apachectl stop
で停止。
無事に起動 ;-p
みれた。
続いてMySQL起動。こちらは無事に起動。
と思ったら、この有様である
Cannot start session without errors, please check errors given in your PHP and/or webserver log file and configure your PHP installation properly. Also ensure that cookies are enabled in your browser.
セッションが開始できないと言っているので、php.iniからセッションファイル格納ディレクトリを確認する。
php.iniはっけん
Tomos-MacBook-Air:session tomo$ sudo find / -name php.ini Password: /Applications/XAMPP/xamppfiles/etc/php.ini
そして、sessionディレクトリの指定がなかった
; where MODE is the octal representation of the mode. Note that this ; does not overwrite the process's umask. ; http://php.net/session.save-path ;session.save_path = "/tmp"
ちゃんと指定する
; where MODE is the octal representation of the mode. Note that this ; does not overwrite the process's umask. ; http://php.net/session.save-path session.save_path = "/tmp/session"
ディレクトリ作成&権限設定
Tomos-MacBook-Air:/ tomo$ cd /tmp Tomos-MacBook-Air:tmp tomo$ mkdir session Tomos-MacBook-Air:tmp tomo$ chmod 777 session
XAMPPのマネージャからApache再起動して確認。
ふふ。できた。
以上、メモでした。XAMPPは本当に便利だ。
かねこ











