php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24575 sqlite_popen fails on second connection
Submitted: 2003-07-10 02:24 UTC Modified: 2005-04-30 05:45 UTC
From: m dot boeren at guidance dot nl Assigned: wez (profile)
Status: Closed Package: SQLite related
PHP Version: 4_3 (PECL_4_3) OS: win2k
Private report: No CVE-ID: None
 [2003-07-10 02:24 UTC] m dot boeren at guidance dot nl
Description:
------------
Hi,

the following script doesn't work correctly:

<?php
$handle = sqlite_popen("sqlite.db");
var_dump($handle);
$handle = sqlite_popen("sqlite.db");
var_dump($handle);
?>

will produce

$ ./php -f sqlitetest.php
resource(1) of type (sqlite database (persistent))
resource(1) of type (Unknown)

This also happens if I call sqlite_close($handle) between the popens...

BTW, this is on the latest ext/sqlite copied to existing 4.3.1 source tree on a Windows box.
Everything else I tested with sqlite works ok.

Cheerio, Marc.

Reproduce code:
---------------
<?php
$handle = sqlite_popen("sqlite.db");
var_dump($handle);
$handle = sqlite_popen("sqlite.db");
var_dump($handle);
?>


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


Actual result:
--------------
resource(1) of type (sqlite database (persistent))
resource(1) of type (Unknown)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-07-10 02:51 UTC] wez@php.net
Seems that it is broken.

FYI: the 4.3.x compatible code can be obtained like this:

co -d sqlite -r PECL_4_3 pecl/sqlite

Will fix sometime today.
 [2003-07-13 03:49 UTC] wez@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-2020 The PHP Group
All rights reserved.
Last updated: Thu Nov 26 16:01:23 2020 UTC