Download & Extend

warning: fopen(sites/default/files/ibstyles.css) [function.fopen]: failed to open stream: No such file or directory in imagebrow

Project:Image Browser
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

warning: fopen(sites/default/files/ibstyles.css) [function.fopen]: failed to open stream: No such file or directory in .../imagebrowser/imagebrowser.module on line 987.

=> Suppose it has something to do with updating Drupal 6.17 to 6.19, as it happened after this update with an almost blank website screen mentioning: "can't open file"..?

Comments

#1

Removing the imagebrowser folder (or renaming with a "." in front for my server config) 'resolves' the problem..!

So now removing it completely through: ".../admin/build/modules/uninstall"

=> there is nothing to de-install (probably wasn't ticked on)

OK, uploaded the same file again and site works now without problem...

#2

Just ran into problem. It's caused by the "or die" statement:

<?php
  $css
= file_directory_path() . "/ibstyles.css";
 
$file = fopen($css, 'w') or die("can't open file");
?>

The "or die" kills the entire Drupal stack if the "files" directory doesn't exist.

"or die" should be replaced with logic to call drupal_set_message with status="error".