phpfastcache: Randomly getting the phpFastCacheIOException
Configuration
- PhpFastCache version: 6.0.2
- PhpFastCache API version: 1.2.5
- PHP version: PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS )
- Operating system: Ubuntu 16.04
I am using this since more than a year, and getting such permission exception once in a month or so. It is completely random behavior and has no specific steps to duplicate it. Can anyone help with that?
I have checked the CacheManager class and the default setting is
'default_chmod' => 0777,
here are my doubts
- Should I use the
"autoTmpFallback" = truein settings? - If this is write permission issue, then it should trigger exception on every try of writing content to directory. so can anyone help me find the exact issue?
here is the detailed log of the exception message.
Fatal error: Uncaught phpFastCache\Exceptions\phpFastCacheIOException: PLEASE CHMOD /tmp/beta/Auto/Files/73/74 - 511 OR ANY WRITABLE PERMISSION! in /var/www/html/beta/web_services/vendor/phpfastcache/phpfastcache/src/phpFastCache/Core/Pool/IO/IOHelperTrait.php:157
Stack trace:
#0 /var/www/html/beta/web_services/vendor/phpfastcache/phpfastcache/src/phpFastCache/Drivers/Files/Driver.php(72): phpFastCache\Drivers\Files\Driver->getFilePath('all_types')
#1 var/www/html/beta/web_services/vendor/phpfastcache/phpfastcache/src/phpFastCache/Core/Pool/CacheItemPoolTrait.php(353): phpFastCache\Drivers\Files\Driver->driverWrite(Object(phpFastCache\Drivers\Files\Item))
#2 /var/www/html/beta/web_services/vendor/phpfastcache/phpfastcache/src/phpFastCache/Helper/Psr16Adapter.php(84): phpFastCache\Drivers\Files\Driver->save(Object(phpFastCache\Drivers\Files\Item))
#3 /var/www/html/beta/web_services/_HELPER.php(1257): phpFastCache\Helper\Psr16Adapter->set('all_types', Array, 1200)
#4 /var/www/html/beta/web_services/service.php(417): HELPER in /var/www/html/beta/web_services/vendor/phpfastcache/phpfastcache/src/phpFastCache/Core/Pool/IO/IOHelperTrait.php on line 157
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (17 by maintainers)
Commits related to this issue
- Preventive hotfix for #614 — committed to Geolim4/phpfastcache by Geolim4 6 years ago
- Preventive hotfix for #614 — committed to Geolim4/phpfastcache by Geolim4 6 years ago
- Preventive hotfix for #614 — committed to Geolim4/phpfastcache by Geolim4 6 years ago
- Preventive hotfix for #614 (Directory Util) — committed to Geolim4/phpfastcache by Geolim4 6 years ago
- Merge pull request #615 from Geolim4/v6 Preventive hotfix for #614 — committed to PHPSocialNetwork/phpfastcache by Geolim4 6 years ago
- Merge pull request #616 from Geolim4/master Preventive hotfix for #614 — committed to PHPSocialNetwork/phpfastcache by Geolim4 6 years ago
The same issue I encountered was resolved by specifying the proper host-allowed cache directory path. I specified the path as “/home/yourusername/domains/yourdomain.com/public_html/yourproject/data/cache” where I’m using DirectAdmin as the host for the control panel, and this problem is now fixed. ✅
I got the same issue in version 8.1.2 The directory /tmp/phpfastcache/cli/Files could not be created. {“exception”:"[object] (Phpfastcache\Exceptions\PhpfastcacheIOException(code: 0):
Aaah, I see. Good catch buddy. Let me update it under /web_services and I will get back to you if needed.
Thank you
Here you go: https://github.com/PHPSocialNetwork/phpfastcache/releases/tag/6.1.3