Kin
Kin

Reputation: 1397

Does CakePHP officially support SQLite3?

If so, how well? I can't seem to find any up to date information.

Upvotes: 1

Views: 457

Answers (3)

hsz
hsz

Reputation: 152216

http://book.cakephp.org/view/1075/DataSources

DataSources are the link between models and the source of data that models represent. In many cases, the data is retrieved from a relational database such as MySQL, PostgreSQL or MSSQL. CakePHP is distributed with several database-specific datasources (see the dbo_* class files in cake/libs/model/datasources/dbo/), a summary of which is listed here for your convenience:

  • dbo_mssql.php
  • dbo_mysql.php
  • dbo_mysqli.php
  • dbo_oracle.php
  • dbo_postgres.php
  • dbo_sqlite.php

EDIT:

http://book.cakephp.org/view/922/Database-Configuration

Table below code listing.

driver row

The name of the database driver this configuration array is for. Examples: mysql, postgres, sqlite, pear-drivername, adodb-drivername, mssql, oracle, or odbc. Note that for non-database sources (e.g. LDAP, Twitter), leave this blank and use "datasource".

Have you just tried ti set the driver ?

var $default = array(
                 'driver'      => 'sqlite',
                 'persistent'  => false,
                 'host'        => 'localhost',
                 'login'       => 'login',
                 'password'    => 'password',
                 'database'    => 'full_path_to_sqlite_file',
                 'prefix'      => ''
);

Upvotes: 4

Kin
Kin

Reputation: 1397

Digging through the CakePHP tickets it seems the developers won't add Sqlite3 support officially, but encourage the use of this plugin.

https://github.com/cakephp/datasources

Upvotes: 0

rzetterberg
rzetterberg

Reputation: 10268

This might a duplicate of How do I connect CakePHP to a SQLite database? Also have a look here for more information Using Sqlite3 with CakePHP

Upvotes: 0

Related Questions