#28545 [Com]: get_browser detecting spambot

2004-05-28 Thread php_bugs at garykeith dot com
 ID:   28545
 Comment by:   php_bugs at garykeith dot com
 Reported By:  gerwout at eigenwijze dot nl
 Status:   Bogus
 Bug Type: Feature/Change Request
 Operating System: all
 PHP Version:  4.3.6
 New Comment:

Thank you for a good suggestion. I already have such a thing in my
browscap.ini file. Spammy or abusive user agents get put into the
Website Strippers category. It's the single biggest category in my
browscap.ini file. ~gary.


Previous Comments:


[2004-05-27 21:40:25] [EMAIL PROTECTED]

You'll have to contact the browscap.ini file maintainer 
for this sort of thing. See 
 
http://www.garykeith.com/ 
 
J 



[2004-05-27 19:46:28] gerwout at eigenwijze dot nl

Description:

Maybe this isn't a PHP feature request, but more a browscap related
featurerequest, but the manual refers to a special php browscap.ini
file, so it could be added. 
Currently the get_browser function returns an object which contains
crawler, very handy, because we can easily detect searchengines now :-)
In my opinion the returned object should also contain the variable
spambot. Now we can detect a spambot on a simulair way.






-- 
Edit this bug report at http://bugs.php.net/?id=28545edit=1


#24243 [Com]: Browscap causes segfault

2003-07-16 Thread php_bugs at garykeith dot com
 ID:   24243
 Comment by:   php_bugs at garykeith dot com
 Reported By:  neon at neon-line dot net
 Status:   Verified
 Bug Type: Zend Engine 2 problem
 Operating System: FreeBSD 4.8-stable
 PHP Version:  5CVS-2003-06-18 (dev)
 New Comment:

As the offical source of browscap.ini for PHP I have to let you know
that I'd love to modify the files I distribute to include quotes in the
browser name. Unfortunately in IIS the quotes are included as part of
the browser name. So as much as I'd like to help I guess we'll just
have to wait for a bug fix.

-gary.


Previous Comments:


[2003-06-18 11:17:03] [EMAIL PROTECTED]

As a temporary fix, you can put quotation marks around 
LWP::Simple where it says browser=LWP::Simple in 
browscap.ini. It's the double-colons that are messing 
things up, as zend_get_constant is trying to do a class 
lookup on the lwp class, which will obviously fail. 
 
Perhaps a flag argument could be added to 
zend_get_constant to prevent checking for '::' and that 
class lookup? (Or rather, zend_get_constant_ex or whatever 
with new defines for BC?)  
 
J 



[2003-06-18 07:28:39] [EMAIL PROTECTED]

This is some ZE2 issue.



[2003-06-18 06:37:49] neon at neon-line dot net

Browscap causes this segfault. Without it everything goes like it
should.



[2003-06-18 06:12:58] neon at neon-line dot net

Description:

Segmentation fault with php -v

Reproduce code:
---
php -v

Expected result:

PHP 5.0.0-dev (cli) (built: Jun 18 2003 08:06:52) (DEBUG)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v2.0.0, Copyright (c) 1998-2003 Zend Technologies


Actual result:
--
(gdb) run -v
Starting program: /usr/home/neon/php5-200306180930/sapi/cli/php -v

Program received signal SIGSEGV, Segmentation fault.
0x810c437 in zend_hash_find (ht=0x0, arKey=0xbfbfe988 lwp,
nKeyLength=4, pData=0xbfbfe9c8) at
/usr/home/neon/php5-200306180930/Zend/zend_hash.c:840
840 nIndex = h  ht-nTableMask;
(gdb) bt
#0  0x810c437 in zend_hash_find (ht=0x0, arKey=0xbfbfe988 lwp,
nKeyLength=4, pData=0xbfbfe9c8) at
/usr/home/neon/php5-200306180930/Zend/zend_hash.c:840
#1  0x8100732 in zend_lookup_class (name=0xbfbfe988 lwp,
name_length=3, ce=0xbfbfe9c8) at
/usr/home/neon/php5-200306180930/Zend/zend_execute_API.c:703
#2  0x80ff2b8 in zend_get_constant (name=0x81d0880 LWP::Simple,
name_len=11, result=0xbfbfea00)
at /usr/home/neon/php5-200306180930/Zend/zend_constants.c:251
#3  0x80f71c8 in zend_ini_get_constant (result=0xbfbfea70,
name=0xbfbfead0) at Zend/zend_ini_parser.c:121
#4  0x80f77a8 in ini_parse () at Zend/zend_ini_parser.c:928
#5  0x80f72ea in zend_parse_ini_file (fh=0xbfbff8f0,
unbuffered_errors=1, ini_parser_cb=0x8091560 php_browscap_parser_cb,
arg=0x8170e60)
at Zend/zend_ini_parser.c:176
#6  0x809180c in zm_startup_browscap (type=1, module_number=2) at
/usr/home/neon/php5-200306180930/ext/standard/browscap.c:165
#7  0x808cc6f in zm_startup_basic (type=1, module_number=2) at
/usr/home/neon/php5-200306180930/ext/standard/basic_functions.c:1084
#8  0x8109d46 in zend_startup_module (module=0x8167460) at
/usr/home/neon/php5-200306180930/Zend/zend_API.c:1126
#9  0x80ded27 in php_startup_extensions (ptr=0x816fc88, count=7) at
/usr/home/neon/php5-200306180930/main/main.c:1222
#10 0x812f7b1 in php_startup_internal_extensions () at
main/internal_functions_cli.c:62
#11 0x80df115 in php_module_startup (sf=0x816fbe0,
additional_modules=0x0, num_additional_modules=0) at
/usr/home/neon/php5-200306180930/main/main.c:1387
#12 0x812e8aa in main (argc=2, argv=0xbfbffb88) at
/usr/home/neon/php5-200306180930/sapi/cli/php_cli.c:592






-- 
Edit this bug report at http://bugs.php.net/?id=24243edit=1