ハマログ

株式会社イーツー・インフォの社員ブログ

MacにXAMPPいれたらphpMyAdminが起動しませんでしたの巻

こんにちは、ウェブソリューション事業部のかねこです。

桑ちゃんに「MacにもXAMPPあるよ!」と教えてもらったので、早速入れてみました。
途中、phpMyAdminがエラーになったのを解決したので、せっかくだから記録に残しておきます。

入手はここです!
http://www.apachefriends.org/jp/xampp-macosx.html

インストール後、起動してApache Web Server起動したらエラーになりました。がーん
Screen Shot 2013-07-17 at 22.57.12

ブラウザでlocalhostアクセスしたところ、まさかのIt Worksが表示された。

Screen Shot 2013-07-17 at 22.59.41

よく考えたら、自前で入れたhttpdがうごいてたのでターミナルから

sudo apachectl stop

で停止。
無事に起動 ;-p

Screen Shot 2013-07-17 at 23.02.15

みれた。

Screen Shot 2013-07-17 at 23.03.20

続いてMySQL起動。こちらは無事に起動。

Screen Shot 2013-07-17 at 23.03.52

と思ったら、この有様である

Screen Shot 2013-07-17 at 23.04.22

phpMyAdmin – Error
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再起動して確認。

ふふ。できた。

Screen Shot 2013-07-17 at 23.13.54

以上、メモでした。XAMPPは本当に便利だ。

かねこ

DBmacmacosxmysqlPHPxampp

  kaneko tomo   2013年7月17日


関連記事

node.jsフレームワーク「Adonis」(3)

前回はMVCのV(View)とC(Controller)に軽く触れてみましたので…

STIMULUSでちょっとリッチなUI

フロントエンド(JavaScript)の開発の方向性については「これ」というデフ…

PictMasterを使用して組み合わせ表を生成

組み合わせ表を生成するツールはいくつかありますが、今回は「PictMaster」…


← 前の投稿

次の投稿 →