Why isn't my wamp browsecap has a local or master value

153 views Asked by At

Hi i have set the browsecap path correctly in my wamp php.ini, but i keep on getting `

Warning: get_browser(): browscap ini directive not set

then i print a phpinfo() it shows that browsecap does not have local or master value,

but i configured php.ini as follows

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

browscap = "C:\wamp\bin\php\full_php_browscap.ini"

2

There are 2 answers

0
RiggsFolly On

Ok there are a couple of obvious possibilities.

First you should use the UNIX directory seperator and not the DOS seperator. Remember this is PHP and a \ in double quoted string literals is an escape character.

So first try

browscap = "C:/wamp/bin/php/full_php_browscap.ini"

Secondly, and this is the most likely issue, there are 2 php.ini files in the \wamp\bin\php\{phpversion}\ folder, one called

php.ini          - which is used by the PHP CLI ( Command Line Interface )
phpForApache.ini - which is used when running PHP via Apache

Make sure you have updated phpForApache.ini.

If you use the WAMPServer menus like so wampmanager->PHP->php.ini it will automatically open the correct file for editing. I would guess this is what you have done wrong.

0
protanvir993 On

simply download browscap.ini from http://browscap.org and rename it as browscap.ini then paste it into

C:\wamp\bin\php\php5.5.12\extras

then configure your php.ini as browscap

C:\wamp\bin\php\php5.5.12\extras\browscap.ini

and save it.

Then click your wamp server > stop all services and then click start all services