Jump to content

Error with get_browser();


Thierry

Recommended Posts

I'm having trouble with get_browser(), returning the error:

 

"Warning: get_browser(): browscap ini directive not set."

 

I've looked it up and it turns out I didnt have a browscap.ini file and link to it in php.ini

I've gotten a browscap.ini file now and I put it in the php root folder (same folder as php.ini), and I've tried various URLs but the function still wont work.

 

I've tried: "browscap.ini, /php/browscap.ini/, D:/folder1/folder2/folderetc/php/browscap.ini/ and more but none seem to work"

And yes, I've removed the ';' so it should be active.

Link to comment
Share on other sites

I guess the solution to your problem depends on which OS you use... if you are using windows try using \ (backslahes) instead of / (slashes):

 

D:\folder1\folder2\folderetc\php\browscap.ini

 

The path must be absolute I think, so you have to include the whole path.

 

But before you try that, try remove the trailing slash... it should be ...php\browscap.ini and not ..php\browscap.ini\. The trailing slash indicates that you are pointing at a directory and not a file :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.