Active
Project:
FeedAPI
Version:
6.x-1.x-dev
Component:
Code parser_common
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Feb 2010 at 21:27 UTC
Updated:
23 Aug 2010 at 19:14 UTC
It took me some time to debug it the errors I got when trying to save a feed. logging it here for the records:
# warning: fopen(/c7add89e4e38ae2bc5ac48059c4907bb) [function.fopen]: failed to open stream: Permission denied in .../sites/all/modules/feedapi/parser_common_syndication/parser_common_syndication.inc on line 69.
# warning: fwrite(): supplied argument is not a valid stream resource in .../sites/all/modules/feedapi/parser_common_syndication/parser_common_syndication.inc on line 70.
# warning: fclose(): supplied argument is not a valid stream resource in .../sites/all/modules/feedapi/parser_common_syndication/parser_common_syndication.inc on line 71.
It comes the from following function:
function _parser_common_syndication_sanitize_cache() {
$cache_location = file_directory_path() .'/parser_common_syndication_cache';
if (!is_writeable($cache_location) || !is_dir($cache_location)) {
$cache_location = file_create_path($cache_location);
if (!file_exists($cache_location) && is_writable(file_directory_path())) {
mkdir($cache_location);
}
if (!is_writeable($cache_location)) {
return FALSE;
}
}
return $cache_location;
}
in my case, the directory sites/madrc/files/parser_common_syndication_cache existed, but the cache path parser_common_syndication_cache/c7add89e4e38ae2bc5ac48059c4907bbwas not writeable, so the function above returned FALSE. Instead it should either throw an drupal_message error or the callers should be able to deal with the case where FALSE is returned. Currently, it silently fails and Drupal tries to write to /c7add89e4e38ae2bc5ac48059c4907bb.
Comments
Comment #1
mikeytown2 commentedsubscribe