This error appears to users without "administer webfm" privileges (but with "webfm upload" privileges) when trying to upload a file. The error first appeared after upgrading from version 6.x-2.12 to version 6.x-2.15. It did not appear in version 6.x-2.12. Users with "administer webfm" privileges can still perform an upload.

CommentFileSizeAuthor
#12 webfm-finfo-fopen-1094890.patch536 bytesfilsterjisah

Comments

ale_89’s picture

I can confirm this exactly as described above.
(at least the rollback works fine)

nhck’s picture

Thank you for reporting this and helping to make webfm better.
Can you please provide more information on which version of php and drupal you are using?

Thank you.

RandyT’s picture

I can actually confirm this behavior just running cron on D6.

Running PHP5.3

nhck’s picture

Version: 6.x-2.15 » 6.x-2.16-rc1
RandyT’s picture

This seems to have fixed the problem, however, I have some general permission problems or maybe lack of understanding of how this should work. I'll contact you directly so as not to muddy this thread.

KeDeWo’s picture

Thanks for the quick reply. I installed the RC and I'm now waiting for feedback from the users.

FYI: running drupal 6.20 and PHP 5.3.2-1ubuntu4.7

KeDeWo’s picture

It works fine! Thanks again.

roball’s picture

Priority: Major » Critical
Status: Active » Reviewed & tested by the community

I had exactly the same problem with webfm 6.x-2.15 since I have upgraded PHP to 5.3.x recently (it worked fine with PHP 5.2.x). Upgrading webfm to 6.x-2.16-rc1 solved the problem.

Since this is really a critical error with PHP 5.3, I think this version should be released as the official one asap. Thanks.

nhck’s picture

Version: 6.x-2.16-rc1 » 6.x-2.x-dev
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

roball’s picture

No official release planned soon with this critical fix?

filsterjisah’s picture

Assigned: Unassigned » filsterjisah
Status: Closed (fixed) » Needs review
StatusFileSize
new536 bytes

http://php.net/manual/en/function.finfo-open.php, scroll to first examples #1 & #2. The problem in webfm is it mixes both "Object oriented style" and "Procedural style", instead of just using one style. Patch added

nhck’s picture

Status: Needs review » Postponed (maintainer needs more info)

This is already fixed in the dev version? What is the advantage of your patch?
The problem at the time was an error in the php docs I believe ~ or a misunderstanding in reading it It was believed that finfo_open would return an object which it doesnt.

filsterjisah’s picture

I've added this patch for people who are using the stable version (6.x-2.16) of webfm.

roball’s picture

filster007: the bug was fixed in 6.x-2.16-rc1 and also in 6.x-2.16 which was released yesterday.

With 2.16, I am only getting

in_array() expects parameter 2 to be array, boolean given in /etc/drupal6/all/modules/webfm/webfm.module on line 511.

but this seems to be unrelated to the problem reported and fixed here.

nhck’s picture

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Active

roball ~ its not related - at 511 a check needs to be added for i18nsync, will do that tomorrow.

nhck’s picture

filster007 - and thank you for filing patches! Its just.. you always need to patch against the master version from git :-/

nhck’s picture

Assigned: filsterjisah » Unassigned
Status: Active » Needs review

roball, I added a change for you to the development version, maybe you can check if it works better.

roball’s picture

Thank you nhck for the quick fix! I will test it when time allows.

filsterjisah’s picture

I'll try to get git working on my windows machine (currently created svn patches)... and then i'll patch against master version :)

nhck’s picture

Status: Needs review » Closed (fixed)