Bug #6599 [NEW]: sqlite:///:memory: trys to open file
| From: | coz at metamule dot com | Date: | Thu, 26 Jan 2006 17:18:27 +0000 |
| Subject: | Bug #6599 [NEW]: sqlite:///:memory: trys to open file | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-7454@lists.php.net to get a copy of this message | ||
From: coz at metamule dot com
Operating system: SunOS 5.8 Generic_11
PHP version: 5.0.5
Package: Documentation
Bug Type: Bug
Bug description: sqlite:///:memory: trys to open file
Description:
------------
Using sqlite:///:memory: doesn't open a db in memory, it tries to open a
real file.
Test script:
---------------
function sqll_cache(&$dataArray){
$dsn = "sqlite:///:memory:";
$options = NULL;
$SQDB = DB::connect($dsn,$options);
$SQDB->query("create table data (data varchar(32))");
if(!$set){
$sth = $SQDB->prepare("insert into data (data) values (?)");
$set = 1;
}
if(is_array($dataArray)){
foreach($dataArray as $x){
$SQDB->execute($sth,array($x));
}
}
$SQDB->query("create index data_idx on data (data)");
return $SQDB;
}
Expected result:
----------------
Should take an array of data and put it in a sqlite table in memory
Actual result:
--------------
Warning: touch() [function.touch]: Unable to create file :memory: because
Permission denied in /usr/local/lib/php/DB/sqlite.php on line 117
--
Edit bug report at http://pear.php.net/bugs/bug.php?id=6599&edit=1
--