[gollem] Gollem 3.0.0 RC1 issue

Brent impuser at bitrealm.com
Fri Jan 4 22:42:41 UTC 2013


> -----Original Message-----
> From: Jan Schneider
> Sent: Fri, Jan 04, 2013 at 11:14:42PM +0100
> To: Jan Schneider <jan at horde.org>
> Subject: Re: [gollem] Gollem 3.0.0 RC1 issue
> 
> 
> Zitat von Brent <impuser at bitrealm.com>:
> 
> >Quoting Jan Schneider <jan at horde.org>:
> >
> >>Zitat von Brent <impuser at bitrealm.com>:
> >>
> >>>Quoting Jan Schneider <jan at horde.org>:
> >>>
> >>>>Zitat von Brent <impuser at bitrealm.com>:
> >>>>
> >>>>>I have it set to use horde_auth and use vsftp.  I get
> >>>>>folders, but if I click on a file, I get:
> >>>>>
> >>>>>A fatal error has occurred
> >>>>>Unable to open VFS file.
> >>>>>
> >>>>>1. Horde_Vfs_Ftp->readStream() /var/www/html/horde-new/gollem/view.php:42
> >>>>>
> >>>>>
> >>>>>If I edit the view.php file and change line 42 from:
> >>>>>
> >>>>>$stream = $gollem_vfs->readStream($vars->dir, $vars->file);
> >>>>>
> >>>>>to this:
> >>>>>
> >>>>>$data = $gollem_vfs->read($vars->dir, $vars->file);
> >>>>>
> >>>>>It works.  It seems that the following if statement is
> >>>>>returning "true", and doesn't work if it is true on my
> >>>>>system:
> >>>>>
> >>>>>if (is_callable(array($gollem_vfs, 'readStream'))) {
> >>>>>
> >>>>>I have vfs defined as the sql database Horde, so I'm not
> >>>>>sure what is going on here.
> >>>>>
> >>>>>brent
> >>>>
> >>>>This doesn't make sense, first you say you use FTP, at the
> >>>>end you say you configured VFS to use SQL.
> >>>
> >>>Administration>Configuration>Horde>Virtual File Storage:  SQL
> >>>Database with Horde Defaults.
> >>>
> >>>I have no idea what in my configuration is using VFS as I don't
> >>>use virtual anything in Horde.  When I setup gollem, I was
> >>>getting the gollem_vfs error above, which I assume is related
> >>>to the Horde VFS Setting.  I am using vsftp for the gollem
> >>>backend, no idea why gollem is throwing an error that SEEMS to
> >>>be VFS related.
> >>
> >>Gollem uses the VFS library for everything backend related. You
> >>don't setup the backends in the Horde VFS configuration but in
> >>Gollem's backends(.local).php. Did you read backends.php?
> >
> >Of course.  I can actually remove backends.php entirely and I have the
> >following in my backends.local.php.  No reference to vfs and I've no
> >idea why gollem is trying to use it.
> >
> ><?php
> >
> >// This backend uses Horde credentials to automatically log in.
> >$backends['hordeftp'] = array(
> >    'disabled' => false,
> >    'name' => 'FTP Server',
> >    'driver' => 'ftp',
> >    'hordeauth' => true,
> >    'params' => array(
> >        'hostspec' => 'localhost',
> >        'port' => 21,
> >        'pasv' => false,
> >    ),
> >    'loginparams' => array(
> >    ),
> >    'attributes' => array(
> >        'type',
> >        'name',
> >        'edit',
> >        'download',
> >        'modified',
> >        'size',
> >        'permission',
> >        'owner',
> >        'group'
> >    )
> >);
> >
> >
> >That's it.  No reference to vfs or anything, yet I will get the vfs
> >error unless I modify the view.php as I mentioned above.  The full
> >error is:
> >
> >A fatal error has occurred
> >Unable to open VFS file.
> >
> >1. Horde_Vfs_Ftp->readStream() /var/www/html/horde-new/gollem/view.php:42
> >
> >Details
> >The full error message is logged in Horde's log file, and is shown
> >below only to administrators. Non-administrative users will not see
> >error details.
> >
> >Horde_Vfs_Exception Object
> >(
> >    [details] =>
> >    [logged] => 1
> >    [_logLevel:protected] => 0
> >    [message:protected] => Unable to open VFS file.
> >    [string:Exception:private] =>
> >    [code:protected] => 0
> >    [file:protected] => /usr/share/pear/Horde/Vfs/Ftp.php
> >    [line:protected] => 207
> >    [trace:Exception:private] => Array
> >        (
> >            [0] => Array
> >                (
> >                    [file] => /var/www/html/horde-new/gollem/view.php
> >                    [line] => 42
> >                    [function] => readStream
> >                    [class] => Horde_Vfs_Ftp
> >                    [type] => ->
> >                    [args] => Array
> >                        (
> >                            [0] => /pics
> >                            [1] => acmedest.gif
> >                        )
> >
> >                )
> >
> >        )
> >
> >    [previous:Exception:private] =>
> >)
> 
> See if my recent commits fix this.

Now running 3.0.0-git (not sure how to tell I have your change)

Just downloaded the git version and have the same problem using horde_auth as
the authentication backend to my vsftp server.  Changing line 42 of view.php
fixes the problem, but I suspect isn't quite desired.

Changing the following:


Line 41 (original):

    if (is_callable(array($gollem_vfs, 'readStream'))) {
        $stream = $gollem_vfs->readStream($vars->dir, $vars->file);
    } else {
        $data = $gollem_vfs->read($vars->dir, $vars->file);
    }

To:

    if (is_callable(array($gollem_vfs, 'readStream'))) {
        $data = $gollem_vfs->read($vars->dir, $vars->file);
    } else {
        $stream = $gollem_vfs->readStream($vars->dir, $vars->file);
    }


Fixes the vfs error I get.  I can navigate directories without changing it,
but I'll get the vfs error as soon as you click on a FILE.  

brent



More information about the gollem mailing list