Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updating bootstrap.php with checks for PHP_SAPI. Removing the check f…

…rom cache.php.
  • Loading branch information...
commit ca22f776849108bb451f5e607f83426a12beaf22 1 parent 321fe4d
GWoo authored
9 app/config/bootstrap.php
@@ -42,7 +42,9 @@
42 42 * This file contains configurations for connecting to external caching resources, as well as
43 43 * default caching rules for various systems within your application
44 44 */
45   -require __DIR__ . '/bootstrap/cache.php';
  45 +if (PHP_SAPI !== 'cli') {
  46 + require __DIR__ . '/bootstrap/cache.php';
  47 +}
46 48
47 49 /**
48 50 * Include this file if your application uses one or more database connections.
@@ -78,7 +80,8 @@
78 80 /**
79 81 * This file configures console filters and settings, specifically output behavior and coloring.
80 82 */
81   -// require __DIR__ . '/bootstrap/console.php';
82   -
  83 +if (PHP_SAPI === 'cli') {
  84 + require __DIR__ . '/bootstrap/console.php';
  85 +}
83 86
84 87 ?>
6 app/config/bootstrap/cache.php
@@ -16,10 +16,6 @@
16 16 use lithium\action\Dispatcher;
17 17 use lithium\storage\cache\adapter\Apc;
18 18
19   -if (PHP_SAPI === 'cli') {
20   - return;
21   -}
22   -
23 19 /**
24 20 * If APC is not available and the cache directory is not writeable, bail out. This block should be
25 21 * removed post-install, and the cache should be configured with the adapter you plan to use.
@@ -43,7 +39,7 @@
43 39 Cache::config(compact('default'));
44 40
45 41 /**
46   - * Caches paths for auto-loaded and service-located classes.
  42 + * Caches paths for auto-loaded and service-located classes when in production.
47 43 */
48 44 Dispatcher::applyFilter('run', function($self, $params, $chain) {
49 45 if (!Environment::get('production')) {

0 comments on commit ca22f77

Please sign in to comment.
Something went wrong with that request. Please try again.