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.
dashboard import error mysql_connect
jonatanmachado
New
I am getting an error when trying to access / dashboard / import
/applications/dashboard/models/class.importmodel.php
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);
Tagged:
0
Comments
I'm using:
Application Version: 2.3b1
PHP Version: 7.0.4-7ubuntu2.1
Operating System: Ubuntu 16.04
Server Software: nginx/1.10.0
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36
Request Uri: /index.php?p=/dashboard/import
Controller: ImportModel
Method: _LoadTableLocalInfile
https://github.com/vanilla/vanilla/issues/4073
Importing isn't compatible with PHP 7 yet.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
oh shit! did not know
I will be very difficult to get a solution?
I'm sorry for my english
It would be something like this or, more complex?
$dblink = new mysqli('Database.Host', 'Database.User', 'Database.Password', 'Database.Name');
$Result = mysql_query($Sql, $dblink);
if (mysqli_connect_errno()) {
die('Não foi possível conectar-se ao banco de dados: ' . mysqli_connect_error());
exit();
}
I did it almost the right
$dblink = new mysqli('Database.Host', 'Database.User', 'Database.Password', 'Database.Name');
$Result = mysqli_query($Sql, $dblink);
if ($Result === false) {
$Ex = new Exception(mysql_error($dblink));
mysql_close($dblink);
throw new $Ex;
}
I think it will not work for me
http://i.imgur.com/lUi7JEL.png
The problem was with the MySQL Strict mode
https://github.com/vanilla/vanilla/issues/4073#issuecomment-226303494