大家好。这是我第一次在php中使用opcache,因为我使用Laravel作为我的框架,所以我使用composer安装了appstract/laravel-opcache包。这就是错误,我尝试运行命令php artisan opcache:status来获取opcache的统计状态,统计数据正在显示,但下面显示了一个错误。
General:
+---------------------+-------+
| key | value |
+---------------------+-------+
| opcache_enabled | 1 |
| cache_full | |
| restart_pending | |
| restart_in_progress | |
+---------------------+-------+
Memory usage:
+---------------------------+-----------+
| key | value |
+---------------------------+-----------+
| used_memory | 7.72 MB |
| free_memory | 504.28 MB |
| wasted_memory | 0.00 MB |
| current_wasted_percentage | 0 |
+---------------------------+-----------+
Interned strings usage:
ErrorException : Undefined property: stdClass::$interned_strings_usage
at E:\XAMPP\htdocs\SWEP\vendor\appstract\laravel-opcache\src\Commands\Status.php:64
60| $this->line(PHP_EOL.'Memory usage:');
61| $this->table(['key', 'value'], $this->parseTable($data->memory_usage));
62|
63| $this->line(PHP_EOL.'Interned strings usage:');
> 64| $this->table(['key', 'value'], $this->parseTable($data->interned_strings_usag
e));
65|
66| $this->line(PHP_EOL.'Statistics:');
67| $this->table(['option', 'value'], $this->parseTable($data->opcache_statistics
));
68| }
Exception trace:
1 Illuminate\Foundation\Bootstrap\HandleExceptions::handleError("Undefined property: stdC
lass::$interned_strings_usage", "E:\XAMPP\htdocs\SWEP\vendor\appstract\laravel-opcache\src\Co
mmands\Status.php", [Object(stdClass)])
E:\XAMPP\htdocs\SWEP\vendor\appstract\laravel-opcache\src\Commands\Status.php:64
2 Appstract\Opcache\Commands\Status::displayTables(Object(stdClass))
E:\XAMPP\htdocs\SWEP\vendor\appstract\laravel-opcache\src\Commands\Status.php:38有人能给我解释一下为什么会这样吗??提前感谢您的回复!
发布于 2018-10-30 13:53:32
这是appstract/laravel-opcache中报告的问题
2019年6月23日更新:此问题已由包维护者修复。https://github.com/appstract/laravel-opcache/issues/73#issuecomment-504701864
https://stackoverflow.com/questions/52471736
复制相似问题