Changeset 6231 for freepbx/trunk/amp_conf
- Timestamp:
- 07/31/08 12:55:44 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/bin/retrieve_conf
r6189 r6231 246 246 247 247 /* on centos this extension is not loaded by default */ 248 if (! extension_loaded('sqlite3.so') )248 if (! extension_loaded('sqlite3.so') && ! extension_loaded('SQLITE3')) 249 249 dl('sqlite3.so'); 250 250 freepbx/trunk/amp_conf/htdocs/admin/common/db_connect.php
r5870 r6231 44 44 45 45 /* on centos this extension is not loaded by default */ 46 if (! extension_loaded('sqlite3') )46 if (! extension_loaded('sqlite3') && ! extension_loaded('SQLITE3')) 47 47 dl('sqlite3.so'); 48 48 … … 53 53 54 54 $datasource = "sqlite3:///" . $amp_conf["AMPDBFILE"] . "?mode=0666"; 55 $db = DB::connect($datasource); 55 $options = array( 56 'debug' => 4, 57 'portability' => DB_PORTABILITY_NUMROWS 58 ); 59 $db = DB::connect($datasource, $options); 56 60 break; 57 61 … … 71 75 72 76 if ($amp_conf['AMPDBPASS'] == $amp_conf_defaults['AMPDBPASS'][1]) { 77 print 73 78 $nt->add_warning('core', 'AMPDBPASS', _("Default SQL Password Used"), _("You are using the default SQL password that is widely known, you should set a secure password")); 74 79 } else { freepbx/trunk/amp_conf/htdocs/recordings/includes/database.php
r1773 r6231 44 44 if ($dbfile) { 45 45 // datasource mostly to support sqlite: dbengine://dbfile?mode=xxxx 46 $dsn = $engine . '://' . $dbfile . '?mode=0666'; 46 $datasource = $engine . ':///' . $dbfile . '?mode=0666'; 47 $options = array( 48 'debug' => 4 49 ); 50 if (! extension_loaded('sqlite3') && ! extension_loaded('SQLITE3')) { 51 dl('sqlite3.so'); 52 } 53 47 54 } 48 55 else { 49 56 // datasource in in this style: dbengine://username:password@host/database 50 57 $datasource = $engine . '://' . $username . ':' . $password . '@' . $host . '/' . $name; 58 59 // options 60 $options = array( 61 'debug' => 2, 62 'portability' => DB_PORTABILITY_LOWERCASE|DB_PORTABILITY_RTRIM|DB_PORTABILITY_DELETE_COUNT|DB_PORTABILITY_NUMROWS|DB_PORTABILITY_ERRORS|DB_PORTABILITY_NULL_TO_EMPTY, 63 ); 51 64 } 52 53 // options54 $options = array(55 'debug' => 2,56 'portability' => DB_PORTABILITY_LOWERCASE|DB_PORTABILITY_RTRIM|DB_PORTABILITY_DELETE_COUNT|DB_PORTABILITY_NUMROWS|DB_PORTABILITY_ERRORS|DB_PORTABILITY_NULL_TO_EMPTY,57 );58 65 59 66 // attempt connection
