Re: Enable authorizer-feature in PDO_SQLITE

From: Date: Thu, 16 Nov 2006 14:29:58 +0000
Subject: Re: Enable authorizer-feature in PDO_SQLITE
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-26641@lists.php.net to get a copy of this message
Two comments about the patch: - could you create a unified diff and post that instead? - static local variable usage is not thread safe; state should be stored in the pdo_dbh_t structure. And one concern: I deliberately left this feature unimplemented so far because the authorization callback will happen "a lot", and frequent callbacks into PHP script will make things slower. I suggest that you adjust your patch to cache the function callback information in the pdo_dbh_t to reduce some of that overhead, and run some benchmarks for a simple authorizer function in PHP that always returns true vs the same script with no authorizer, so that we get a feel for what kind of impact that has for various common queries. One other thing that is important is to ensure that the PHP safe_mode/open_basedir checks have higher priority than the PHP script callback. If safe_mode/open_basedir decide that the path is not accessible, then the PHP script must not be able to override that. However, if safe_mode/open_basedir say that access is ok, the PHP script can optionally override that decision. --Wez. On 11/16/06, Mario Wolff <wolfshoehle@googlemail.com> wrote:
Hello list, i've extended sqlite_driver to get access to the authorizer-feature of sqlite. This is my first contact with the Zend-API and my last c skill is more than a bit outdated. Could someone review/cleanup my code to get it merged to the distribution? Hint and comment welcome! Thanks, Mario Wolff PS: Patch applys against 5.2.0! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.internals (#26641) next »