|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25056 sqlite_open/popen difference
Submitted: 2003-08-12 11:14 UTC Modified: 2003-08-12 16:26 UTC
From: M dot Boeren at guidance dot nl Assigned: helly (profile)
Status: Closed Package: SQLite related
PHP Version: 4.3.3-RC3/5.0.0b2 OS: *
Private report: No CVE-ID: None
 [2003-08-12 11:14 UTC] M dot Boeren at guidance dot nl
There is a difference in how sqlite_open and sqlite_popen handle relative filenames.

When I run a test-script (see below) from the base dir with:

./php -f sqlite_popen.php

all works fine, but when I place the exact same script in a sub-directory the difference becomes clear.

./php -f ext/dbx/tests/sqlite_popen.php

(this was tested on Win2k using cygwin)

Reproduce code:

$handle = sqlite_open($database);
$handle = sqlite_popen($database);


Expected result:
resource(1) of type (sqlite database)
resource(2) of type (sqlite database (persistent))

Actual result:
PHP Warning:  sqlite_popen(): unable to open database: d:\...\ext\dbx\tests\ext\dbx\tests\dbx_test.sqlite.db in d:\...\ext\dbx\tests\sqlite_popen.php on line 6
resource(1) of type (sqlite database)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-12 16:26 UTC]
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at
In case this was a documentation problem, the fix will show up soon at

In case this was a website problem, the change will show
up on the site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 13 10:01:27 2024 UTC