Hello,
I am experiencing a sudden and serious problem with an OJS 3.1.2-4 installation that had been working normally until yesterday morning.
The journal frontend is now rendered without its normal styling. Inspection of the generated HTML shows that the <head> contains the expected metadata and scripts, but no stylesheet <link> elements are generated at all, although the frontend template still contains:
{load_stylesheet context="frontend"}
The active theme is Health Sciences.
During troubleshooting, I found that:
cache/fc-journalSettings-1.php
was 0 bytes.
I moved this file out of the cache directory. Immediately afterwards OJS briefly became more functional and I was able to access the administration dashboard, although the rendering was still not completely normal.
OJS subsequently recreated fc-journalSettings-1.php, but again as a 0-byte file, and the site returned to its broken state.
My hosting provider has now independently reproduced this behaviour from the server side. They moved fc-journalSettings-1.php out of the cache directory and issued a single curl request. OJS immediately recreated the file at 0 bytes.
The request was:
curl -I 'https://archivi-emozioni.it/'
which returned HTTP/2 302 to /index.php/rivista.
Additional checks:
-
OJS: 3.1.2-4
-
PHP: 7.4.33
-
MariaDB: 10.11.10
-
journal_settingsforjournal_id=1: 125 rows, only 65,856 bytes in total -
the database and journal settings are readable
-
disk quota is nowhere near exhausted
-
other
fc-*cache files are non-zero -
notably,
fc-pluginSettings-0-defaultthemeplugin.phpwas successfully written as a non-zero file on the same day -
OJS also successfully generated
cache/1-pkp-lib.css(approximately 99 KB) -
no relevant PHP error is recorded
-
the hosting provider reports no relevant webserver error and confirms that PHP 7.4.33 is being used
-
no server/PHP update was performed by the hosting provider when the problem appeared
I inspected lib/pkp/classes/cache/FileCache.inc.php. setEntireCache() writes the cache using:
file_put_contents($this->filename, '<?php return ' . var_export($contents, true) . '; ?>', LOCK_EX)
The host has therefore confirmed that, after removing the defective cache file, a new request causes OJS itself to recreate fc-journalSettings-1.php at zero bytes.
Could anyone suggest what could cause this specific cache file to be recreated consistently at 0 bytes, while other fc-* files are written successfully?
I would also be grateful to know whether the missing journal-settings cache could explain the complete absence of stylesheet links from the generated frontend <head>, or whether the stylesheet/theme problem should be investigated separately.
For the moment I have avoided changing the active theme or making further changes to the database, because I do not want to obscure the cause before it is understood.
Thank you very much for any guidance.s problem.
Sotera