php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: M dot Boeren at guidance dot nl
New email:
PHP Version: OS:

 

 [2003-08-12 11:14 UTC] M dot Boeren at guidance dot nl
Description:
------------
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:
---------------
<?php 
$database="ext/dbx/tests/dbx_test.sqlite.db";

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

?>

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)
bool(false)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-12 16:26 UTC] helly@php.net
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 http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net 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: Tue Apr 23 21:01:31 2024 UTC