Rasmus Lerdorf | 1 Mar 2004 06:44

[PHP-DEV] Cleaning up the browscap mess

Guys, given the recent implosion of browscap/get_browser I would like to
find a volunteer to clean up this code.  See http://bugs.php.net/27438 for
the fireworks and http://bugs.php.net/27291 for some background.

I would suggest as a first step to pull it out of ext/standard and create
a pecl extension for it and second to go through and figure out if we can
continue to use the ini parser for this, which I am guessing we can't, so
the third task is likely to write a new parser for it.

I suppose an interim step could be to write a browscap.ini file sanitizer,
but this would be something for the volunteer(s) to decide on.

Any volunteers who feel strongly enough about this stuff to work on it?
Otherwise let's just drop it altogether.  The file this code is meant to
parse has clearly evolved and left the code behind over the years.

-Rasmus

--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Rasmus Lerdorf | 1 Mar 2004 06:50
Picon

Re: [PHP-DEV] Fix for #27291 (get_browser() problems)

Hey Jay, sorry, didn't notice this message until after sending out my
previous request.  How do you feel about taking over maintaining the
browscap code and splitting it off into its own pecl extension so you are
not restricted by PHP's release schedule?

-Rasmus

On Thu, 26 Feb 2004, Jay Smith wrote:

>
> Hey all,
>
> I think I have a fix for the problems in get_browser() as per the bug
> report. (#27291: get_browser matches browscap.ini patterns incorrectly)
>
> Gary Keith, who handles the browscap.ini file we suggest in the
> get_browser() docs, uses IIS/ASP's browscap.dll for his benchmarking and I
> believe I gotten get_browser() to produce the same results as the DLL.
>
> The original bug reporter, Ryan Schmidt, pointed me in the direction of this
> documentation from MSFT:
>
> http://www.microsoft.com/windows2000/en/server/iis/htm/asp/comp1g11.htm
>
> So I basically just implemented what they say there. (The relevant section
> starts with "Note The BrowserType object first attempts to match...")
>
> The basic fix is basically...
>
> - use ^ and $ to anchor the regexes
(Continue reading)

Derick Rethans | 1 Mar 2004 09:16
Picon
Gravatar

Re: [PHP-DEV] Cleaning up the browscap mess

On Sun, 29 Feb 2004, Rasmus Lerdorf wrote:

> I would suggest as a first step to pull it out of ext/standard and create
> a pecl extension for it and second to go through and figure out if we can
> continue to use the ini parser for this, which I am guessing we can't, so
> the third task is likely to write a new parser for it.

If you make it a pecl extension it won't be available to a lot of
people, so I think it's not a good idea to do so.

Derick

--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Derick Rethans | 1 Mar 2004 09:31
Picon
Gravatar

[PHP-DEV] PHP problems (GJK) (fwd)

Hey,

Just wanted to share this nice bit of information.

Date: Sun, 29 Feb 2004 16:57:01 -0500
From: Gary J. Keith <gary <at> garykeith.com>
To: derick <at> php.net
Subject: PHP problems (GJK)

Derick,

If you want an alternative link to a browscap.ini file direct your users to
the one offered by Cyscape/BrowserHawk. Sure it's two years out of date but
what do you care?

Please remove my link or else that link will redirect your users to
somewhere very inhospitable.

Also please note my new Terms of Service that enjoins The PHP Group from
making any use of my files.

Please govern yourselves accordingly.

Very truly yours,
Gary J. Keith

~~~
If you're not on my friend's list please be sure to include Gary J. Keith or
GJK in the Subject of your e-mail to me. Otherwise your e-mail will be
deleted without me ever knowing about it. Thank you for your understanding
(Continue reading)

Rasmus Lerdorf | 1 Mar 2004 09:36
Picon

Re: [PHP-DEV] Cleaning up the browscap mess

On Mon, 1 Mar 2004, Derick Rethans wrote:
> On Sun, 29 Feb 2004, Rasmus Lerdorf wrote:
>
> > I would suggest as a first step to pull it out of ext/standard and create
> > a pecl extension for it and second to go through and figure out if we can
> > continue to use the ini parser for this, which I am guessing we can't, so
> > the third task is likely to write a new parser for it.
>
> If you make it a pecl extension it won't be available to a lot of
> people, so I think it's not a good idea to do so.

You are not exactly helping dispell the Siberia myth here.  Making it a
maintained PECL extension has absolutely nothing to do with the number of
people it is available to.  It has everything to do with disconnecting the
release schedule from PHP's release schedule.  We would still include it
with PHP releases assuming someone actually makes it work.  Currently we
make unmaintained broken code available to a whole lot of people...

-Rasmus

--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Ananth Kesari | 1 Mar 2004 10:24
Picon
Favicon

Re: [PHP-DEV] Improved NetWare diff - 2.

Hi,

I sent you, a few days back, the improved NetWare diff for PHP 5.0
after incorporating all the comments given to me earlier. I am sure
you are busy with PHP 5.0 development and releases. Just to remind
you that I still haven't received any communication from you about
whether the latest diff is good enough to be checked in. If not, I
would like to know what further modifications need to be made?

Expecting your feedback on this.

Thanks,
Ananth.

>>> "Ananth Kesari" <hyanantha <at> novell.com> 2/26/2004 4:47:47 PM >>>
Hi,

Both with Apache 1.3 and with Apache 2.0, we could see memory leaks
even if we execute static html pages and not php scripts. This patch
fixes this problem, but is under #ifdef NetWare. See the files:
sapi/apache/mod_php5.c and sapi/apache2filter/sapi_apache2.c.
If it is deemed so, then we can make this fix generic so that it
applies
to all platforms.

Thanks,
Ananth.

>>> "Ananth Kesari" <hyanantha <at> novell.com> 2/26/2004 4:40:55 PM >>>
Hi,
(Continue reading)

Andi Gutmans | 1 Mar 2004 14:37
Favicon

Re: [PHP-DEV] Segfault in HEAD

This should be fixed now. Thanks for the short reproducing script.

Andi

At 11:41 PM 2/26/2004 +0100, Stefan Walk wrote:
>Hi, after a cvs update i get a segfault with this script:
><?php
>class test
>{
>   function __destruct() {
>         $this->foo = false;
>   }
>   public function start() {
>     throw new Exception();
>   }
>}
>
>   $test = new test();
>   $test->start();
>
>?>
>
>Backtrace:
>#0  0x00000000 in ?? ()
>#1  0x081656a2 in execute (op_array=0x40206284) at 
>/home/et/cvs.php.net/php-src/Zend/zend_execute.c:1339
>#2  0x0814790e in zend_call_function (fci=0xbfffd400, fci_cache=0xbfffd3e0)
>     at /home/et/cvs.php.net/php-src/Zend/zend_execute_API.c:759
>#3  0x0815924c in zend_call_method (object_pp=0xbfffd48c, 
>obj_ce=0x40204c84, fn_proxy=0x0,
(Continue reading)

Andrey Hristov | 1 Mar 2004 14:03

[PHP-DEV] Segfault in Reflection

  Hi,
this :
php -r 'class a{function a(){}} $a=new Reflection_Class("a");$b=$a->getMethod("a"); 
$b->invoke(NULL);'

segfaults on my machine and generates bus error on Jan Lehnardt's machine.

Andrey

--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Andi Gutmans | 1 Mar 2004 14:55
Favicon

Re: [PHP-DEV] Segfault in Reflection

Did this happen after my commit or is it a general problem?

Andi

At 02:03 PM 3/1/2004 +0100, Andrey Hristov wrote:
>  Hi,
>this :
>php -r 'class a{function a(){}} $a=new 
>Reflection_Class("a");$b=$a->getMethod("a"); $b->invoke(NULL);'
>
>segfaults on my machine and generates bus error on Jan Lehnardt's machine.
>
>Andrey
>
>--
>PHP Internals - PHP Runtime Development Mailing List
>To unsubscribe, visit: http://www.php.net/unsub.php

--

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Hans Lellelid | 1 Mar 2004 15:03

Re: [PHP-DEV] Iterator Class/foreach Logic Flaw?

Hi Marcus,

Andrei Zmievski wrote:
> On Thu, 26 Feb 2004, Philip Fletcher wrote:
> 
>>Looking at the documentation, the comments and method name (for hasMore())
>>do not have the same meaning - the comment is saying 'does the current
>>element exist?' and the method name says 'are there any more elements?'.
>>
>>This makes the api very ambiguous - hasMore() and isValid() have very
>>specific meaning in many languages wrt iterators.
> 
> 
> I agree. The semantics are fairly different. Let's not confuse them.
> 

I also agree strongly with the need for this to get fixed before PHP 
goes to release.  IMO the current hasMore() is very misleading and has 
the result that people can't intuitively use it outside of the foreach() 
context.

Whether the method is called isValid() or something else that makes 
sense is less important to me, but providing an intuitive interface that 
won't leave code users scratching their heads or submitting bug reports 
for what appears to be faulty implementing iterator logic is really 
important.

BTW, Iterators are awesome(!), and it's only because they are so awesome 
& everyone will use them that I think this is important to address 
before release.
(Continue reading)


Gmane