LoginSignup
1
1

More than 5 years have passed since last update.

Windows10にdrupalをセットアップする

Posted at

drupalのサブディレクトリの設定で少しはまったのでメモ

※サブディレクトリを指定しなければ、「5. サブディレクトリの設定」は必要なく正しく表示されます。

環境


  • xampp環境設定済み
  • windows10
  • DB名はdrupal
  • PHP5.6.30

1. drupalのダウンロード


https://www.drupal.org/ の 「Download & Extend」ページからダウンロードする(2018/3/21時点では8.5.0)

2. ダウンロードしたファイルの設置


3. drupalの設定ファイルの作成


以下のディレクトリのdefault.settings.phpをコピーし、settings.phpにファイル名を変更する

drupal\sites\default\settings.php

4. drupalのインストール


http://localhost/cms/drupal にアクセスし画面の指示通りに進めていく

  • 日本語を選択
  • 標準を選択
  • 見つかった警告 
    • → いくつか警告がでたが今は無視して「とりあえず進むを選択」
  • データベースの接続設定

→ インストールが開始される

5. サブディレクトリの設定


インストールが完了したので http://localhost/cms/drupal を確認するとデザインが崩れていたり、リンクが機能していなかったりと以下のような画面になってしまった。

image.png

▼ 以下の設定をするとサブディレクトリの設定が出来る

RewriteBaseを有効にする。

drupal/.htaccess
# RewriteBase /drupal
RewriteBase /cms/drupal

6.動作確認

これで以下のページが見れるようになった

7.おまけ(見つかった警告について)

「4. インストール」で無視した警告内容について

  • PHP

5.6.30
Drupal will drop support for this version on March 6, 2019. Upgrade to PHP version 7.1 or higher to ensure your site can receive updates and remain secure. See PHP's version support documentation and the Drupal 8 PHP requirements handbook page for more information.

→ 2019年3月6日にPHP5.6系のサポートが中止されるのでPHP7.1以上にアップグレードしてくださいとのこと

  • PHP OPCODEのキャッシング

無効
PHP OPcode キャッシングはサイトのパフォーマンスを大幅に改善します。OPcache がサーバーにインストールされていることをお勧めします。

  • LIMITED DATE RANGE

Your PHP installation has a limited date range.
You are running on a system where PHP is compiled or limited to using 32-bit integers. This will limit the range of dates and timestamps to the years 1901-2038. Read about the limitations of 32-bit PHP.

→ 要するに2038年問題があるので64bitにすると解決しますとのこと

開発環境もどんどん最新化していかないとなぁ...

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