|
3.1.3 - Configurations |
Top Previous Next |
|
Database Wrapper
We use ADOdb for PHP as database connection wrapper, so it doesn't tie to MySQL. It doesn't require major changes to PHP scripts if you decide to migrate MySQL to Microsoft SQL Server on Windows platform. ADOdb is dual licensed using BSD and LGPL. Copyright (c) 2000, 2001, 2002, 2003 John Lim All rights reserved. Read the /adodb/license.txt for more details.
To get ADODB programming API, documentation or more information visit http://php.weblogs.com/ADODB
The ADOdb directory is in the SpeedCheck package /adodb
Setup the username and password in PHP scripts
Note: If Apache + MySQL are on the same server, use 127.0.0.1 as host. However some version of Unix/Linux doesn't like 127.0.0.1, you may have to use localhost. Talk to your server administrator.
Locate /config/include.php and change the host (if necessary), username, password that connects to MySQL.
<?php
$db_host = "127.0.0.1"; $db_user = "username"; $db_pass = "password"; $db_name = "db_speedcheck";
include($_SERVER["DOCUMENT_ROOT"] . "/adodb/adodb.inc.php"); ADOLoadCode("mysql"); $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
?>
If you are using Microsoft SQL Server, you want to change this (we don't support this, just for your reference only)
ADOLoadCode("mysql"); to ADOLoadCode("mssql");
|