[PHP-DEV] PDO:PGSQL problem with double prepared statements. (solution included)

2005-12-07 Thread Thies C. Arntzen
hi, i had a slight problem with Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE [42P05]: Duplicate prepared statement: 7 ERROR: prepared statement "pdo_pgsql_stmt_086eebf4" already exists' in /home/thies/public_html/ portal-HEAD/include/pw.db/table.php:670 some inves

[PHP-DEV] sorry for the mess! the real subject sould read "object-overloading: why not allow recursive calls? (5.1)"

2005-11-04 Thread Thies C. Arntzen
i'll take a "mail for dummies" class next weekend;-) i'm still very interested in the real thing though.. (see subject) re, thies -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] object-overloading: why not allow recursive calls? (5.1) hey, in zend_object_handlers.c function zend_std_read_property we protect against calling the __get function of an object if we're

2005-11-04 Thread Thies C. Arntzen
hey, in zend_object_handlers.c function zend_std_read_property we protect against calling the __get function of an object if we're already in a __get() function. (look for zobj->in_get) in that function. i don't think we should be doing this. simplyfied example: name); } } } $

Re: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-04-01 Thread Thies C . Arntzen
Am 31.03.2005 um 17:28 schrieb Marcus Boerger: Hello Thies, Friday, March 25, 2005, 1:55:30 PM, you wrote: and this is 'cause pdo _expects_ the user to prefix the bound variables with a colon. grr... ppls, lets change it before it's too late. this "tiny bit" makes binding harder than it should b

Re: [PHP-DEV] pdo: patch to make leading colon unneeded for bound variables without breaking BC.

2005-03-25 Thread Thies C . Arntzen
Am 26.03.2005 um 01:47 schrieb Wez Furlong: There are releases on pecl.php.net, and there are (a few) people running these in production. In addition, it's been advertised as working this way for over a year. So, it is important to preserve the current behaviour when this patch is applied (will do

Re: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-03-25 Thread Thies C . Arntzen
(back on list) Am 25.03.2005 um 22:17 schrieb Jared Williams: As Thies wrote: This list is for discussing the development _of_ PHP. Therefore it's important to have samples which are showing the problem not the whole stuff around it - such a thing won't be readable anymore and the readers would spe

Re: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-03-25 Thread Thies C . Arntzen
Am 25.03.2005 um 17:40 schrieb Jared Williams: jared, i fail to understand your "contribution" to the real subject ("do we need a colon in from of every bound variable or not"). I was pointing out your design was flawed. Which if was made more secure, like the following, the colons become less of

Re: [PHP-DEV] pdo: patch to make leading colon unneeded for bound variables without breaking BC.

2005-03-25 Thread Thies C . Arntzen
Am 25.03.2005 um 15:28 schrieb [EMAIL PROTECTED]: "Thies C. Arntzen" <[EMAIL PROTECTED]> writes: diff -u -w -r1.95 pdo_stmt.c --- ext/pdo/pdo_stmt.c 24 Mar 2005 12:32:06 - 1.95 +++ ext/pdo/pdo_stmt.c 25 Mar 2005 13:13:18 - @@ -242,6 +242,13 @@ hash =

Re: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-03-25 Thread Thies C. Arntzen
Jared Williams wrote: Am 25.03.2005 um 14:36 schrieb Jared Williams: Can I just point out that you've just negated the whole reason for having parameters in the first place, imo. huh? just 'cuase you dislike my php-code you question the "value" of bind alltogether? $table is just as vulnerab

Re: [PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-03-25 Thread Thies C . Arntzen
Am 25.03.2005 um 14:36 schrieb Jared Williams: Can I just point out that you've just negated the whole reason for having parameters in the first place, imo. huh? just 'cuase you dislike my php-code you question the "value" of bind alltogether? $table is just as vulnerable to an SQL injection att

[PHP-DEV] pdo: patch to make leading colon unneeded for bound variables without breaking BC.

2005-03-25 Thread Thies C. Arntzen
subject says it - testcase is also attached. i have updated: sqlite and oci. i have tested: sqlite and postgres (uses bind emulation). i did not look at the firebird code as it seemed "complexish" to me;-) all the other drivers seem to use the emulation (like postgres) so they should work. re, th

[PHP-DEV] pdo: binding variables supplied to execute() is NotVeryUseful(tm)...

2005-03-25 Thread Thies C. Arntzen
hi, pdo hat it's own query-parser, named variables are prefixed with a colon... so far - so nice... i have a function called insert which is called like this: $db->insert('some_table', array('name' => $name, 'age' => $age)); it's implemented like this: function insert($table, $values) { $colu

Re: [PHP-DEV] pdo: cannot send NULL values thru bound parameters.

2005-03-24 Thread Thies C . Arntzen
Am 24.03.2005 um 12:32 schrieb Jared Williams: $stmt = $this->prepareStatement('insert into bla (name) values (:name)'); $name = NULL; var_dump($name); // $name is NULL $stmt->bindParam(':name', $name); var_dump($name); // $name is an empty string am i overlooking something obvious? $stmt->bindPar

Re: [PHP-DEV] pdo: cannot send NULL values thru bound parameters.

2005-03-24 Thread Thies C . Arntzen
Am 24.03.2005 um 12:28 schrieb Marcus Boerger: Hello Thies, may i kindly ask you to provide a test case as a .inc file in pdo/tests. I'll then look into the details? re, thies -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] pdo: cannot send NULL values thru bound parameters.

2005-03-24 Thread Thies C . Arntzen
as we convert "incoming" zvals to strings in pdo_stmt.c "no matter what"... $stmt = $this->prepareStatement('insert into bla (name) values (:name)'); $name = NULL; var_dump($name); // $name is NULL $stmt->bindParam(':name', $name); var_dump($name); // $name is an empty string am i overlooking somet

Re: [PHP-DEV] Variable fetch optimization

2004-10-02 Thread Thies C . Arntzen
before: 34.430 after: 20.126 do i need to say more? (if it really works, which i haven't tested yet) great andi! re, tc PS: i really think that the vm should be generated by a script! looking at what makes most of the patch i really think that we're making hacking the engine more complex than nee

Re: [PHP-DEV] Benchmark of new VM

2004-09-26 Thread Thies C . Arntzen
On 2004-09-26 03:05:18 +0200, Andi Gutmans <[EMAIL PROTECTED]> said: I'll see which parts of your patch can be adapted for 5.1.x. I think the var lookup is probably the most substantial one but I will probably implement it slightly different. I'll mail internals@ when I have something. this need

Re: [PHP-DEV] Benchmark of new VM

2004-09-25 Thread Thies C . Arntzen
On 2004-09-24 01:42:48 +0200, Andi Gutmans <[EMAIL PROTECTED]> said: Hi, Take it at face value but I get the following results with the new VM vs. 5.0.x on the bench.php script I commited to php5/Zend/tests. PHP 5.0.xPHP 5.1.x 37.5secsvs 29secs You know I'm not a big believer in syn

Re: [PHP-DEV] New VM architecture

2004-09-23 Thread Thies C . Arntzen
On 2004-09-22 20:09:47 +0200, Andi Gutmans <[EMAIL PROTECTED]> said: Guys, There's no feedback about the new VM architecture and it's hard to maintain the patches as changes are being made to the source base constantly. I will recommit the patches on Monday unless someone has reasonable objectio

Re: Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c

2004-07-16 Thread Thies C. Arntzen
On Fri, 16 Jul 2004 09:32:10 -0700, Andi Gutmans <[EMAIL PROTECTED]> wrote: > Do you have the source? > I think it'd be more interesting to see the performance difference on a > real world application such as phpBB, phpnuke or similar. If you can give > us numbers on that, it would definitely impro

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c

2004-07-16 Thread Thies C. Arntzen
On Fri, 16 Jul 2004 12:46:47 -0400, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote: > On July 16, 2004 12:41 pm, Thies C. Arntzen wrote: > > php has no real concept for out-of-memory situations (stack or real) > > - nor do we catch infinite (nor too deep) recursions. all

[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c

2004-07-16 Thread Thies C. Arntzen
On Fri, 16 Jul 2004 12:15:46 -0400, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote: > On July 16, 2004 11:58 am, Thies C. Arntzen wrote: > > hey ilia, > > > > here's another one of my meaningess, synthetic benchmarks (this is how > > the CreatorsOfPHP(tm) would c

[PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_execute.c

2004-07-16 Thread Thies C. Arntzen
On Fri, 16 Jul 2004 08:39:21 -0400, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote: > Oops mail client assign the message to the wrong patch. > In response to Andi's question, we can probably get away with using a regular > malloc since the number of variables needed to cause a crash will probably > ca

Re: [PHP-DEV] Exceptions and Errors

2004-04-14 Thread Thies C . Arntzen
Am 14.04.2004 um 21:53 schrieb Marcus Boerger: Personally I'd much prefer a way of returning a value from a constructor, i.e. to be able to 'return null;' or a similar language construct so I could do 'if ($db = new SQLiteDatabase)' It would also mean that I would run into a 'calling method on a n

Re: [PHP-DEV] phpinfo();

2004-04-02 Thread Thies C . Arntzen
Am 02.04.2004 um 09:49 schrieb Robin Ericsson: On Thu, 2004-04-01 at 16:46, Derick Rethans wrote: On Thu, 1 Apr 2004, Joseph Lee wrote: What's with the logo on phpinfo() today? The php logo has been changed to a dog. Is it a 1st April thing? Yup I liked Thies better than the dog :) me too;-) PS

[PHP-DEV] oci in pecl...

2003-12-09 Thread Thies C . Arntzen
it was actually my idea to for the oci8 stuff - and have some new maintainer maintain it in pecl. i see no valid reason against it. he can start hacking on it (in pecl) starting today - once he is comfortable with it we'll nuke the ext/oci and use(link, package) the stuff from pecl. loosing al

Re: [PHP-DEV] [PATCH] for oci8 and some improvement proposals

2003-12-08 Thread Thies C . Arntzen
Am 08.12.2003 um 12:11 schrieb Antony Dovgal: It seems, that you misunderstood me. I meant this: Almost every function, that deals with Lobs, calls OciLobGetLength every time it's being called. And I propose to use oci_lobgetlen(), which will decide - is it necessary to call OciLobGetLength or we

Re: [PHP-DEV] [PATCH] for oci8 and some improvement proposals

2003-12-08 Thread Thies C . Arntzen
Am 08.12.2003 um 10:12 schrieb Antony Dovgal: so should I add oci_lobgetlen() instead of OCILobGetLength calls after this statement? or this code is considered to be working and should not be changed anymore? and what about deprecating old syntax, that doesn't meet naming conventions? i don't

Re: [PHP-DEV] [PATCH] for oci8 and some improvement proposals

2003-12-06 Thread Thies C . Arntzen
Am 05.12.2003 um 17:02 schrieb Antony Dovgal: On Fri, 05 Dec 2003 17:08:49 +0100 Maxim Maletsky <[EMAIL PROTECTED]> wrote: it's been a while as I was mentioning that the naming convention for OCI8* functions should change into something like oracle_*. Problem is that there is also an old ora_* set

Re: [PHP-DEV] [PATCH] for oci8 and some improvement proposals

2003-12-06 Thread Thies C . Arntzen
Am 06.12.2003 um 00:41 schrieb Jani Taskinen: I had the impression that the 'other' oracle extension is somewhat deprecated and unsupported already? (next one to be moved to sibe..PECL ? :) feel free to move bothe oracle and oci to PECL. re, tc (a _strong_ believer that all extensions

Re: [PHP-DEV] [PATCH] for oci8 and some improvement proposals

2003-12-05 Thread Thies C . Arntzen
Am 05.12.2003 um 14:42 schrieb Antony Dovgal: On Fri, 5 Dec 2003 13:37:29 - "Wez Furlong" <[EMAIL PROTECTED]> wrote: Would it make sense to expose this stuff as a stream using the streams API, so the user would be able to fread($lob) etc? yes, I've been thinking about it as an option. I just w

Re: [PHP-DEV] Tidy & PHP5

2003-12-01 Thread Thies C . Arntzen
before bundling i'd like to see the api refined... right now it's not possible to work with more than one html-doc at a time. (tidy_parse_file() does not return a resource to the internal tidy doc, so you can only have one doc at a time) also we should ask ourself if (i haven't used tidy so i m

Re: [PHP-DEV] PHP 5 RC1

2003-11-12 Thread Thies C. Arntzen
On Wed, Nov 12, 2003 at 09:44:23PM +0100, Marcus Boerger wrote: > Hello Olivier, > > Wednesday, November 12, 2003, 5:12:37 PM, you wrote: > > > Uwe Schindler wrote: > >> How about function names (in my SAPI module I changed everything from > >> for example php4_execute to php5_execute for NSAPI)

Re: [PHP-DEV] PHP 5 RC1

2003-11-11 Thread Thies C. Arntzen
On Tue, Nov 11, 2003 at 10:01:32PM +0100, Stig S. Bakken wrote: > On Tue, 2003-11-11 at 19:05, Andi Gutmans wrote: > > Hey guys, > > > > I think the PHP 5 tree has matured a lot and it's time to release an RC. I > > think end of November or mid-December makes sense. I'd like to aim at the > > fo

Re: [PHP-DEV] Fix for bug #25543

2003-10-05 Thread Thies C. Arntzen
On Sat, Oct 04, 2003 at 12:13:12PM +0200, Andi Gutmans wrote: > At 08:16 AM 10/4/2003 +0900, Moriyoshi Koizumi wrote: > >Andi Gutmans <[EMAIL PROTECTED]> wrote: > > > >> Hi, > >> > >> I don't like this patch because already the gc is a very sensitive > >> mechanism and we're not allowed to collect

Re: [PHP-DEV] Problem with CVS

2003-08-30 Thread Thies C. Arntzen
9) > ==2074== > ==2074== ERROR SUMMARY: 5 errors from 5 contexts (suppressed: 4 from 2) > ==2074== malloc/free: in use at exit: 288 bytes in 3 blocks. > ==2074== malloc/free: 3457 allocs, 3455 frees, 513425 bytes allocated. > ==2074== For a detailed leak analysis, rerun with: --leak-

Re: [PHP-DEV] variable_exists() patch

2003-08-15 Thread Thies C. Arntzen
On Fri, Aug 15, 2003 at 07:41:48AM +0800, Alan Knowles wrote: > I hit this a couple of months ago.. trying to implement NULL > support in dataobjects: > > $do = DB_DataObject::factory('test'); > $do->get(12); > $do->birthday = null; > $do->update(); > > was supposed to generate > SELECT * FROM te

Re: [PHP-DEV] shutdown_memory_manager and resource handling

2003-08-14 Thread Thies C. Arntzen
ve no leaks left re, tc -- Thies C. Arntzen - Looking for all sorts of freelance work - just ask.. http://www.amazon.de/exec/obidos/wishlist/AB9DY62QWDSZ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] shutdown_memory_manager and resource handling

2003-08-14 Thread Thies C. Arntzen
i/cgi/cgi_main.c:1555 > #9 0x2734 in _start (argc=3, argv=0xb82c, envp=0xb83c) at > /SourceCache/Csu/Csu-45/crt.c:267 > #10 0x25b4 in start () > > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://ww

Re: [PHP-DEV] [PATCH]: php5 - oci8 - type of temporary LOB in `ociwritetemporarylob'

2003-07-22 Thread Thies C. Arntzen
On Mon, Jul 21, 2003 at 04:29:17PM +0200, Novický Marek wrote: > Patch proposal to implement `lob_type' as an optional parameter to the > `ociwritetemporarylob' function. > > Patch changes file ext/oci8/oci8.c, diff made against php-5 latest csl > > /* $Id: oci8.c,v 1.211 2003/06/22 14:33:03 and

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_API.c

2003-07-14 Thread Thies C. Arntzen
On Tue, Jul 15, 2003 at 07:29:06AM +0200, Andi Gutmans wrote: > I don't quite remember Andrei's reason for choosing zval * > instead of zval > ** but it probably does make sense to change 'z' to return a zval ** > instead of adding a new character ('Z') for returning zval **. > The downside is th

Re: [PHP-DEV] enabling sqlite by default

2003-06-23 Thread Thies C. Arntzen
On Sun, Jun 22, 2003 at 10:38:42PM -0400, Sterling Hughes wrote: > Hey, > > Unless anyone objects I'm going to enable the sqlite extension by i object strongly. sterling, why have you gotten into the enable-all, bundle-all mode lately? what do you gain? thies -- PHP Internals - PHP

Re: [PHP-DEV] modules and registering destructors

2003-03-31 Thread Thies C. Arntzen
On Sun, Mar 30, 2003 at 04:34:36PM -0500, Rob Richards wrote: > My questions for the other day seem a lot off. After going through modules > much more, I need someone to either confirm or explain a little more on how > resources within a module are destroyed. What I am seeing stepping through > the