Hi there, I'm setting up again the file framework that once worked for me in ubuntu 8.10, now on debian squeeze I got the next error when uploading a file, either by attaching it to a page or by creating a file:

warning: Parameter 3 to bitcache_bitcache() expected to be a reference, value given in .../includes/module.inc on line 497.

Any idea of how to solve this and be able to upload files?

Thanks for your help.

Comments

johanneshahn’s picture

Hi
u are using php 5.3.x and bitcache 6.x-1.x ?

andrés chandía’s picture

PHP 5.3.3-7+squeeze8
Bitcache 6.x-1.x-dev

johanneshahn’s picture

ok,
goto sites/all/modules/bitcache/bitcache.module
and remove the &sign in function call near line 319

from

function bitcache_bitcache($op, $id, &$stream = NULL) {

to:

function bitcache_bitcache($op, $id, $stream = NULL) {
andrés chandía’s picture

Ok, done, the error message is gone, but I got this now:

Error saving file file.gif. Please, contact site administrator.

and gif is accepted at the file upload config.

johanneshahn’s picture

hi,
do u mean here admin/settings/file/restriction ?

andrés chandía’s picture

yes, there and here: admin/settings/uploads

johanneshahn’s picture

hi,
u made a error with using normal file upload module.
goto admin/build/modules and uninstall Core -> Upload Module.

fileframework comes with his own upload module.

andrés chandía’s picture

Done, but still the same:
Error saving file file.gif. Please, contact site administrator.

johanneshahn’s picture

hi Andrés,
to fix that issue, i need more background info from u.

1. what kind of file content type do u use?
- normal file content type
- content type with file attachement
- content type with cck field

2. do u installed the file restriction module?
3. do u have some log entries in admin/reports/dblog?

andrés chandía’s picture

Thanks for your support:
Question 1, I'm not sure about the answer but I think is cck content type, how can I confirm it?
Question 2, no.
Question 3,
type: php | reference: admin/settings/file | message: strtr(): The second argument is not an array a .../modules/syslog/syslog.module a la línia 112.

type: file | reference: node/add/file | message: The RDF data was not deleted for the subject s=bitcache://41e98a18f51cd4b4d2b757d501d71039efe2ac02.

and at the top of the page I got this:
warning: Invalid argument supplied for foreach() in .../includes/common.inc on line 959.
warning: strtr(): The second argument is not an array in .../includes/common.inc on line 976.
warning: Invalid argument supplied for foreach() in .../includes/common.inc on line 959.
warning: strtr(): The second argument is not an array in .../includes/common.inc on line 976.

Thanks again.

johanneshahn’s picture

hi,
ok i have checked several settings, but i cannot
reproduce this error the string "Error saving file ... Please, contact site administrator"
is only located in these files

./sites/all/modules/fileframework/contrib/mailsave/file_mailsave.module
./sites/all/modules/fileframework/contrib/attach/file_attach.module
./sites/all/modules/fileframework/contrib/cck/file_cck.module
./sites/all/modules/fileframework/file.module

so do you have created a custom node type and add a field file to it?
-> this will be cck

or u create this new node via /node/add/file?

i think second part because in your error log it is called "file | reference: node/add/file"
to debug this u have to add code into file.module near line 626, 627 and watch contents of variables $node_new
and $upload

if (!file_node_save($node_new, $upload)) {
      var_dump($node_new);//add this to debug incoming variables
      var_dump($upload);//add this to debug incoming variables
      drupal_set_message(t("Error saving file %file. Please, contact site administrator.", array('%file' => $upload->filename)), 'error');
    }

really strange error

andrés chandía’s picture

Yes, you are right, /node/add/file is the way I do.
Anyway, if I create a basic page and I try to upload it a file, it gives me the same error.

And after adding your debuging code I can not see the web anymore, even taking the code off, I still can not see the pages, I mean everything is in blank pages.

What now?..... It is not difficult for me to reinstall it, because it is a brand new site, the only user was me (admin).

andrés chandía’s picture

If it helps, these are the modules I have installed:
admin_menu
bitcache
cck
fckeditor
fileframework
getid3
node_clone
rdf
soundmanager2
tokenviews
audio (not activated)
captcha
dav
filefield
fileserver
jquery_update
pathauto
smtp
swftools
video (not activated)

johanneshahn’s picture

ok good,
then just start from a clean install.

1. dont install any module just activate the core "Upload" Module.
then try to upload a gif.

2. if u can upload and save it uninstall core "Upload" Module.

3. install rdf (dev), bitcache (dev) & fileframwork (def),
for fileframework just install File management > File & File Formats > Image

4. then try to create a new node node/add/file and upload your gif.

5. if u can upload it install your modules step by step and test upload gif
after each install. think u can install admin_menu, cck without problems

first try these steps

andrés chandía’s picture

1. dont install any module just activate the core "Upload" Module.
then try to upload a gif.

Worked fine

2. if u can upload and save it uninstall core "Upload" Module.

Done

3. install rdf (dev), bitcache (dev) & fileframwork (def),
for fileframework just install File management > File & File Formats > Image

At this point, after activating only the modules you mention, and then saving, the blank page come over.
So I downloaded File Framework Module again and all become well, it seems like the module were corrupt at some point.

4. then try to create a new node node/add/file and upload your gif.

Yohoo, it worked out!

5. if u can upload it install your modules step by step and test upload gif
after each install. think u can install admin_menu, cck without problems

first try these steps

Activation Steps
Activating all the file formats: It works!
Activating all the file management moduls, which activate cck and views (and enabling clamscan): It works!
Activating Administration menu: It works!
Activating Clone module, FCKeditor, getID3(), Pathauto, Token, Token actions, TokenSTARTER, Path: It works!
Activating from cck module: Content Copy, Content Permissions, Fieldgroup, FileField, FileField Meta, Node Reference, Number, Option Widgets, Sound Manager 2 playlist CCK formatter, Text, User Reference, SoundManager 2: It works!
Activating Contact, Content translation, Search, Tracker, Trigger, Profile, Statistics, Syslog: It works!
Activating SMTP Authentication Support, and all Swift tools modules except for the Upload Integration: It works!
Activating CAPTCHA, Image CAPTCHA, Views exporter, Views UI: It works!

Configuration Steps
Configuring File system backend: DAV file system root: it works!
Enabling DAV Server: It works!
Enabling html highlighting for text files: it works!
Enabling file formats: it works!
Setting the File Taxonomy Server: it works!

Thanks a lot, you are my new hero, my guru!

johanneshahn’s picture

Status: Active » Closed (fixed)

no prob ;)
issue fixed

andrés chandía’s picture

Now I got some more stuffs, but probably I should open a new thread, things about files conversion and playing videos or sounds; anyway I see there is some more people that have post these issues, so I'll first take a look at those and if I can not make it roll I will open a new one.
Thanks again.

andrés chandía’s picture

Sorry for reopening,
As I started to have problems with videos I tried reinstallation, but now I'm stucked on this same problem again, I can not upload files, I mean when I create a File the node is created but the attached file is not saved:

Error saving file file.wmv. Please, contact site administrator.

no matter what kind of file I try is always the same.

I've reinstalled and tested all the steps suggested in this thread but nothing.

Please some help again!