Re: cvs: /phpdoc/chapters config.sgml /phpdoc/functions misc.sgml
| From: | Lars Torben Wilson | Date: | Wed, 22 Sep 1999 17:09:20 +0000 |
| Subject: | Re: cvs: /phpdoc/chapters config.sgml /phpdoc/functions misc.sgml | ||
| References: | 1 2 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-11204@lists.php.net to get a copy of this message | ||
Adam Trachtenberg writes:
> On Tue, 21 Sep 1999, Lars Torben Wilson wrote:
>
> > I just checked out 3.0.5 and tried it. Damn thing refuses to
> > segfault. :( I think I'll leave it as it is an let someone with better
> > knowledge of Zend's internal structure take care of it (unless I can
> > figure it out myself first ;).
>
> Check out my message in the archives: some additional research showed that
> get_browser() works if you place the config directive in the php.ini file,
> but not the apache.conf one.
>
> “‚1àv—Ê
> T×’http://www.progressive-comp.com/Lists/?l=php3-general&m=91651828330984&w=2
>
> This was later confirmed by others.
>
> -adam
OK; this doesn't appear to be the case here (assuming the config
directive to which you refer is the browscap file location). strace
shows the file being found and read. However, uncommenting line 403 in
the PHP4 configuration-parser.y seems to show that browscap.ini never
actually gets parsed, which would explain the following:
<?php
// This script does not segfault.
$browser = get_browser( 'Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i686)' );
// echo $browser->browser_name_pattern . "\n";
?>
<?php
// This script segfaults.
$browser = get_browser( 'Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i686)' );
echo $browser->browser_name_pattern . "\n";
?>
The corresponding line (370) in PHP3's configuration-parser.y, when
uncommented, spews out each definition from browscap.ini as it is
parsed.
So I have no idea. I'll keep hacking on it in my spare time, but I
figure someone who knows the parser would likely be able to fix it in
about five seconds, so it's not really high priority for me.
Torben