appstract / laravel-opcache

Laravel Package for OPcache
MIT License
1.33k stars 118 forks source link

ErrorException : Undefined property: stdClass::$interned_strings_usage #73

Closed toomelette closed 5 years ago

toomelette commented 5 years ago

I dont know if this is an issue, but I just wanna report this for help . I tried running the command php artisan opcache:status to get the statistical status of opcache, the stats are showing but theres an error that shows below .

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
bigbgh commented 5 years ago

We are also getting this error on production. Works fine when we test on local. Any update? Found this https://stackoverflow.com/questions/52471736/theres-an-error-trying-to-show-status-of-opcache-laravel-and-appstract-laravel

[edit] We have found that php version is different between local and prod. Updating and will see what happens.

bigbgh commented 5 years ago

From the PHP change logs:

7.1.14 Opcache: Fixed bug #75579 (Interned strings buffer overflow may cause crash). 7.1.13 Opcache: Fixed bug #75579 (Interned strings buffer overflow may cause crash).

Opcache running on an older version of php than these runs fine. Trying to run on a new version than the above mentioned gives the error.

ovanschie commented 5 years ago

Fixed in new version