I am posting this bug report under both Fscache and filestore2, as I am not sure which module has an issue.

I am using drupal 4.5.2, fscache (4.5.0) and filestore2 (4.5.0). After "uploading file" through the "create content" area, I try to read the file after it is submitted. The Adobe .pdf file cannot be viewed and I receive the message: "there was an error opening this document. The file cannot be found." I have checked the path to fscache and it is apparently correct. I have, to my knowledge properly installed both modules, including the database tables (I have verified the existence of these tables through phpMyAdmin). I have also verified the presence of the fscache directory under "misc."

In addition to these modules, I have the attachment module and filemanager module installed. The standard "upload" module is not enabled. I have confirmed that filestore2 doesn't work even with these other modules uninstalled.

Any ideas???

Comments

gordon’s picture

Version: » 4.5.x-1.x-dev

Check that the permissions on the files is correct. be sure that the web server user can access the file.

gordon’s picture

Version: 4.5.x-1.x-dev »
Priority: Critical » Normal
wedge’s picture

I had a similar problem to this. I was running with php5 and it seemed like an error message (array_merge problem) was sent with the datastream to the client so the file was corrupted. What I did was to change a function in the filestore2 module (added the may_cache bit). Perhaps this will work for you as well. Replace the filestore2_menu function with the one below.

function filestore2_menu($may_cache) {
  $items = array();

  if ($may_cache) {
    $items[] = array('path' => 'node/add/filestore2', 'title' => t('upload file'),
      'callback' => 'node_page',
      'access' => user_access("upload files"),
      'type' => MENU_NORMAL_ITEM);
    $items[] = array('path' => 'filestore2', 'title' => t('Browse files to download'),
      'callback' => 'filestore2_page',
      'access' => user_access("access files"),
      'type' => MENU_CALLBACK);
    $items[] = array('path' => 'filestore2/download', 'title' => t('Browse files to download'),
      'callback' => 'filestore2_page',
      'access' => user_access("access content"),
      'type' => MENU_CALLBACK);
    $items[] = array('path' => 'admin/settings/filestore/convert', 'title' => t('convert'),
      'callback' => 'filestore2_convert',
      'access' => module_exist("filestore") && user_access("access administration pages"),
      'type' => MENU_LOCAL_TASK);
  }

  return $items;
}
gordon’s picture

Can you please provide a patch.