database.php.default 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * This is core configuration file.
  4. *
  5. * Use it to configure core behaviour ofCake.
  6. *
  7. * PHP 5
  8. *
  9. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  10. * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. *
  12. * Licensed under The MIT License
  13. * Redistributions of files must retain the above copyright notice.
  14. *
  15. * @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
  16. * @link http://cakephp.org CakePHP(tm) Project
  17. * @package app.config
  18. * @since CakePHP(tm) v 0.2.9
  19. * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
  20. */
  21. /**
  22. * In this file you set up your database connection details.
  23. *
  24. * @package cake.config
  25. */
  26. /**
  27. * Database configuration class.
  28. * You can specify multiple configurations for production, development and testing.
  29. *
  30. * driver => The name of a supported driver; valid options are as follows:
  31. * Datasabe/Mysql - MySQL 4 & 5,
  32. * Datasabe/Sqlite - SQLite (PHP5 only),
  33. * Datasabe/Postgres - PostgreSQL 7 and higher,
  34. * Datasabe/Mssql - Microsoft SQL Server 2000 and higher,
  35. * Datasabe/Oracle - Oracle 8 and higher
  36. *
  37. * You can add custom database drivers (or override existing drivers) by adding the
  38. * appropriate file to app/models/datasources/database. Drivers should be named 'MyDriver.php',
  39. *
  40. *
  41. * persistent => true / false
  42. * Determines whether or not the database should use a persistent connection
  43. *
  44. * host =>
  45. * the host you connect to the database. To add a socket or port number, use 'port' => #
  46. *
  47. * prefix =>
  48. * Uses the given prefix for all the tables in this database. This setting can be overridden
  49. * on a per-table basis with the Model::$tablePrefix property.
  50. *
  51. * schema =>
  52. * For Postgres specifies which schema you would like to use the tables in. Postgres defaults to 'public'.
  53. *
  54. * encoding =>
  55. * For MySQL, Postgres specifies the character encoding to use when connecting to the
  56. * database. Uses database default not specified.
  57. *
  58. */
  59. class DATABASE_CONFIG {
  60. public $default = array(
  61. 'datasource' => 'Database/Mysql',
  62. 'persistent' => false,
  63. 'host' => 'localhost',
  64. 'login' => 'user',
  65. 'password' => 'password',
  66. 'database' => 'database_name',
  67. 'prefix' => '',
  68. );
  69. public $test = array(
  70. 'datasource' => 'Database/Mysql',
  71. 'persistent' => false,
  72. 'host' => 'localhost',
  73. 'login' => 'user',
  74. 'password' => 'password',
  75. 'database' => 'test_database_name',
  76. 'prefix' => '',
  77. );
  78. }