php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56678 Persistent connection blocks database file
Submitted: 2005-11-28 11:20 UTC Modified: 2009-02-25 14:52 UTC
From: s dot lublow at gmx dot net Assigned:
Status: Wont fix Package: SQLite (PECL)
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: s dot lublow at gmx dot net
New email:
PHP Version: OS:

 

 [2005-11-28 11:20 UTC] s dot lublow at gmx dot net
Description:
------------
First I want to thank you for this plugin. It's great and this is the first problem I encounter, since I use it. I guess, thats, why there no bugs in the bug report list. :)

When I make a persistent connection to a database file, the database file will be locked for filesystem operations like move or delete, until I restart the webserver.

I think, the problem to this is because php doesn't free the resources of the persistent connection. I am aware that this is the normal behaviour for persistent database connections in php.

The normal solution to this problem is to free the resource on the db-side or with a connection timeout(never tried it) in php. Unfortunatly neither of them work with sqlite since there is no server or connection timeout directive.

I don't know if this is known or even intended behaviour. I'm sorry, for this (miss)post if this is not a bug. 

I tried it with php 5.1(precompiled sapi for apache2) (4 days old) and sqlite included with it ( and of course I uncommented the extension directives to enable pdo and sqlite modules in php.ini). I dont know if this problem does exist in other versions. But I expect, that this issue exist in all but the cgi version of php.

thank you in advance,
Sebastian Lublow
Student at the University of Groningen, Netherlands

P.S. This is my very first bug-report and english is not my native language. I appologize for any inconvenience resulting from that.

Reproduce code:
---------------
$handle = sqlite_popen('persistent.db');
sqlite_close($handle);

Expected result:
----------------
The database file can be deleted/moved after execution of the code (or at least some timer after execution).

Actual result:
--------------
The database file persistent.db cannot be moved/deleted, until the webserver restarts. There appears no default connection-timeout for idle connections. (I waited almost a day for a connection-timeout.)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-08-18 13:19 UTC] u6t8andiou1 at yahoo dot com
This isn't cute! How do I get this off my computer? Looks like someone is running data through my computer.  I want it gone, now!  Tell me how, or I'm reporting it
 [2009-02-25 14:52 UTC] philip at roshambo dot org
This will [likely] never be fixed. This PECL extension is no longer maintained, and I doubt ever will be. Instead, use the well maintained sqlite extension that comes with the PHP sources.

The sqlite pecl page has been updated to reflect this.

See also: http://php.net/pecl.phpize

If this bug still exists, report it at http://bugs.php.net/
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC