General help

 
 
Picture of Matt Goodhue
SMB web Client Errors
 
Hello All,

We have moodle up and running, so far all has been great. We have got LDAP authentication working with no problems. We found the SMB_Web_client and ran into errors.

I can browse the network from command line with smbclient. I can install the SMB Web client, configure it and browse no problems. But when I use the module, I get errors. I have searched the logs for more specific errors, but this is all I keep seeing. I am guessing this is a permission missing file, but I have searched and looked and at a loss. Please help.

The strange part is, when I browse this with IE 5 it half works. IE 6+ and Firefox it does not work at all.

When we configure the module and install it, we get these messages on the screen:

Warning: fopen(data/languages.csv) [function.fopen]: failed to open stream: No such file or directory in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 353

Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 354

Warning: fclose(): supplied argument is not a valid stream resource in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 355

Warning: fopen(data/languages.csv) [function.fopen]: failed to open stream: No such file or directory in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 357

Warning: filesize() [function.filesize]: stat failed for data/languages.csv in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 358

Warning: fread(): supplied argument is not a valid stream resource in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 358

Warning: fclose(): supplied argument is not a valid stream resource in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 359

Warning: fopen(data/mime.types) [function.fopen]: failed to open stream: No such file or directory in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 353

Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 354

Warning: fclose(): supplied argument is not a valid stream resource in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 355

Warning: fopen(data/mime.types) [function.fopen]: failed to open stream: No such file or directory in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 357

Warning: filesize() [function.filesize]: stat failed for data/mime.types in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 358

Warning: fread(): supplied argument is not a valid stream resource in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 358

Warning: fclose(): supplied argument is not a valid stream resource in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 359

Warning: Cannot modify header information - headers already sent by (output started at /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php:353) in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 510

Warning: Cannot modify header information - headers already sent by (output started at /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php:353) in /var/www/moodle/blocks/smb_web_client/class_smbwebclient.php on line 511
 
Average of ratings: -
Picture of Béatrice Boury
Re: SMB web Client Errors
 
Hello all

I have the same error ... Vave you been able to solve the problem ?

Thanks a lot
 
Average of ratings: -
Picture of Harald Winkelmann
Re: SMB web Client Errors
 

I just found an error in class_smbwebclient_moodle.php which seems to be responsible for theese errors. The developer initializes the class not correctly. I could solve the problem by changing the following function.

    function smbwebclient_moodle(){
        global $smb_cfg, $CFG, $USER;
        // call parent constructor
        //parent::smbwebclient();

        $this->criticalError=false;

        // set config
        $this->_setstatic_configvars();
        $this->_setdynamic_configvars();

        // call parent constructor
        parent::smbwebclient();
    }

The parent constructor was called to early!!!

Harry

 
Average of ratings: -
Capt. Moodle
Re: SMB web Client Errors
Group DevelopersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
Harry - Sorry for the delay in responding but I did want to follow up on this issue. First thank you for reporting the issue and posting how you got it to work for you. I sent Guy Thomas (who has generously volunteered to help maintain the smb web client code) a Moodle message alerting him to this post. I thought I would also mention that there is a section in the tracker under CONTRIB dedicated for reporting issues (bugs, feature requests, etc.). The tracker typically serves as the official to do list or fix it list for maintainers and developers so feel free to use that for reporting any other issues you might find and then you can reference those issues here in the forums. The nice thing about using the tracker is that the project maintainer for the issue is notified so that can speed up getting a response. Peace - Anthony
 
Average of ratings: -
Picture of Guy Thomas
Re: SMB web Client Errors
 
Anthony - Many thanks for making me aware of this post.

Harry - you are indeed correct and I have added your fix to the latest version which I will upload today. I have also credited you in the change log.
 
Average of ratings: -