Comments (21)
In my local copy of my application, I get almost all data, but the data version (major, minor, patch) are always zero, for browser and os.
from browser-detect.
hm! i dont have ip, browser ....
from browser-detect.
If you use L4.* then it has to work perfectly fine, if it isn't then check your permissions maybe the cache file is not readable? or look up the log.
from browser-detect.
no this is with laravel 5.1
from browser-detect.
send in a dump please.
var_dump($SERVER, YourBrowserDetectAlias::detect());
from browser-detect.
what is the Server variale?
from browser-detect.
object(hisorange\BrowserDetect\Result)#273 (1) { ["attributes":protected]=> array(17) { ["isMobile"]=> bool(false) ["isTablet"]=> bool(false) ["isDesktop"]=> bool(true) ["isBot"]=> bool(false) ["browserFamily"]=> string(25) "HiSoRange Generic Browser" ["browserVersionMajor"]=> int(0) ["browserVersionMinor"]=> int(0) ["browserVersionPatch"]=> int(0) ["osFamily"]=> string(20) "HiSoRange Generic OS" ["osVersionMajor"]=> int(0) ["osVersionMinor"]=> int(0) ["osVersionPatch"]=> int(0) ["deviceFamily"]=> string(0) "" ["deviceModel"]=> string(0) "" ["mobileGrade"]=> string(0) "" ["cssVersion"]=> int(0) ["javaScriptSupport"]=> bool(true) } }
from browser-detect.
Sorry meant $_SERVER, wrote at night.
from browser-detect.
Btw seems like the plugin does not getting the $_SERVER['HTTP_USER_AGENT'] string so try with
var_dump(YourBrowserDetect::detect($_SERVER['HTTP_USER_AGENT']);
from browser-detect.
<div class="col-sm-6">
<div class="panel panel-primary">
<div class="panel-heading">
{{trans('news.news')}}
</div>
<div class="panel-body">
<div class='container-fluid'>
{{var_dump(BrowserDetect::detect($_SERVER['HTTP_USER_AGENT']))}}
</div>
</div>
</div>
</div>
its the same result:
object(hisorange\BrowserDetect\Result)#272 (1) { ["attributes":protected]=> array(17) { ["isMobile"]=> bool(false) ["isTablet"]=> bool(false) ["isDesktop"]=> bool(true) ["isBot"]=> bool(false) ["browserFamily"]=> string(25) "HiSoRange Generic Browser" ["browserVersionMajor"]=> int(0) ["browserVersionMinor"]=> int(0) ["browserVersionPatch"]=> int(0) ["osFamily"]=> string(20) "HiSoRange Generic OS" ["osVersionMajor"]=> int(0) ["osVersionMinor"]=> int(0) ["osVersionPatch"]=> int(0) ["deviceFamily"]=> string(0) "" ["deviceModel"]=> string(0) "" ["mobileGrade"]=> string(0) "" ["cssVersion"]=> int(0) ["javaScriptSupport"]=> bool(true) } }
from browser-detect.
The "Generic Browser" is a replacment string for cases when the $_SERVER['HTTP_USER_AGENT'] is missing, so from this I guess you calling this through php built in server where the field is empty, if not then look into your environment cuz thats a generic header.
from browser-detect.
i searched but i dont know what i have to do! can you help me?
from browser-detect.
Please do this dump, with this I can see if it's your server config or your app setup is wrong.
file_put_contents('dump.txt', json_encode($_SERVER, BrowserDetect::detect(), config(), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
After you call this, attach the dump.txt in your next comment here.
from browser-detect.
json_encode() expects at most 3 parameters, 4 given (View: C:\Users\lango\Desktop\fifapic\fifapic\resources\views\front\index.blade.php)
i'll try to fix it but i dont know what your parameters do
from browser-detect.
I did it in 3 lines and 3 files
Here the files:
dump1.txt
dump2.txt
dump.txt
from browser-detect.
Uhm sorry I should stop writing code at 4am XD Wanted to dump all the var at once with an array
file_put_contents('dump.txt', json_encode(array($_SERVER, BrowserDetect::detect(), config()), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
like this, but it's good as you sent it.
So, what I can see is a weird dump: you using a normal dev server not a built in and the $_SERVER contains the UA string, also you are on windows so it can't be permission problem; Which means everything should work correctly but seems like the BD not even running a single plugin.
I have just pushed a new commit to the dev-master which will check if there is any problem with your plugin configuration and will throw an InvalidPluginListException. Please pull the newest version and tell me if you getting this error or not.
from browser-detect.
i removed the package and did a new download (i dont know another solution for force an update)
here the dump.txt but it seems to be the same.
dump.txt
from browser-detect.
To update to the current dev-master change your composer.json to
{
"require": {
"// other packages... this is just an example"
"hisoranger/browser-detect": "dev-master"
}
}
then run this.
composer update
This will pull the current dev-master branch.
from browser-detect.
i'm an idiot! :D
i saw it now and wanted to change my post. sorry.
from browser-detect.
Hmm this is getting problematic since my last guess was that your plugin setup isn't loading but with the current dev-master that is not possible to go through without any plugin.
Is this happening when you test is with other browsers like an old IE too?
Because maybe that you didn't activated the cache update and you still using the 2 year old cache in the pack?
There is a cache/Browscap folder in the plugin empty it please.
from browser-detect.
from browser-detect.
Related Issues (20)
- Windows 11 is being detected as Windows 10 HOT 2
- Undefined type 'hisorange\BrowserDetect\Contracts\ResultInterface'.
- isInApp returns true with Android Chrome Browser 102.0.5005.78 HOT 1
- Deprecation Message on PHP 8.1: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated
- Latest version has wrong user agent retriever HOT 2
- Doesn't detect certain mobile devices HOT 4
- Detect TWA or PWA request HOT 3
- Google-Safety and Google are not considered bots HOT 5
- Browser::isMac() does not seem to work on some UA with iPad/iPod/iPhone in it HOT 1
- macOS version info HOT 1
- Laravel 10/11 HOT 1
- PHP 8 and Laravel 10 HOT 2
- Fetal Error when using Browser::isAndroid() HOT 1
- iPad detection not working HOT 1
- For 6.0.0 HOT 1
- In App User Agents are showing as Tablets HOT 3
- Problem of mobiledetect/mobiledetectlib version HOT 3
- Add support for Laravel 11 HOT 1
- Class "Spyc" not found error HOT 8
- Wrong detection HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from browser-detect.