質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
XAMPP

XAMPP(ザンプ)は、ウェブアプリケーションの実行に必要なフリーソフトウェアをパッケージングしたApacheディストリビューションです。 XAMPPひとつインストールするだけで、Apache、MySQL、PHP、Perlなどのソフトウェアと、 phpMyAdminなどの管理ツール、SQLiteなどのソフトウェアやライブラリモジュールなどを利用することが可能です。

Q&A

解決済

1回答

4730閲覧

XAMPPでApacheやMySQLがスタートできない。

RT2

総合スコア18

XAMPP

XAMPP(ザンプ)は、ウェブアプリケーションの実行に必要なフリーソフトウェアをパッケージングしたApacheディストリビューションです。 XAMPPひとつインストールするだけで、Apache、MySQL、PHP、Perlなどのソフトウェアと、 phpMyAdminなどの管理ツール、SQLiteなどのソフトウェアやライブラリモジュールなどを利用することが可能です。

0グッド

0クリップ

投稿2019/10/17 06:37

XAMPPでセキュリティの設定をするために検索している中、次の記事に行きつきました。

2.2.2. phpMyAdminの設定ファイル(config.inc.php)を編集する

phpMyAdminの設定ファイル「config.inc.php」を書き換えてログインの認証方法を変更します。

「XAMPP」を「C:\xampp」にインストールした場合、設定ファイルは

「C:\xampp\phpMyAdmin\config.inc.php」

にあります。設定ファイルをテキストエディターで開いて、「/* Authentication type and info */」の設定を書き換えます。

●設定ファイル[config.inc.php]

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
3行目「$cfg['Servers'][$i]['user'] = 'root';」のユーザーはrootが指定してありますので、4行目「$cfg['Servers'][$i]['password'] = '';」に先ほど設定したパスワード(your_password)を設定しても構いませんが、ファイルにパスワードを保存するのは、セキュリティ上あまりおすすめしませんので、phpMyAdminを開く時に、ログイン認証される設定に変更しましょう。

●config.inc.php

/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
2行目 ['auth_type'] を「'config'」から「'cookie'」に変更して下さい。
また3行目 ['user'] の「'root'」は削除「''」して下さい。変更が終わったらファイルを保存します。

この通りに設定して、XAMPPのコントロールパネルを再度起動してみると、

[Apache] Problem detected: Apache Not Found!
14:59:42 [Apache] Disabling Apache buttons
14:59:42 [Apache] Run this program from your XAMPP root directory!
14:59:42 [mysql] Problem detected: MySQL Not Found!
14:59:42 [mysql] Disabling MySQL buttons
14:59:42 [mysql] Run this program from your XAMPP root directory!
14:59:42 [filezilla] Problem detected: FileZilla Not Found!
14:59:42 [filezilla] Disabling FileZilla buttons
14:59:42 [filezilla] Run this program from your XAMPP root directory!
14:59:42 [mercury] Problem detected: Mercury Not Found!
14:59:42 [mercury] Disabling Mercury buttons
14:59:42 [mercury] Run this program from your XAMPP root directory!
14:59:42 [Tomcat] Problem detected: Tomcat Not Found!
14:59:42 [Tomcat] Disabling Tomcat buttons
14:59:42 [Tomcat] Run this program from your XAMPP root directory!
14:59:42 [Tomcat] Problem detected: Required Tool catalina_start.bat Not Found!
14:59:42 [Tomcat] Problem detected: Required Tool catalina_stop.bat Not Found!
14:59:42 [Tomcat] Problem detected: Required Tool catalina_service.bat Not Found!
14:59:42 [main] Starting Check-Timer
14:59:42 [main] Control Panel Ready

というエラーになって、Apache もMySQLもstartできません。
Run this program from your XAMPP root directory!
と記載がありますが、上のとおりコマンドでrootは消していますが、それが原因でしょうか。だとしたら、上の記事ではセキュリティの設定はできないという事でしょうか。記事をみる限りでは、この方法でstartできているのですが、他に設定の方法でミスがありますでしょうか。ご指摘いただきたいです。
宜しくお願いします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

maisumakun

2019/10/17 06:39

一度パソコンごと再起動してみても同じ状況でしょうか。
RT2

2019/10/17 06:55

再起動してみても同じです。 そもそも、テキストエディタで[Linter] Error running PHPと出てくるので、それが原因でしょうか。エラーの内容は、<?phpや?>がエラーと出てくるので、入力ミスでしょうか。 自分が入力したものは /* Authentication type and info */ $cfg['Servers'][$i]['auth_type'] = 'cookie'; $cfg['Servers'][$i]['user'] = ''; $cfg['Servers'][$i]['password'] = ''; $cfg['Servers'][$i]['extension'] = 'mysqli'; $cfg['Servers'][$i]['AllowNoPassword'] = true; $cfg['Lang'] = ''; です。
RT2

2019/10/17 07:04

エディタでのエラー内容はこうなります。 at line undefinedThe character encoding was not declared. Proceeding using “windows-1252”. <?php at line 1, character 2Saw “<?”. Probable cause: Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.) <?php at line 61, character 3End of file seen without seeing a doctype first. Expected “<!DOCTYPE html>”. ?> at line 61, character 3Element “head” is missing a required instance of child element “title”. ?>
guest

回答1

0

ベストアンサー

XAMPPでセキュリティの設定をするために検索している

ローカル環境なので、そもそも他人がアクセスできる時点で問題です。セキュリティ設定をしてもあまり意味はありません

セキュリティ設定をして開発環境が動かなくなるのでは本末転倒です。

投稿2019/10/17 07:14

maisumakun

総合スコア145183

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

RT2

2019/10/17 07:19

返信ありがとうございます。 すみません。理解不足なのですが、まずは文言を訂正したいと思います。 「XAMPPでセキュリティの設定をするために検索している」と書きましたが、XAMPPの設定をする中でセキュリティの話が出てきて、その設定をしている最中に行き詰っているのが現状です。 それでも、今いただいた答えに変わりはないでしょうか。
RT2

2019/10/24 00:11

ようやく意味が少しわかりました。 ありがとうございます。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問