Commit d622442a by Carsten Brandt

improved debugger on handling unreadable files

issue #3494
parent e6f9e0a2
......@@ -19,6 +19,7 @@ Out of the box these tools allow you to:
All of this information will be available per request, allowing you to revisit the information for past requests as well.
Installing and configuring
--------------------------
......@@ -31,7 +32,8 @@ To enable these features, add these lines to your configuration file to enable t
]
```
By default, the debug module only works when browsing the website from localhost. If you want to use it on a remote (staging) server, add the parameter `allowedIPs` to the configuration to whitelist your IP:
By default, the debug module only works when browsing the website from localhost. If you want to use it on a remote (staging)
server, add the parameter `allowedIPs` to the configuration to whitelist your IP:
```php
'bootstrap' => ['debug'],
......@@ -55,6 +57,11 @@ If you are using `enableStrictParsing` URL manager option, add the following to
],
```
> Note: the debugger stores information about each request in the `@runtime/debug` directory. If you have problems using
> The debugger such as weird error messages when using it or the toolbar not showing up or not showing any requests, check
> whether the web server has enough permissions to access this directory and the files located inside.
### Extra configuration for logging and profiling
Logging and profiling are simple but powerful tools that may help you to understand the execution flow of both the
......@@ -84,6 +91,7 @@ defined('YII_DEBUG') or define('YII_DEBUG', true);
> Note: Make sure to disable debug mode in production environments since it may have a significant and adverse performance effect. Further, the debug mode may expose sensitive information to end users.
Creating your own panels
------------------------
......
......@@ -61,6 +61,7 @@ class Module extends \yii\base\Module implements BootstrapInterface
*/
public $enableDebugLogs = false;
/**
* Returns Yii logo ready to use in `<img src="`
*
......
......@@ -116,7 +116,7 @@ class DefaultController extends Controller
clearstatcache();
}
$indexFile = $this->module->dataPath . '/index.data';
if (is_file($indexFile)) {
if (is_file($indexFile) && is_readable($indexFile)) {
$this->_manifest = array_reverse(unserialize(file_get_contents($indexFile)), true);
} else {
$this->_manifest = [];
......
......@@ -576,7 +576,7 @@ class QueryBuilder extends \yii\base\Object
* For example, 'string NOT NULL' is converted to 'varchar(255) NOT NULL'.
*
* For some of the abstract types you can also specify a length or precision constraint
* by prepending it in round brackets directly to the type.
* by appending it in round brackets directly to the type.
* For example `string(32)` will be converted into "varchar(32)" on a MySQL database.
* If the underlying DBMS does not support these kind of constraints for a type it will
* be ignored.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment