Check Windows ODBC DSN during install (#2798)
* ODBC DSN detection * Merge remote-tracking branch 'upstream/master' * Merge remote-tracking branch 'upstream/master'
This commit is contained in:
parent
37476f0923
commit
3c82d3822b
|
|
@ -170,7 +170,12 @@
|
|||
}
|
||||
//test for windows and non sqlite
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' and strlen($db_type) > 0 and $db_type !='sqlite') {
|
||||
$messages[] = "<b>Windows requires a system DSN ODBC connection</b> this must be configured.";
|
||||
//Test for ODBC DSN in ODBC.INI. It should have section:
|
||||
//[fusionpbx]
|
||||
//Driver32=C:\Program Files\psqlODBC\0906\bin\psqlodbc35w.dll
|
||||
if ( preg_match('/\[fusionpbx\]/mi', file_get_contents('c:/Windows/ODBC.INI')) == 0 ) {
|
||||
$messages[] = "<b>Windows requires a system DSN ODBC connection with name 'fusionpbx'.</b>";
|
||||
}
|
||||
}
|
||||
|
||||
//action code
|
||||
|
|
|
|||
Loading…
Reference in New Issue