Re: [PHP-DEV] fgets()/fgetss() BC break in HEAD

2006-11-16 Thread Zeev Suraski
At 06:48 16/11/2006, Sara Golemon wrote: Zeev- My IQ is higher than 12, and I don't see how defensive coding could have defended against this BC break. This code is missing error checking, but that could be quite reasonable (e.g. if you check ahead of time that the file is big enough to

[PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Mario Wolff
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

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Wez Furlong
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

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Mario Wolff
@Wez: Whoop, just found you as maintainer in Pecl and send the same request direct to you, sorry! 2006/11/16, Wez Furlong [EMAIL PROTECTED]: Two comments about the patch: - could you create a unified diff and post that instead? Here it is! - static local variable usage is not thread safe;

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Mario Wolff
2006/11/16, Wez Furlong [EMAIL PROTECTED]: 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

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Mario Wolff
2006/11/16, Mario Wolff [EMAIL PROTECTED]: 2006/11/16, Wez Furlong [EMAIL PROTECTED]: 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

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Mario Wolff
Short test script: ?php $data = array( 'one', 'two', 'three', 'four', 'five', 'six'); $db = new PDO( 'sqlite::memory:'); echo register authorizer\n; $db-sqliteSetAuthorizer('auth'); $db-exec( CREATE TABLE strings( a)); $insert = $db-prepare( 'INSERT INTO strings VALUES ( ?)'); foreach ( $data as

Re: [PHP-DEV] Enable authorizer-feature in PDO_SQLITE

2006-11-16 Thread Wez Furlong
I think it would be better to pass in the pdo_dbh_t as the autharg to the C level callback and then use that to determine if any of the expensive work needs to be done in the callback. static int authorizer() { pdo_dbh_t *db; /* keep the current safemode / basedir checks cheap and fast */

Re: [PHP-DEV] fgets()/fgetss() BC break in HEAD

2006-11-16 Thread Antony Dovgal
The issue is now solved, thank you. EOD On 11/14/2006 12:38 AM, Antony Dovgal wrote: Hello all. I'd like to continue recent IRC discussion here, to draw more attention to this issue. At the moment functions fgets() and fgetss() are broken in HEAD, as they return maxlen characters instead

Re: [PHP-DEV] zend_u_strtod() 400% speed up

2006-11-16 Thread Andrei Zmievski
Matt and Antony, I this we should go with Matt's patch, since we care only about ASCII characters in strings. -Andrei On Nov 13, 2006, at 4:46 AM, Matt Wilmas wrote: Hi Antony, - Original Message - From: Antony Dovgal Sent: Friday, November 10, 2006 On 11/10/2006 02:14 PM, Matt

Re: [PHP-DEV] Namespaces in PHP 6 - ++$take

2006-11-16 Thread Rasmus Lerdorf
Richard Lynch wrote: On Sat, November 11, 2006 7:37 am, Rasmus Lerdorf wrote: helping to get rid of bogus reports or translating the really bad reports into a simple reproducable test case is often the part that This is a plea for not being quite so bogus-trigger-happy as we have in the

Re: [PHP-DEV] zend_u_strtod() 400% speed up

2006-11-16 Thread Antony Dovgal
On 11/16/2006 08:59 PM, Andrei Zmievski wrote: Matt and Antony, I this we should go with Matt's patch, since we care only about ASCII characters in strings. Agree. I'm going to spend some time on this, re-test it once again and commit it after that. On Nov 13, 2006, at 4:46 AM, Matt

Re: [PHP-DEV] SimpleXML: A bug or just an annoyance?

2006-11-16 Thread Rasmus Lerdorf
Richard Lynch wrote: On Mon, November 13, 2006 9:29 am, Jochem Maas wrote: that sounds about right. my experience with SimpleXML is that every is either a string, an object, an array depending on how you are looking at it and regardless of the situation auto-casting can be relied on to NOT

[PHP-DEV] CVS Account Request: morse

2006-11-16 Thread David Morse
Contribute to both DB_Table and MDB2_Table. I've been corresponding with Mark Weisemann, who will approve this. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Re: CVS Account Request: morse

2006-11-16 Thread Mark Wiesemann
David Morse wrote: Contribute to both DB_Table and MDB2_Table. I've been corresponding with Mark Weisemann, who will approve this. He's talking about these two PEAR packages that I maintain. His request is valid. Please give him also karma for peardoc. Regards, Mark -- PHP Internals - PHP