DrupalPrivateStreamWrapper::stream_open" call failed

Опубликовано Ksenia-Polo - сб, 05/25/2019 - 13:56

Ошибка
"Warning: file_put_contents(private:///.htaccess) [function.file-put-contents]: failed to open stream: "DrupalPrivateStreamWrapper::stream_open" call failed в функции file_create_htaccess() (строка 496 в файле /home/u13534/domains/tablica-umnozheniya.ru/includes/file.inc)."

В файле

"// Write the .htaccess file.
if (file_put_contents($htaccess_path, $htaccess_lines)) {
drupal_chmod($htaccess_path, 0444);
}
else {
$variables = array('%directory' => $directory, '!htaccess' => '
' . nl2br(check_plain($htaccess_lines)));
watchdog('security', "Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines: !htaccess", $variables, WATCHDOG_ERROR);
}
}"

Для приватных файлов был указан путь sites/my_..., но он не существовал на сервере и поэтому была ошибка с невозможностью создать файл .htaccess. После создания каталога sites/my_.... ошибка ушла.