So I tried to download browscap.ini and when I find the browser it just says 'default browser'. I tried all of these: http://tempdownloads.browserscap.com/ and restarted apache but nothing happened, help?

Recommended Answers

Dude,

I thought browserscap is just for IIS? I am not sure, but can you double check and make sure you've got the right version for your server..

Jump to Post

All 4 Replies

Dude,

I thought browserscap is just for IIS? I am not sure, but can you double check and make sure you've got the right version for your server..

No, on the xampp server it is used for detecting the browser. But the forums say I need to update it for PHP however it doesn't do anything when I update it.

ok, now I know what you are talking about..

open xampp/php/php.ini file
look for

[browscap]
 ; http://php.net/browscap
 ;browscap = ""

change it to

[browscap]
; http://php.net/browscap
browscap = "C:\xampp\php\extras\browscap.ini"

The above is an assumed location of your xampp.
Place the browscap.ini inside the xampp/php/extras/ directory

Restart you xampp
clear you browsers history
run your php script to test browscap

I have already done that, it still shows 'Default Browser' instead of 'chrome' or 'morzilla'.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.