Base for a static organization website

database.php.default 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * For full copyright and license information, please see the LICENSE.txt
  8. * Redistributions of files must retain the above copyright notice.
  9. *
  10. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. * @link http://cakephp.org CakePHP(tm) Project
  12. * @package app.Config
  13. * @since CakePHP(tm) v 0.2.9
  14. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  15. */
  16. /**
  17. * Database configuration class.
  18. *
  19. * You can specify multiple configurations for production, development and testing.
  20. *
  21. * datasource => The name of a supported datasource; valid options are as follows:
  22. * Database/Mysql - MySQL 4 & 5,
  23. * Database/Sqlite - SQLite (PHP5 only),
  24. * Database/Postgres - PostgreSQL 7 and higher,
  25. * Database/Sqlserver - Microsoft SQL Server 2005 and higher
  26. *
  27. * You can add custom database datasources (or override existing datasources) by adding the
  28. * appropriate file to app/Model/Datasource/Database. Datasources should be named 'MyDatasource.php',
  29. *
  30. *
  31. * persistent => true / false
  32. * Determines whether or not the database should use a persistent connection
  33. *
  34. * host =>
  35. * the host you connect to the database. To add a socket or port number, use 'port' => #
  36. *
  37. * prefix =>
  38. * Uses the given prefix for all the tables in this database. This setting can be overridden
  39. * on a per-table basis with the Model::$tablePrefix property.
  40. *
  41. * schema =>
  42. * For Postgres/Sqlserver specifies which schema you would like to use the tables in.
  43. * Postgres defaults to 'public'. For Sqlserver, it defaults to empty and use
  44. * the connected user's default schema (typically 'dbo').
  45. *
  46. * encoding =>
  47. * For MySQL, Postgres specifies the character encoding to use when connecting to the
  48. * database. Uses database default not specified.
  49. *
  50. * sslmode =>
  51. * For Postgres specifies whether to 'disable', 'allow', 'prefer', or 'require' SSL for the
  52. * connection. The default value is 'allow'.
  53. *
  54. * unix_socket =>
  55. * For MySQL to connect via socket specify the `unix_socket` parameter instead of `host` and `port`
  56. *
  57. * settings =>
  58. * Array of key/value pairs, on connection it executes SET statements for each pair
  59. * For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html
  60. * For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html
  61. * For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx
  62. *
  63. * flags =>
  64. * A key/value array of driver specific connection options.
  65. */
  66. class DATABASE_CONFIG {
  67. public $default = array(
  68. 'datasource' => 'Database/Mysql',
  69. 'persistent' => false,
  70. 'host' => 'localhost',
  71. 'login' => 'user',
  72. 'password' => 'password',
  73. 'database' => 'database_name',
  74. 'prefix' => '',
  75. //'encoding' => 'utf8',
  76. );
  77. public $test = array(
  78. 'datasource' => 'Database/Mysql',
  79. 'persistent' => false,
  80. 'host' => 'localhost',
  81. 'login' => 'user',
  82. 'password' => 'password',
  83. 'database' => 'test_database_name',
  84. 'prefix' => '',
  85. //'encoding' => 'utf8',
  86. );
  87. }