', addslashes($reactivate_url)); w3_activate_error(sprintf(__('%s
then %s.', 'w3-total-cache'), $e->getMessage(), $reactivate_button)); } /** * W3 error on read * * @param string $path * @throws FileOperationException */ function w3_throw_on_read_error($path) { w3_require_once(W3TC_INC_DIR . '/functions/file.php'); if (w3_check_open_basedir($path)) { $error = sprintf(__('%s could not be read, please run following command:
chmod 777 %s', 'w3-total-cache'), $path, (file_exists($path) ? $path : dirname($path))); } else { $error = sprintf(__('%s could not be read, open_basedir restriction in effect, please check your php.ini settings:
open_basedir = "%s"', 'w3-total-cache'), $path, ini_get('open_basedir')); } throw new FileOperationException($error, 'read', 'file', $path); } /** * W3 writable error * * @param string $path * @param string[] $chmod_dirs Directories that should be chmod 777 inorder to write * @throws FileOperationException */ function w3_throw_on_write_error($path, $chmod_dirs = array()) { w3_require_once(W3TC_INC_DIR . '/functions/file.php'); $chmods = ''; if ($chmod_dirs) { $chmods = '