I installed Open Web Analytics 1.6.8 with Softaculous about 2 days ago and installed the suggested code from its panel on a test page. But it didn't count my visits.
The HTML/JS code didn't show any errors to hint what was wrong. As soon as I added PHP code, it started showing:
Code
Warning: require_once(/home/exampleusername/public_html/path/to/owa/vendor/autoload.php): failed to open stream: No such file or directory in /home/exampleusername/public_html/path/to/owa/modules/base/classes/browscap.php on line 20
Fatal error: require_once(): Failed opening required '/home/exampleusername/public_html/path/to/owa/vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/exampleusername/public_html/path/to/owa/modules/base/classes/browscap.php on line 20
The OWA GitHub releases page explicitly suggests that using Composer is necessary:
Quote
NOTE: As of this release you must install and run Composer to download dependencies when checking out code from GitHub. ...
But the Softaculous install didn't have "vendor/autoload.php", so it didn't work. I copied a "vendor" directory from a release version I downloaded, and it still showed some error. So I deleted my old site entry from OWA panel and then re-added it. Then added the new code on both HTML and PHP page and it worked!
So I think having the "vendor" directory is necessary for it to work.
|