ID: 27500 Comment by: godfather at gmx dot net Reported By: cvachon at bluenodes-technologies dot com Status: No Feedback Bug Type: Output Control Operating System: XP PHP Version: 4.3.5RC3 New Comment:
Big Sorry, with a capital "S" for my previous maybe little sarcastic comment. The problem is exactly as described in bug #27372 I just found out that the error is not displayed on the output page or when starting up apache in the commandline box as I assumed. No, it is only readable in the apache error log. The problem is the following line in the browscap.ini: browser=Yahoo! Slurp I removed the exclamation mark (!) and then it worked. Wow! Sorry again, please no hard feelings. Previous Comments: ------------------------------------------------------------------------ [2004-03-31 19:26:46] godfather at gmx dot net Thank you cvachon for posting this already. I just upgraded my PHP version from 4.3.0 to the new 4.3.5 final release, because in the ChangeLog someone wrote, that this stupid (but very very important) issue with the get_browser function finally would be fixed. I was soooooo happy reading this. Even more disappointing it was, after I found out, that the version 4.3.5 obviously improved NOTHING. Even worse the function doesn't only NOT recognize certain browsers, but now it sems to NOT recognize ANY browser. So what kind of 'bugfix' was that. Maybe more of a 'bugreplacement'. I use: ---------------- OS: Windows 2000 PHP: 4.3.5 - I installed PHP 4.3.5. - Downloaded the latest browscap.ini from March 8, 2004. - Set the path in php.ini to point to browscap.ini. - Start Apache, everything loads fine, no errors, no complaints. Then I tried your (php.net) example code on the manual page for the get_browser function: http://www.php.net/manual/de/function.get-browser.php And this is the output of my three browsers (IE 5.5, NS 6.2, NS 4.8) which I have installed: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) -------------------------------------------------- 0: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:0.9.4) Gecko/20011019 Netscape6/6.2 -------------------------------------------------- 0: Mozilla/4.8 [en] (Windows NT 5.0; U) -------------------------------------------------- 0: Note: The "0:" (Zeros) above is the output of the get_browser function. There is NO ERROR, NO WARNING or anything. In my opinion the expected object it simlpy empty. Reproduce the error: -------------------- Just the exact simple way as cvachon above described the original problem. Then I tried an older browscap.ini (unfortunately it is very very old from October 2000). Aha! Now it works, but of course it didn't recognize Netscape 4.8, because that browser wasn't listet in that real ancient browscap.ini, yet. Now I wonder: Who ever 'fixed' that bug. I think it was you, Jay. Did you work with a new version of browscap.ini? Here follows a few other remarks regarding this bug report: ----------------------------------------------------------- - Yes it is not only cvachon who experienced that bug, there is others. - No, Jay, it's not the same problem reported in bug #27372. Because no error occurs on starting apache. Everything SEEMS fine, but it isn't at all. - And sniper, feel free to recognize this as FEEDBACK, even though it didn't come from the original poster. I hope you set the status of this bug to open again, because it IS NOT RESOLVED. Isn't it a shame, that PHP is so powerful and yet it can't even recognize a browser! Thank you for hopefully fix this for real. Even though Derick mentioned on this other related bugreport (http://bugs.php.net/bug.php?id=27372), that nothing will be done for PHP 4 anymore regarding get_browser. Which I find very very disappointing. Thanks again. I still hope. ------------------------------------------------------------------------ [2004-03-10 19:52:01] [EMAIL PROTECTED] No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2004-03-05 11:51:10] [EMAIL PROTECTED] Could you check to make sure you're not experiencing the same problem as has been reported in bug #27372? http://bugs.php.net/bug.php?id=27372 J ------------------------------------------------------------------------ [2004-03-04 18:23:54] cvachon at bluenodes-technologies dot com Description: ------------ Hi! I downloaded the latest "browsecap.ini" (2004-02-29 23:03:10 GMT ) file yesterday and it generates a bug within PHP function "get_browser". This function is supposed to return an Object but with this file version, it returns nothing. I have PHP 4.3.5RC3 under XP. And I even tried downgrading to my last PHP version (4.3.4RC3) and the result is the same... My conclusion is based on the fact that I downgraded to an ancient version of the file "browsecap.ini" (2003-09-21 22:04:18 GMT) and it's working with this one... Thanks! Reproduce code: --------------- $browser = get_browser($_SERVER["HTTP_USER_AGENT"]); Expected result: ---------------- Object Actual result: -------------- //* $browser is null and does not have any properties set. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=27500&edit=1