From:             M dot Boeren at guidance dot nl
Operating system: Win2k
PHP version:      5CVS-2003-08-12 (dev)
PHP Bug Type:     SQLite related
Bug description:  sqlite_open/popen difference

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)

-- 
Edit bug report at http://bugs.php.net/?id=25056&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25056&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25056&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25056&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25056&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25056&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25056&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25056&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25056&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25056&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25056&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25056&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25056&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25056&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25056&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25056&r=gnused

Reply via email to