#34966 [Fbk->Opn]: sqlite_open fails to create database
| From: | nohn@php.net | Date: | Mon, 24 Oct 2005 13:42:11 +0000 |
| Subject: | #34966 [Fbk->Opn]: sqlite_open fails to create database | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-86977@lists.php.net to get a copy of this message | ||
ID: 34966
Updated by: nohn@php.net
Reported By: nohn@php.net
-Status: Feedback
+Status: Open
Bug Type: SQLite related
Operating System: Cygwin
PHP Version: 5CVS-2005-10-24 (snap)
New Comment:
Be a bit constructive please.
Previous Comments:
------------------------------------------------------------------------
[2005-10-24 12:34:11] tony2001@php.net
Please try it on real OS (i.e. not Cygwin).
The code works perfectly here.
------------------------------------------------------------------------
[2005-10-24 12:31:10] nohn@php.net
Description:
------------
sqlite_open fails to create database
Reproduce code:
---------------
<?php
if ($db = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
sqlite_query($db, 'CREATE TABLE foo (bar varchar(10))');
sqlite_query($db, "INSERT INTO foo VALUES ('fnord')");
$result = sqlite_query($db, 'select bar from foo');
var_dump(sqlite_fetch_array($result));
} else {
die($sqliteerror);
}
?>
Expected result:
----------------
some db result
Actual result:
--------------
$ sapi/cli/php test.php
Warning: sqlite_open(): unable to open database:
/tmp/php5-200510240830/mysqlitedb in /tmp/php5-200510240830/test.php on
line 2
unable to open database: /tmp/php5-200510240830/mysqlitedb
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34966&edit=1