Open_basedir on Windows on Saving Menu
-
Problem is reproduced by using Save from within Appearance – Menus function on a Windows system.
The problem occurs in 2 PHP functions in WpFastestCache.php (delete_cache_of_term and rm_folder_recursively) on saving Menu changes for sites hosted on Windows system.
The issue is caused by the question mark embedded in the directory path as in the following example…
D:\Home\ApacheRoot\dfprof\httpdocs\wp-content/cache/all/?taxonomy=nav_menu&term=direct-xxxx-main-menu/page
The use of is_dir or file_exists on these path names generates an invalid file/open_basedir error.
My (temporary) solution was to modify the code to test for ? in the path name and bypass this part of the code.
A better, robust and more permanent handling of invalid characters in a file name needs to added to this routines. (I am fairly sure that this will fail on Linux, but the error will occur silently in this case).
- The topic ‘Open_basedir on Windows on Saving Menu’ is closed to new replies.