Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Import page not loading

Hello everyone.

I am at a loss. I decided to load a fresh Vanilla Forums on my website and I have my export file from IPB. The site comes up fine and I can configure and use it. But when I click on the 'Import' menu option in the admin panel I always get this:

Something has gone wrong.

We've run into a problem and are unable to handle this request right now.
Please check back in a little while.

I have verified that all essential folders have 755 permissions. I installed vanilla in the 'forum' directory right off the webroot. The whole site seems to run fine with the exception of the import tool. Now I did recently have my host upgrade my server to SQL5.6+ and PHP7, but I didn't think anything was wrong since installation went fine and the site shows up fine. I have my export file from IPB in the 'uploads' folder.

I just don't know what else to check?


  • Options
    SwennetSwennet New
    edited November 2016

    Might have to do with the max upload filesize. You can check your max upload filesize by making a phpinfo file.

    How large is the file you're trying to import?

    EDIT: Oops, just realized you're not even able to access the import page.

  • Options
    LincLinc Detroit Admin

    Enable debug mode to see what the real error is.

  • Options

    How do I enable debug mode in Vanilla? And my import file is a little over 15mb

  • Options

    Ok more info, found out how to enable debug:

    Fatal Error in ImportModel._LoadTableLocalInfile();
    Call to undefined function mysql_connect()
    The error occurred on or near: /home/darkone/public_html/forum/applications/dashboard/models/class.importmodel.php

    1282: lines terminated by '\n'

    1283: ignore 1 lines";


    1285: // We've got to use the mysql_* functions because PDO doesn't support load data local infile well.

    1286: $dblink = mysql_connect(c('Database.Host'), c('Database.User'), c('Database.Password'), false, 128);

    1287: mysql_select_db(c('Database.Name'), $dblink);

    1288: $Result = mysql_query($Sql, $dblink);

    1289: if ($Result === false) {

    1290: $Ex = new Exception(mysql_error($dblink));


    [/home/darkone/public_html/forum/applications/dashboard/models/class.importmodel.php:1427] ImportModel->_LoadTableLocalInfile();

    [/home/darkone/public_html/forum/applications/dashboard/controllers/class.importcontroller.php:202] ImportModel->loadTableType();

    [/home/darkone/public_html/forum/library/core/class.dispatcher.php:326] ImportController->index();

    [/home/darkone/public_html/forum/index.php:44] 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.3
    PHP Version: 7.0.13
    Operating System: Linux
    Server Software: Apache
    Referer: <url_here>/forum/dashboard/settings
    User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
    Request Uri: /forum/dashboard/import
    Controller: ImportModel
    Method: _LoadTableLocalInfile
  • Options

    mysql_connect has been removed in PHP 7 and should be updated to mysqli_connect

  • Options
    sscadminsscadmin New
    edited November 2016

    Ok. Thanks Swennet

    This is what the code should look like, it comes up now so let me try it:

    // We've got to use the mysql_* functions because PDO doesn't support load data local infile well. $dblink = mysqli_connect(c('Database.Host'), c('Database.User'), c('Database.Password'), false, 128); mysqli_select_db(c('Database.Name'), $dblink); $Result = mysqli_query($Sql, $dblink); if ($Result === false) { $Ex = new Exception(mysql_error($dblink)); mysql_close($dblink); throw new $Ex; } mysqli_close($dblink);

    All mysql_* in this statement needs to be mysqli_* needs to be changed in the class.importmodel.php file to work in PHP7

    So this is a bug and should be fixed for those using PHP7. Dang this thing been killing me for the past few hours glad its fixed

  • Options

    Load worked so that is definitely the fix.

Sign In or Register to comment.