You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently PDP is being instantiated with default cache settings which is causing it to try to use the vendor folder as a cache directory. As it is generally best practice for the vendor folder to not be writable by the PHP user (other than during the installation process) this causes some issues when the vendor folder isn't writable. Specifically:
2021-02-02 11:17:34 [-][8596][64d388c3db444aaed528eb691057f9b5][error][InvalidArgumentException] InvalidArgumentException: cache path does not exist or is not writable: /var/www/html/vendor/jeremykendall/php-domain-parser/data in /var/www/html/vendor/jeremykendall/php-domain-parser/src/Cache.php:94
The PDP Cache class accepts a cache path as a parameter:
Currently PDP is being instantiated with default cache settings which is causing it to try to use the vendor folder as a cache directory. As it is generally best practice for the vendor folder to not be writable by the PHP user (other than during the installation process) this causes some issues when the vendor folder isn't writable. Specifically:
The PDP Cache class accepts a cache path as a parameter:
https://github.com/jeremykendall/php-domain-parser/blob/00000757d769931e876f9f6607b93c3db3464616/src/Cache.php#L82
This could be set to Craft's runtime cache directory in order to avoid the issue, and also it just feels nicer:
https://github.com/workingconcept/cloudflare-craft-plugin/blob/2048e6ac7725d7162f32288db4be6cf10296780f/src/helpers/UrlHelper.php#L99
Thanks 💪
The text was updated successfully, but these errors were encountered: