OJS 3.1.2-4: fc-journalSettings-1.php consistently regenerated as a 0-byte file and stylesheets no longer loaded

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_settings for journal_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.php was 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

Hi @Sotera,

As per your previous post, OJS 3.1 is severely outdated and an update to a later, supported version of OJS is highly recommended.

-Roger
PKP Team

@rigillis, Thank you, Roger. I understand, and I agree that upgrading OJS is now the appropriate course of action.

I therefore intend to make a complete backup of the current installation and database and then have the journal migrated/upgraded to a currently supported version of OJS, preferably first in a staging environment, so that the integrity of the journal’s contents, submissions, user data, and files can be verified before the new version replaces the present installation.

Given the age of our current OJS installation, I will seek professional technical assistance for this process rather than attempting the upgrade directly on the production site.

Thank you for your advice and for pointing me to the relevant documentation.

Best regards,
Sotera