I'm getting this error after the installation of Phundament.
var/sqlite is Read-Write, as well as Ldatabase.db in it.
----------------------------------
TPhpErrorException
Description
[Warning] SQLiteDatabase::query() [<a href='function.SQLiteDatabase-query'>function.SQLiteDatabase-query</a>]: attempt to write a readonly database (@line 130 in file /var/www/phundament.com/phundament/lib/prado/Caching/TSqliteCache.php).
Source File
/var/www/phundament.com/phundament/lib/prado/Caching/TSqliteCache.php (130)
0119: throw new TConfigurationException('sqlitecache_connection_failed',$error);
0120: if(($res=$this->_db->query('SELECT * FROM sqlite_master WHERE tbl_name=\''.self::CACHE_TABLE.'\' AND type=\'table\' LIMIT 1'))!=false)
0121: {
0122: if($res->numRows()===0)
0123: {
0124: if($this->_db->query('CREATE TABLE '.self::CACHE_TABLE.' (key CHAR(128) PRIMARY KEY, value BLOB, expire INT)')===false)
0125: throw new TConfigurationException('sqlitecache_table_creation_failed',sqlite_error_string(sqlite_last_error()));
0126: }
0127: }
0128: else
0129: throw new TConfigurationException('sqlitecache_table_creation_failed',sqlite_error_string(sqlite_last_error()));
0130: $this->_db->query('DELETE FROM '.self::CACHE_TABLE.' WHERE expire<>0 AND expire<'.time());
0131: $this->_initialized=true;
0132: parent::init($config);
0133: }
0134:
0135: /**
0136: * @return string database file path (in namespace form)
0137: */
0138: public function getDbFile()
0139: {
0140: return $this->_file;
0141: }
0142:
Stack Trace
#0 [internal function]: PradoBase::phpErrorHandler(2, 'SQLiteDatabase:...', '/var/www/phunda...', 130, Array)
#1 /var/www/phundament.com/phundament/lib/prado/Caching/TSqliteCache.php(130): SQLiteDatabase->query('DELETE FROM cac...')
#2 /var/www/phundament.com/phundament/lib/prado/TApplication.php(918): TSqliteCache->init(Object(TXmlElement))
#3 /var/www/phundament.com/phundament/lib/prado/TApplication.php(358): TApplication->initApplication()
#4 /var/www/phundament.com/phundament/index.php(22): TApplication->run()
#5 {main}
#5 {main}
2007-10-17 10:32 Apache/2.2.6 (Fedora) PRADO/3.1.0b
Logged In: NO
Sorry for the delay, something with the Tracker Notifications are not working for me :(
You've to give write permissions to the whole directory the database file resides in.
Best regards,
schmunk