PeeHaa / OpCacheGUI

GUI for PHP's OpCache
1.46k stars 170 forks source link

Call to undefined function OpCacheGUI\\Security\\random_bytes() on PHP 5.6 #107

Closed ravhirizaldi closed 1 year ago

ravhirizaldi commented 3 years ago

Trying to access the application on PHP 5.6 but only show text like "Status, Enabled, Cache Full, etc". Here's my config :

return [
    'username'        => '',
    'password'        => '',
    'whitelist'       => [
        '172.20.30.*',
        '172.10.10.*',
        'localhost'
    ],
    'language'        => 'en',
    'timezone'        => 'Asia/Jakarta',
    'error_reporting' => E_ALL,
    'display_errors'  => 'On',
    'log_errors'      => 'On',
    'uri_scheme'      => Router::QUERY_STRING
];

This is the log from httpd :

[Sun Jun 20 21:19:48.497785 2021] [:error] [pid 22472] [client 172.10.10.20:59491] PHP Fatal error: Call to undefined function OpCacheGUI\\Security\\random_bytes() in /var/www/html/OpCacheGUI/src/OpCacheGUI/Security/CsrfToken.php on line 82

Is I'am missing something? This app run perfectly on PHP 7.4.

Erwane commented 2 years ago

Master branch is for php 7 For php5.6 use this commit : https://github.com/PeeHaa/OpCacheGUI/tree/bf8451f7e3246bb095aef0620531fe55d438481c and tarball : https://github.com/PeeHaa/OpCacheGUI/archive/bf8451f7e3246bb095aef0620531fe55d438481c.tar.gz

ekinhbayar commented 1 year ago

Correct. The minimum php version is ^7 in composer.json, closing this as it has been answered.