dmolsen / Detector

Detector is a simple, PHP- and JavaScript-based browser- and feature-detection library that can adapt to new devices & browsers on its own without the need to pull from a central database of browser information.
http://detector.dmolsen.com/
MIT License
847 stars 80 forks source link

Fatal error: require_once() Failed opening required /...spyc.php in /...UAParser.php on line 27 #31

Open carpusmedia opened 10 years ago

carpusmedia commented 10 years ago

Hello,

We are getting the following error when installing and configuring Detector:

Warning: require_once(/.../spyc.php) [function.require-once]: failed to open stream: No such file or directory in /.../UAParser.php on line 27

Fatal error: require_once() [function.require]: Failed opening required '/.../spyc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /.../UAParser.php on line 27

We use PHP v5.4.

Thanks, Chris

carpusmedia commented 10 years ago

Replacing all instances of DIR with realpath(dirname(FILE)) in UAParser.php solved the issue.

Thanks, Chris