Re: [PHP-DEV] Scope of zend_alter_ini_entry in Apache module?

2003-08-15 Thread php
No I have not been able to isolate it, but I will try to set up a script to force the bug out of hiding on a regular basis... Give me a while though thanks, Daniel S On Fri, 2003-08-15 at 17:01, Zeev Suraski wrote: > At 01:46 16/08/2003, php wrote: > >Zeev, > > > >If you needed I could give

Re: [PHP-DEV] Zend bug? Overloading API in PHP4

2003-08-15 Thread Rasmus Lerdorf
On Sat, 16 Aug 2003, Zeev Suraski wrote: > zval *tmp; > > ALLOC_ZVAL(tmp); > *tmp = *value; > zval_copy_ctor(tmp); > INIT_PZVAL(tmp); Aha, that makes my little ovl example work. Which means I must be messing up my zval in my much more complex example myself. Thanks. -Rasmus -- PHP Internals -

Re: [PHP-DEV] Scope of zend_alter_ini_entry in Apache module?

2003-08-15 Thread Mark Morley
> It's supposed to change it only for the life of the current request. I'm > saying 'supposed' because there have been sporadic reports about this not > working properly, and changes that 'leak' and somehow persist across > requests. I still haven't been able to see that in my own eyes, though :I

Re: [PHP-DEV] Zend bug? Overloading API in PHP4

2003-08-15 Thread Zeev Suraski
At 01:50 16/08/2003, Rasmus Lerdorf wrote: On Fri, 15 Aug 2003, Rasmus Lerdorf wrote: > On Sat, 16 Aug 2003, Zeev Suraski wrote: > > You can't (reliably) connect to zval's that are passed to the setter > > callback in ZE1, as they're not necessarily reference counted. If you want > > to retain t

Re: [PHP-DEV] Zend bug? Overloading API in PHP4

2003-08-15 Thread Zeev Suraski
At 01:38 16/08/2003, Rasmus Lerdorf wrote: On Sat, 16 Aug 2003, Zeev Suraski wrote: > You can't (reliably) connect to zval's that are passed to the setter > callback in ZE1, as they're not necessarily reference counted. If you want > to retain them, you have to duplicate them (using zval_copy_ctor

Re: [PHP-DEV] Zend bug? Overloading API in PHP4

2003-08-15 Thread Rasmus Lerdorf
On Fri, 15 Aug 2003, Rasmus Lerdorf wrote: > On Sat, 16 Aug 2003, Zeev Suraski wrote: > > You can't (reliably) connect to zval's that are passed to the setter > > callback in ZE1, as they're not necessarily reference counted. If you want > > to retain them, you have to duplicate them (using zval_

Re: [PHP-DEV] Zend bug? Overloading API in PHP4

2003-08-15 Thread Rasmus Lerdorf
On Sat, 16 Aug 2003, Zeev Suraski wrote: > You can't (reliably) connect to zval's that are passed to the setter > callback in ZE1, as they're not necessarily reference counted. If you want > to retain them, you have to duplicate them (using zval_copy_ctor()). > array(1,2,3) is a temporary value th

Re: [PHP-DEV] Scope of zend_alter_ini_entry in Apache module?

2003-08-15 Thread Zeev Suraski
At 09:39 15/08/2003, Mark Morley wrote: In the custom mass hosting module I'm working on I make calls to zend_alter_ini_entry (thanks Uwe!) to dynamically change PHP settings for each virtual host. Works great, but I'm wondering about the scope of this function. If I change a setting, does that

Re: [PHP-DEV] Zend bug? Overloading API in PHP4

2003-08-15 Thread Zeev Suraski
At 01:10 16/08/2003, Rasmus Lerdorf wrote: Did the overloading API in PHP4 actually ever work? Yep. I have done some simple stuff with it in the past, but I tried using it for something real today and it is falling over. I have a very simple example extension which illustrates it. See http://l

[PHP-DEV] Zend bug? Overloading API in PHP4

2003-08-15 Thread Rasmus Lerdorf
Did the overloading API in PHP4 actually ever work? I have done some simple stuff with it in the past, but I tried using it for something real today and it is falling over. I have a very simple example extension which illustrates it. See http://lerdorf.com/ovl.tar.gz For the lazy, here is the m

Re: [PHP-DEV] Re: Question on php_image_type_to_mime_type

2003-08-15 Thread Mehdi Achour
Marcus BöRger wrote: Hello Mehdi, Friday, August 15, 2003, 11:20:52 PM, you wrote: MA> Marcus Börger wrote: Hello Mehdi, Friday, August 15, 2003, 10:47:41 PM, you wrote: MA> Marcus Börger wrote: Hello Mehdi, Friday, August 15, 2003, 10:22:28 PM, you wrote: MA> >>I'm in php-src/ext/sta

Re: [PHP-DEV] Re: Question on php_image_type_to_mime_type

2003-08-15 Thread Marcus Börger
Hello Mehdi, Friday, August 15, 2003, 11:20:52 PM, you wrote: MA> Marcus Börger wrote: >> Hello Mehdi, >> >> Friday, August 15, 2003, 10:47:41 PM, you wrote: >> >> MA> Marcus Börger wrote: >> >> Hello Mehdi, Friday, August 15, 2003, 10:22:28 PM, you wrote: MA> >>I'm i

Re: [PHP-DEV] Re: Question on php_image_type_to_mime_type

2003-08-15 Thread Mehdi Achour
Marcus Börger wrote: Hello Mehdi, Friday, August 15, 2003, 10:47:41 PM, you wrote: MA> Marcus Börger wrote: Hello Mehdi, Friday, August 15, 2003, 10:22:28 PM, you wrote: MA> >>I'm in php-src/ext/standard/image.c (revision 1.92) Looking at php_image_type_to_mime it seems like there are tw

Re: [PHP-DEV] Re: Question on php_image_type_to_mime_type

2003-08-15 Thread Marcus Börger
Hello Mehdi, Friday, August 15, 2003, 10:47:41 PM, you wrote: MA> Marcus Börger wrote: >> Hello Mehdi, >> >> Friday, August 15, 2003, 10:22:28 PM, you wrote: >> >> MA> >>I'm in php-src/ext/standard/image.c (revision 1.92) >> >Looking at php_image_type_to_mime it seems like there are two

Re: [PHP-DEV] [PATCH] inline -> static inline

2003-08-15 Thread Sascha Schumann
On Fri, 15 Aug 2003, Jason Greene wrote: > Apparently there seems to be a bug in SUNs compiler when a static inline > function calls a inline function. This simple patch fixes the problem. Thanks, I have applied the patch. > I would have applied it myself, but I must have lost karma due > to

Re: [PHP-DEV] Re: Question on php_image_type_to_mime_type

2003-08-15 Thread Mehdi Achour
Marcus Börger wrote: Hello Mehdi, Friday, August 15, 2003, 10:22:28 PM, you wrote: MA> >>I'm in php-src/ext/standard/image.c (revision 1.92) Looking at php_image_type_to_mime it seems like there are two constants not handled : IMAGETYPE_JB2 IMAGETYPE_JPX Am I looking at the good version of

Re: [PHP-DEV] Re: Question on php_image_type_to_mime_type

2003-08-15 Thread Marcus Börger
Hello Mehdi, Friday, August 15, 2003, 10:22:28 PM, you wrote: MA> >>I'm in php-src/ext/standard/image.c (revision 1.92) >>>Looking at php_image_type_to_mime it seems like there are two constants >>>not handled : >>> IMAGETYPE_JB2 >>> IMAGETYPE_JPX >>> >>>Am I looking at the good version of

[PHP-DEV] Re: Question on php_image_type_to_mime_type

2003-08-15 Thread Mehdi Achour
>>I'm in php-src/ext/standard/image.c (revision 1.92) Looking at php_image_type_to_mime it seems like there are two constants not handled : IMAGETYPE_JB2 IMAGETYPE_JPX Am I looking at the good version of the C file ? Yes. Shouldn't be corrected ? didou -- PHP Internals - PHP Runtime Develo

[PHP-DEV] [PATCH] inline -> static inline

2003-08-15 Thread Jason Greene
Apparently there seems to be a bug in SUNs compiler when a static inline function calls a inline function. This simple patch fixes the problem. I would have applied it myself, but I must have lost karma due to the cvs reorgs -Jason -- Jason Greene <[EMAIL PROTECTED]> <[EMAIL PROTECT

Re: [PHP-DEV] variable_exists() patch

2003-08-15 Thread walt boring
> $do = DB_DataObject::factory('test'); > $do->birthday = null; > $do->find(); > > to do > SELECT * FROM test WHERE birthday IS NULL; > > but since there was no effective way to detect null, as apposed to > unset.. I had to give up... - If this could be solved by > variable_exists() - even thoug

Re: [PHP-DEV] variable_exists() patch

2003-08-15 Thread Cristiano Duarte
<[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED]> > You can avoid the notice by doing if(isset($var) && !is_null($var)) { } > > We can't have a function for every piece of code. > IMHO, a function to test if a variable exists or not is not "every piece of code". See what is necessary

[PHP-DEV] Re: Question on php_image_type_to_mime_type

2003-08-15 Thread nicos
"Mehdi Achour" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Hi all, Yo Mehdi > > I'm in php-src/ext/standard/image.c (revision 1.92) > Looking at php_image_type_to_mime it seems like there are two constants > not handled : >IMAGETYPE_JB2 >IMAGETYPE_JPX > > Am I

[PHP-DEV] Question on php_image_type_to_mime_type

2003-08-15 Thread Mehdi Achour
Hi all, I'm in php-src/ext/standard/image.c (revision 1.92) Looking at php_image_type_to_mime it seems like there are two constants not handled : IMAGETYPE_JB2 IMAGETYPE_JPX Am I looking at the good version of the C file ? didou -- PHP Internals - PHP Runtime Development Mailing List To un

Re: [PHP-DEV] Bug #23580 ETA

2003-08-15 Thread php
I guess I can take a peek, but to get ramped up on the entire php engine might take longer than just waiting for a fix to become available. Maybe, because this is the only bug that seems to be causing problems on my server(s) at this time it is the most important :) This bug seems to have been ope

Re: [PHP-DEV] variable_exists() patch

2003-08-15 Thread Zeev Suraski
At 12:36 15/08/2003, Thies C. Arntzen wrote: 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(); > >

[PHP-DEV] Re: rack1

2003-08-15 Thread Derick Rethans
On Fri, 15 Aug 2003, Derick Rethans wrote: > I'm going to restore this backup, as we lost too many data, and people > are already updating the DB again. Okay, the backup of the bug database is restored. If people closed bugs in the last day, please check if they have the corrrect status in the

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] Re: PHP 4.3.3RC3 Released

2003-08-15 Thread Ard Biesheuvel
> Wasn't addslashes() designed to escape shell commands and > mysql_escape_string() for MySQL queries? That's right. Ard -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-15 Thread Jedi/Sector One
On Fri, Aug 15, 2003 at 11:19:47AM +0200, Ard Biesheuvel wrote: > 'SELECT ... WHERE id='. (int)$id Even shorter : 'SELECT ... WHERE id='. $id+0 > 'SELECT ... WHERE name=" '.addslashes($name).' " ' Wasn't addslashes() designed to escape shell commands and mysql_escape_string() for MySQL qu

Re: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-15 Thread Ard Biesheuvel
> The problem is string compositing SQL queries. With a SQL command > builder interface, query hacks don't occur. Right now, string > compositing mysql queries with unvalidated input often results in just > minor bugs, as from what I hear the mysql extention can't do chained > queries yet, so the

Re: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-15 Thread Kevin Waterson
This one time, at band camp, "Steven Brown" <[EMAIL PROTECTED]> wrote: > I'll let it drop, but I think your views will result in dangerous > interfaces and I hope you reconsider. If you enable chained queries in > the mysql extension as-is for example, it will enable a massive flood of > hacking.

Re: [PHP-DEV] variable_exists() patch

2003-08-15 Thread nicos
"Walt Boring" <[EMAIL PROTECTED]> a écrit dans le message de news:[EMAIL PROTECTED] > Stefan Walk wrote: > > >On Thu, Aug 14, 2003 at 11:15:51AM -0700, walt boring wrote: > > > > > >>I for one would like to see something like variable_exists(), as I am > >>very annoyed with > >>the logic of isset(

Re: [PHP-DEV] Bug #23580 ETA

2003-08-15 Thread Marcus Börger
Hello php, Friday, August 15, 2003, 9:02:28 AM, you wrote: p> I'm just trying to get a possible ETA on when and if somebody is going p> to look into the bug #23580 (detail below) a bit more. This bug is p> beginning to cause me a whole lot of pain, and if nobody else was p> looking at this maybe

RE: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-15 Thread Derick Rethans
On Thu, 14 Aug 2003, Rasmus Lerdorf wrote: > On Thu, 14 Aug 2003, Steven Brown wrote: > > I found an example of passing unvalidated input into a SQL query, I > > didn't say it would lead to an exploit. The point was, yes, even you > > guys make this mistake. It's not a "Well, you should have lea

Re: [PHP-DEV] Re: PHP 4.3.3RC3 Released

2003-08-15 Thread Marcus Börger
Hello Steven, Friday, August 15, 2003, 8:54:53 AM, you wrote: SB> Btw, it's also never adequate validation to let users inject their own SB> SQL, even in a SELECT. They might add impossibly complex stuff to the SB> where clause and cause your database to wedge for days, or add a 'or 1 = SB> 1'

[PHP-DEV] Bug #23580 ETA

2003-08-15 Thread php
I'm just trying to get a possible ETA on when and if somebody is going to look into the bug #23580 (detail below) a bit more. This bug is beginning to cause me a whole lot of pain, and if nobody else was looking at this maybe I could take a stab at it? --- Bug #23580 - 23580 Open Rando