Cache Location does not escape special characters
-
For some webhosts activating Super Cache will break the site due to unescaped special characters in the default cache location.
In my case WP_CONTENT_DIR is an url, so the default cache location is one as well. This results in the following error as soon as the plugin is activated, even if the cache itself is still disabled:
PHP Warning: include(\HP3-WINC2-SMB1.HOSTINGP3.LOCAL\DOMAINSW\085\2467085\user\htdocs\wp-content\plugins\wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in \\HP3-WINC2-SMB1.HOSTINGP3.LOCAL\DOMAINSW\085\2467085\user\htdocs\wp-content\plugins\wp-super-cache\wp-cache.php on line 95 PHP Warning: include(): Failed opening '\HP3-WINC2-SMB1.HOSTINGP3.LOCAL\DOMAINSW\085\2467085\user\htdocs\wp-content\plugins\wp-super-cache/wp-cache-base.php' for inclusion (include_path='.;C:\php\pear') in \\HP3-WINC2-SMB1.HOSTINGP3.LOCAL\DOMAINSW\085\2467085\user\htdocs\wp-content\plugins\wp-super-cache\wp-cache.php on line 95 PHP Warning: include_once(\HP3-WINC2-SMB1.HOSTINGP3.LOCAL\DOMAINSW\085\2467085\user\htdocs\wp-content\plugins\wp-super-cache/ossdl-cdn.php): failed to open stream: No such file or directory in \\HP3-WINC2-SMB1.HOSTINGP3.LOCAL\DOMAINSW\085\2467085\user\htdocs\wp-content\plugins\wp-super-cache\wp-cache.php on line 119 PHP Warning: include_once(): Failed opening '\HP3-WINC2-SMB1.HOSTINGP3.LOCAL\DOMAINSW\085\2467085\user\htdocs\wp-content\plugins\wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.;C:\php\pear') in \\HP3-WINC2-SMB1.HOSTINGP3.LOCAL\DOMAINSW\085\2467085\user\htdocs\wp-content\plugins\wp-super-cache\wp-cache.php on line 119I’ve managed to resolve this by manually editing the wp-config.php file and adjusting WPCACHEHOME. However if I was to ever move the cache to a different folder then I would need to manually adjust it again.
The topic ‘Cache Location does not escape special characters’ is closed to new replies.