PHP: Using browscap.ini on shared host. - ini_set() failing
Posted
by GreybeardTheUnready
on Stack Overflow
See other posts from Stack Overflow
or by GreybeardTheUnready
Published on 2010-03-30T14:19:16Z
Indexed on
2010/03/30
14:53 UTC
Read the original article
Hit count: 285
I'm trying to use get_browser() , unfortunately my page is on a shared host, and I have no access to php.ini.
I have downloaded the latest version of browscap.ini and placed in my document root. I have then added the following:-
if (!ini_set('browscap', '/home/private stuff/browscap.ini')) {
echo "Failed to set browscap";
} else {
echo "browscap = [" . ini_get('browscap') . "]";
}
exit();
But this fails, (nb: the echo statement for the failed condition always shows [] - even if I didn;t have the browscap.ini file the setting should still show up in the ini_get.... shouldn't it?)
I have looked at the previous questions on this and they don't seem to help, any ideas?
© Stack Overflow or respective owner