Req #76868 [Com]: PDO SQLite support for SQLite's Shared Cache Mode

From: Date: Mon, 27 Jun 2022 03:56:38 +0000
Subject: Req #76868 [Com]: PDO SQLite support for SQLite's Shared Cache Mode
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241816@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76868&edit=1

 ID:                 76868
 Comment by:         mortensonsam at gmail dot com
 Reported by:        pablo dot godinez at zayon dot eu
 Summary:            PDO SQLite support for SQLite's Shared Cache Mode
 Status:             No Feedback
 Type:               Feature/Change Request
 Package:            PDO SQLite
 PHP Version:        Irrelevant
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

>However, that doesn't work, if open_basedir is set.  Would that be a problem for you?

Chiming in to say that yes, this is a problem for me! I'd like to use this feature and keep my
open_basedir restriction in place for security reasons.


Previous Comments:
------------------------------------------------------------------------
[2021-11-28 04:22:08] php-bugs at lists dot php dot net

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.

------------------------------------------------------------------------
[2021-11-18 12:54:17] cmb@php.net

> PDO should support this URI : sqlite::memory:?cache=shared.

As of PHP 8.1.0, the following is supported having the same effect:

    sqlite:file::memory:?cache=shared

However, that doesn't work, if open_basedir is set.  Would that be
a problem for you?

------------------------------------------------------------------------
[2021-10-07 11:37:39] cmb@php.net

Something like what has been done for SQLite3[1], would need to be
done for PDO_SQLite.  Maybe someone wants to submit a PR[2]?

[1] <https://github.com/php/php-src/commit/cc125f277b50e0f90fc8033fe7f47d2446389a15>
[2] <https://github.com/php/php-src/pulls>

------------------------------------------------------------------------
[2019-08-25 01:53:35] jsuprock at tenable dot com

This is actually preventing me from setting up mock, in-memory databases to inject for fully
unit-testing much of our project's code.

Do you know when this will be available? I would greatly appreciate it.

Thanks!

------------------------------------------------------------------------
[2019-02-28 15:39:07] mikeryan at virtuoso-performance dot com

I would like to add that the lack of the shared cache isn't just a performance issue - when
testing library code which is making its own PDO connection, you can't have the test code
prepopulate an in-memory database table with test data.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=76868


--
Edit this bug report at https://bugs.php.net/bug.php?id=76868&edit=1


Thread (8 messages)

« previous php.bugs (#241816) next »