PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » MDB2_Driver_sqlite » Bug #6599

sqlite:///:memory: trys to open file

Details

Submitted2006-01-26 17:18 UTC
Fromcoz at metamule dot com
Assignedlsmith
StatusClosed
PackageMDB2_Driver_sqlite
PHP Version5.0.5
OSSunOS 5.8 Generic_11
Roadmaps(Not assigned)

Comments

[2006-01-26 17:18 UTC] coz at metamule dot com

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