Closed
Description
Configuration
- PhpFastCache version: "8.0 (via
composer require
) - PhpFastCache API version: 3.0.0.
- PHP version: 7.4.12
- Operating system: Linux 4.9.207 (Debian 9)
Describe the bug
Freshly installed phpfastcache via composer, attempting to use an unmodified (sans require path) leveldb
example produces the error:
[Sun Nov 07 15:22:56.106595 2021] [fcgid:warn] [pid 3096559:tid 140172737914624] [client 108.253.163.97:65297] mod_fcgid: stderr: PHP Fatal error: Uncaught Phpfastcache\\Exceptions\\PhpfastcacheInvalidConfigurationException: Invalid type hint found for "htaccess", expected "string" got "boolean" in /path/to/www/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOption.php:144
[Sun Nov 07 15:22:56.106744 2021] [fcgid:warn] [pid 3096559:tid 140172737914624] [client 108.253.163.97:65297] mod_fcgid: stderr: Stack trace:
[Sun Nov 07 15:22:56.106773 2021] [fcgid:warn] [pid 3096559:tid 140172737914624] [client 108.253.163.97:65297] mod_fcgid: stderr: #0 /path/to/www/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/CacheManager.php(189): Phpfastcache\\Config\\ConfigurationOption->__construct(Array)
[Sun Nov 07 15:22:56.106796 2021] [fcgid:warn] [pid 3096559:tid 140172737914624] [client 108.253.163.97:65297] mod_fcgid: stderr: #1 /path/to/www/index.php(30): Phpfastcache\\CacheManager::getInstance('Leveldb')
[Sun Nov 07 15:22:56.106816 2021] [fcgid:warn] [pid 3096559:tid 140172737914624] [client 108.253.163.97:65297] mod_fcgid: stderr: #2 {main}
[Sun Nov 07 15:22:56.106834 2021] [fcgid:warn] [pid 3096559:tid 140172737914624] [client 108.253.163.97:65297] mod_fcgid: stderr: thrown in /path/to/www/vendor/phpfastcache/phpfastcache/lib/Phpfastcache/Config/ConfigurationOption.php on line 144
To Reproduce
Steps to reproduce the behavior:
- Create a new directory on a publicly accessible website.
- In that directory,
composer require phpfastcache/phpfastcache
(respond 'n' if asked to use a parent directorycomposer.json
) - Create
index.php
with the contents ofdocs/examples/leveldb.php
.
3.a. Modifyindex.php
to adjust the include path to point to thevendor
folder composer created. - Access that directory through a web browser.
- Observe 500 error.
- View server error logs, observe error similar to one shown above.
Expected behavior
The leveldb
example to run.
Screenshots
N/A
Additional context
I'm not sure if this is something fixed in v9. I'm not on PHP 8 yet, so I can't try the newer version.