mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/16051] Automatically convert mysql driver to mysqli
PHPBB3-16051
This commit is contained in:
parent
bd02c5bd08
commit
e8b4304c1b
2 changed files with 7 additions and 1 deletions
|
@ -155,6 +155,12 @@ class config_php_file
|
||||||
return $dbms;
|
return $dbms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Force use of mysqli when specifying mysql
|
||||||
|
if (preg_match('/(phpbb\\\db\\\driver\\\)?mysql$/i', $dbms))
|
||||||
|
{
|
||||||
|
return 'phpbb\db\driver\mysqli';
|
||||||
|
}
|
||||||
|
|
||||||
throw new \RuntimeException("You have specified an invalid dbms driver: $dbms");
|
throw new \RuntimeException("You have specified an invalid dbms driver: $dbms");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
// phpBB 3.1.x auto-generated configuration file
|
// phpBB 3.1.x auto-generated configuration file
|
||||||
// Do not change anything in this file!
|
// Do not change anything in this file!
|
||||||
$dbms = 'mysqli';
|
$dbms = 'mysql';
|
||||||
$dbhost = '127.0.0.1';
|
$dbhost = '127.0.0.1';
|
||||||
$dbport = '';
|
$dbport = '';
|
||||||
$dbname = 'phpbb';
|
$dbname = 'phpbb';
|
||||||
|
|
Loading…
Add table
Reference in a new issue