| 1 | <?php |
|---|
| 2 | /* SVN FILE: $Id: database.php.default 7690 2008-10-02 04:56:53Z nate $ */ |
|---|
| 3 | /** |
|---|
| 4 | * This is core configuration file. |
|---|
| 5 | * |
|---|
| 6 | * Use it to configure core behaviour ofCake. |
|---|
| 7 | * |
|---|
| 8 | * PHP versions 4 and 5 |
|---|
| 9 | * |
|---|
| 10 | * CakePHP(tm) : Rapid Development Framework <http://www.cakephp.org/> |
|---|
| 11 | * Copyright 2005-2008, Cake Software Foundation, Inc. |
|---|
| 12 | * 1785 E. Sahara Avenue, Suite 490-204 |
|---|
| 13 | * Las Vegas, Nevada 89104 |
|---|
| 14 | * |
|---|
| 15 | * Licensed under The MIT License |
|---|
| 16 | * Redistributions of files must retain the above copyright notice. |
|---|
| 17 | * |
|---|
| 18 | * @filesource |
|---|
| 19 | * @copyright Copyright 2005-2008, Cake Software Foundation, Inc. |
|---|
| 20 | * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project |
|---|
| 21 | * @package cake |
|---|
| 22 | * @subpackage cake.app.config |
|---|
| 23 | * @since CakePHP(tm) v 0.2.9 |
|---|
| 24 | * @version $Revision: 7690 $ |
|---|
| 25 | * @modifiedby $LastChangedBy: nate $ |
|---|
| 26 | * @lastmodified $Date: 2008-10-02 00:56:53 -0400 (Thu, 02 Oct 2008) $ |
|---|
| 27 | * @license http://www.opensource.org/licenses/mit-license.php The MIT License |
|---|
| 28 | */ |
|---|
| 29 | /** |
|---|
| 30 | * In this file you set up your database connection details. |
|---|
| 31 | * |
|---|
| 32 | * @package cake |
|---|
| 33 | * @subpackage cake.config |
|---|
| 34 | */ |
|---|
| 35 | /** |
|---|
| 36 | * Database configuration class. |
|---|
| 37 | * You can specify multiple configurations for production, development and testing. |
|---|
| 38 | * |
|---|
| 39 | * driver => The name of a supported driver; valid options are as follows: |
|---|
| 40 | * mysql - MySQL 4 & 5, |
|---|
| 41 | * mysqli - MySQL 4 & 5 Improved Interface (PHP5 only), |
|---|
| 42 | * sqlite - SQLite (PHP5 only), |
|---|
| 43 | * postgres - PostgreSQL 7 and higher, |
|---|
| 44 | * mssql - Microsoft SQL Server 2000 and higher, |
|---|
| 45 | * db2 - IBM DB2, Cloudscape, and Apache Derby (http://php.net/ibm-db2) |
|---|
| 46 | * oracle - Oracle 8 and higher |
|---|
| 47 | * firebird - Firebird/Interbase |
|---|
| 48 | * sybase - Sybase ASE |
|---|
| 49 | * adodb-[drivername] - ADOdb interface wrapper (see below), |
|---|
| 50 | * odbc - ODBC DBO driver |
|---|
| 51 | * |
|---|
| 52 | * You can add custom database drivers (or override existing drivers) by adding the |
|---|
| 53 | * appropriate file to app/models/datasources/dbo. Drivers should be named 'dbo_x.php', |
|---|
| 54 | * where 'x' is the name of the database. |
|---|
| 55 | * |
|---|
| 56 | * persistent => true / false |
|---|
| 57 | * Determines whether or not the database should use a persistent connection |
|---|
| 58 | * |
|---|
| 59 | * connect => |
|---|
| 60 | * ADOdb set the connect to one of these |
|---|
| 61 | * (http://phplens.com/adodb/supported.databases.html) and |
|---|
| 62 | * append it '|p' for persistent connection. (mssql|p for example, or just mssql for not persistent) |
|---|
| 63 | * For all other databases, this setting is deprecated. |
|---|
| 64 | * |
|---|
| 65 | * host => |
|---|
| 66 | * the host you connect to the database. To add a socket or port number, use 'port' => # |
|---|
| 67 | * |
|---|
| 68 | * prefix => |
|---|
| 69 | * Uses the given prefix for all the tables in this database. This setting can be overridden |
|---|
| 70 | * on a per-table basis with the Model::$tablePrefix property. |
|---|
| 71 | * |
|---|
| 72 | * schema => |
|---|
| 73 | * For Postgres and DB2, specifies which schema you would like to use the tables in. Postgres defaults to |
|---|
| 74 | * 'public', DB2 defaults to empty. |
|---|
| 75 | * |
|---|
| 76 | * encoding => |
|---|
| 77 | * For MySQL, MySQLi, Postgres and DB2, specifies the character encoding to use when connecting to the |
|---|
| 78 | * database. Defaults to 'UTF-8' for DB2. Uses database default for all others. |
|---|
| 79 | * |
|---|
| 80 | */ |
|---|
| 81 | class DATABASE_CONFIG { |
|---|
| 82 | |
|---|
| 83 | var $default = array( |
|---|
| 84 | 'driver' => 'mysql', |
|---|
| 85 | 'persistent' => false, |
|---|
| 86 | 'host' => 'localhost', |
|---|
| 87 | 'login' => 'user', |
|---|
| 88 | 'password' => 'password', |
|---|
| 89 | 'database' => 'database_name', |
|---|
| 90 | 'prefix' => '', |
|---|
| 91 | ); |
|---|
| 92 | |
|---|
| 93 | var $test = array( |
|---|
| 94 | 'driver' => 'mysql', |
|---|
| 95 | 'persistent' => false, |
|---|
| 96 | 'host' => 'localhost', |
|---|
| 97 | 'login' => 'user', |
|---|
| 98 | 'password' => 'password', |
|---|
| 99 | 'database' => 'test_database_name', |
|---|
| 100 | 'prefix' => '', |
|---|
| 101 | ); |
|---|
| 102 | } |
|---|
| 103 | ?> |
|---|