Fork me on GitHub
Current releases are 2.1.5 (31 Oct 2014) and 2.0.18.13 (5 Aug 2014)

Ready for 2.1? Find out if your plugins are compatible. 2.0 will no longer be updated after Dec 2014.

'Bonk' when attempting Import of Dummy Content

edited April 2012 in Vanilla 2.0 Help

I get the 'bonk' error immediately upon pushing the Save button when uploading the Dummy Content for import. Doesn't even get to next step.

Here is the error returned:

Failed to move uploaded file to target destination (C:\xampp\htdocs\P13\vanilla/uploads/C:/xampp/htdocs/P13/vanilla/uploads/import/DLC70NXV6VF5.gz).
The error occurred on or near: C:\xampp\htdocs\P13\vanilla\library\core\class.upload.php
212:          if (!file_exists(dirname($Target)))
213:             mkdir(dirname($Target));
214:          
215:          if (!move_uploaded_file($Source, $Target))
216:             throw new Exception(sprintf(T('Failed to move uploaded file to target destination (%s).'), $Target));
217:       }
218:       return $Parsed;
219:    }
220: 
Backtrace:
[C:\xampp\htdocs\P13\vanilla\applications\dashboard\controllers\class.importcontroller.php:167] Gdn_Upload->SaveAs();
[C:\xampp\htdocs\P13\vanilla\applications\dashboard\controllers\class.importcontroller.php:167] ImportController->Index();
[C:\xampp\htdocs\P13\vanilla\library\core\class.dispatcher.php:322] PHP::call_user_func_array();
[C:\xampp\htdocs\P13\vanilla\index.php:53] Gdn_Dispatcher->Dispatch();
Need Help?
If you are a user of this website, you can report this message to a website administrator.
If you are an administrator of this website, you can get help at the Vanilla Community Forums.
Additional information for support personnel:
Application: Vanilla
Application Version: 2.0.18.4
PHP Version: 5.3.8
Operating System: WINNT
Server Software: Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1
Referer: http://127.0.0.1/P13/vanilla/dashboard/import
User Agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19
Request Uri: /P13/vanilla/dashboard/import
Controller: Gdn_Upload
Method: SaveAs

And here is my config.php: `<?php if (!defined('APPLICATION')) exit();

// Conversations $Configuration['Conversations']['Version'] = '2.0.18.4';

// Database $Configuration['Database']['Name'] = '********'; $Configuration['Database']['Host'] = '********'; $Configuration['Database']['User'] = '*********'; $Configuration['Database']['Password'] = '*********';

// EnabledApplications $Configuration['EnabledApplications']['Conversations'] = 'conversations'; $Configuration['EnabledApplications']['Vanilla'] = 'vanilla';

// EnabledPlugins $Configuration['EnabledPlugins']['GettingStarted'] = 'GettingStarted'; $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';

// Garden $Configuration['Garden']['Errors']['MasterView'] = 'deverror.master.php'; $Configuration['Garden']['Debug'] = TRUE; $Configuration['Garden']['Title'] = 'Platoon XIII'; $Configuration['Garden']['Cookie']['Salt'] = 'L2EWGQHYX4'; $Configuration['Garden']['Cookie']['Domain'] = ''; $Configuration['Garden']['Registration']['ConfirmEmail'] = TRUE; $Configuration['Garden']['Email']['SupportName'] = 'Platoon XIII'; $Configuration['Garden']['Version'] = '2.0.18.4'; $Configuration['Garden']['RewriteUrls'] = TRUE; $Configuration['Garden']['CanProcessImages'] = TRUE; $Configuration['Garden']['Installed'] = TRUE; $Configuration['Garden']['Theme'] = 'BrandFriendly';

// Plugins $Configuration['Plugins']['GettingStarted']['Dashboard'] = '1';

// Routes $Configuration['Routes']['DefaultController'] = 'discussions';

// Vanilla $Configuration['Vanilla']['Version'] = '2.0.18.4';

// Last edited by mandrill (127.0.0.1)2012-04-24 10:40:19`

Any help?

Tagged:

Best Answer

  • UnderDogUnderDog Moderator
    Answer ✓

    Focus on this error:

    Failed to move uploaded file to target destination (C:\xampp\htdocs\P13\vanilla/uploads/C:/xampp/htdocs/P13/vanilla/uploads/import/DLC70NXV6VF5.gz).

    and I think it has something to do with the upload path used twice in the sourcecode.

    So look in this file: The error occurred on or near: C:\xampp\htdocs\P13\vanilla\library\core\class.upload.php

    and figure out where the actual move_uploaded_file occurs.

Answers

  • Thanks Underdog, still stuck though :/

    I have no idea what I'm looking for.

    This looks like it might have something to do with it as it would seem to be $UploadPath that is being repeated, beyond that I have no clue.

    public static function CanUpload($UploadPath=NULL) {
            if (is_null($UploadPath))
                $UploadPath = PATH_LOCAL_UPLOADS;
            if (ini_get('file_uploads') != 1)
                return FALSE;
            if (!is_dir($UploadPath))
                @mkdir($UploadPath);
            if (!is_dir($UploadPath))
                return FALSE;
          if (!IsWritable($UploadPath) || !is_readable($UploadPath)) 
                return FALSE;
            return TRUE;
        }

    (Also the code markdown seems to be borked.)

Sign In or Register to comment.