The Little Guy Posted September 17, 2008 Share Posted September 17, 2008 How do I set up my browscap.ini file? here is what I tried: ini_set('browscap','../php_browscap.ini'); print_r(get_browser(null,TRUE)); Error: Warning: get_browser() [function.get-browser]: browscap ini directive not set Link to comment https://forums.phpfreaks.com/topic/124597-solved-browscap/ Share on other sites More sharing options...
ratcateme Posted September 17, 2008 Share Posted September 17, 2008 have you read the notes on get_browser() at php.net Scott. Link to comment https://forums.phpfreaks.com/topic/124597-solved-browscap/#findComment-643540 Share on other sites More sharing options...
The Little Guy Posted September 17, 2008 Author Share Posted September 17, 2008 Yes, I can't get this... Link to comment https://forums.phpfreaks.com/topic/124597-solved-browscap/#findComment-643545 Share on other sites More sharing options...
ratcateme Posted September 17, 2008 Share Posted September 17, 2008 try if(!file_exists('../php_browscap.ini'){ echo "Browser file is not there or permissions say php cant view it"; exit; } Scott. Link to comment https://forums.phpfreaks.com/topic/124597-solved-browscap/#findComment-643548 Share on other sites More sharing options...
The Little Guy Posted September 17, 2008 Author Share Posted September 17, 2008 it echoed out "File found". I did this: if(!file_exists('../php_browscap.ini')){ echo "Browser file is not there or permissions say php cant view it"; }else{ echo "File found"; } Link to comment https://forums.phpfreaks.com/topic/124597-solved-browscap/#findComment-643550 Share on other sites More sharing options...
ratcateme Posted September 17, 2008 Share Posted September 17, 2008 try setting it like this var_dump(ini_set('browscap','../php_browscap.ini')); Scott. Link to comment https://forums.phpfreaks.com/topic/124597-solved-browscap/#findComment-643556 Share on other sites More sharing options...
The Little Guy Posted September 17, 2008 Author Share Posted September 17, 2008 bool(false) Link to comment https://forums.phpfreaks.com/topic/124597-solved-browscap/#findComment-643568 Share on other sites More sharing options...
ratcateme Posted September 17, 2008 Share Posted September 17, 2008 the ini_set is failing do you have access to the php.ini you could try to set it in there. Scott. Link to comment https://forums.phpfreaks.com/topic/124597-solved-browscap/#findComment-643569 Share on other sites More sharing options...
The Little Guy Posted September 17, 2008 Author Share Posted September 17, 2008 I finally got it! I modified my php.ini file. Link to comment https://forums.phpfreaks.com/topic/124597-solved-browscap/#findComment-643577 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.