LoginSignup
15
17

More than 5 years have passed since last update.

EC-CUBE3のデバッグモードはパラメーターではなくURLだった

Posted at

結論)EC-CUBE3.0のデバッグモードはパラメーターではなくURL

2.13までのデバッグモードは、パラメーター管理からDEBUG_MODEをtrueにしてしまえば、簡単にデバッグモードになっていたが、EC-CUBE3ではどうするのか?

パラメーター管理はないので、app/config/eccube/とかにあるのかと思って探してしまいますよね?

実は、デバッグモードではなく、URLを変えることでデバッグモードになる!

デバッグモードのURL

URLに、index_dev.php を加えるとできるようです。

通常) http://example.com/products/detail/2
だとしたら
デバッグモード) http://example.com/index_dev.php/products/detail/2

とすることでデバッグモードでのアクセスになります。

IP制限もされている

このデバッグモード 安全のためにIP制限がされており、もしデバッグモードでのアクセスして

You are not allowed to access this file. Check index_dev.php for more information.

というようなエラーが表示された場合
自分がアクセスしているIPを

index_dev.php の$allow に自分のIPを追加すればOK

$allow = array(
    '127.0.0.1',
    'fe80::1',
    '::1',
    '追加するIP',
);

デバッグモードでアクセスすると

  • Twigのキャッシュの影響が受けない
  • Symfonyのデバッガーで実行されているSQLやログを見る事ができる

等、いろいろと出来そうです。

15
17
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
15
17