Recently, I released OJStat 0.1.4, which requires PHP 8.0 or later. I realize that many journals still use older Open Journal Systems (OJS) versions, such as OJS 3.1.1.4, like ours. These versions work in the PHP 7 environment. Therefore, OJStat 0.1.4, released some moments ago, will not work. Realizing this, I tried installing the OJStat 0.1.4 in my OJS running in PHP 7.4 and figured out what issues could arise.

I found that although I updated the composer.json, requiring PHP 7.4, the composer autoloader still requires PHP 8.0. It turned out that one of the packages, the voku/simple_html_dom, requires another package, symfony CSS Selector. This package requires PHP 8.0, at least. To overcome this, I used an older version of the voku/simple_html_dom (^5.0), which also requires an older Symfony CSS Selector (^4.4 || ^5.4). Now, it can work in PHP 7.4.

I also found that calling the session class in the public/index.php also did not work. It turned out that I needed to specify the location where the session is stored. You can look at the mentioned file, uncomment the commented lines, and adjust. Replace YOUR_ROOT_FOLDER_NAME with the path to your tmp folder in your root folder in cPanel.

A few lines in the app/Model/Report_model.php have also been adjusted because the simple_html_dom class used uses a slightly different code compared to the more recent version. You do not need to make any changes unless you find errors that I did not find.

The installation of this OJStat is still the same as OJStat 0.1.4 for PHP 8.0. Do not forget to add the script tags to your OJS so that OJStat can start tracking the visit.



IMPORTANT

I am not sure if this has something to do with OJStat. So, a moment after adding the OJStat script tags (main script and widget script), the OJS TinyMCE plugin turned off. To overcome this, I reuploaded the TinyMCE plugin, which I pulled from the OJS version 3.1.1.4, to the folder plugins/generic. Then, logged in as the Site Administrator, I cleared the template cache. The TinyMCE plugin returned.

I do not upload this OJStat 0.1.4 for PHP 7.4 to GitHub. If you want to use it, you can download it from Mediafire. Please remember that you will need to run composer update and composer dump-autoload before uploading it to your OJS root folder.

Download OJStat version 0.1.4 for PHP 7.4 via Mediafire