I am facing a problem downloading PDFs. In January, we upgraded from 2.4.8 to 3.2.1.0.
At the moment, with OJS 3.2.1.0 and PHP 7.2.29, I have uploaded a new issue of the journal, which displays correctly.
For each article, the preview opens in the browser, the download starts and finishes, but the error “format error: the file is not a PDF or is damaged” appears when I try to open the file.
On the server side, the PDFs are readable in the folder that stores the publicly uploaded files.
I have read about possible conversion issues during download, but I cannot figure out how to resolve it.
I hope you can help us.
Thank you.
Giusy
What application are you using?
OJS 3.2.1.0. PHP 7.2.29
Additional information
We are waiting to switch from a Windows server to Linux in order to work on a newer, updated version of OJS.
On the dashboard side, I have noticed a difficulty in loading the Plugins and Static Pages. This is another reason why we need to hurry up and migrate to the new server, but in the meantime, we would like users to be able to download the article files.
OJS 3.2.1 is out of date and not safe to run. It’s possible that your installation has been attacked through a known (disclosed) vulnerability and that’s why you’re encountering these problems, but I’d suggest checking your PHP error log for details.
Currently anything older than 3.3.0-x is not maintained; once you’re on at least 3.3.0-x, it’s still important to stay up to date with the latest release.
If you can share details from the PHP error log, I may be able to help further.
Regards,
Alec Smecher
Public Knowledge Project Team
The PHP error log has just been enabled. Here are the errors:
[13-Mar-2026 15:57:58 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 15:59:13 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:04:47 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:05:46 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:07:11 Europe/Rome] PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\www\lib\pkp\lib\vendor\adodb\adodb-php\adodb.inc.php on line 3992
[13-Mar-2026 16:09:41 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:11:06 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:11:10 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:11:18 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:11:22 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:11:23 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:13:19 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:13:21 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:13:42 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:14:19 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:18:19 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:18:22 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:18:25 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:18:27 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:18:45 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:18:46 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:19:11 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:20:03 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:20:39 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:21:22 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:21:35 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:24:40 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:28:40 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:28:54 Europe/Rome] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Sokil\IsoCodes\Database\Countries::getByAlpha2() must be of the type string, null given, called in C:\www\pages\search\SearchHandler.inc.php on line 272 and defined in C:\www\lib\pkp\lib\vendor\sokil\php-isocodes\src\Database\Countries.php:42
Stack trace: #0 C:\www\pages\search\SearchHandler.inc.php(272): Sokil\IsoCodes\Database\Countries->getByAlpha2(NULL) #1 C:\www\lib\pkp\classes\core\PKPRouter.inc.php(391): SearchHandler->authors(Array, Object(Request)) #2 C:\www\lib\pkp\classes\core\PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false) #3 C:\www\lib\pkp\classes\core\Dispatcher.inc.php(143): PKPPageRouter->route(Object(Request)) #4 C:\www\lib\pkp\classes\core\PKPApplication.inc.php(279): Dispatcher->dispatch(Object(Request)) #5 C:\www\index.php(68): PKPApplication->execute() #6 {main}
thrown in C:\www\lib\pkp\lib\vendor\sokil\php-isocodes\src\Database\Countries.php on line 42
[13-Mar-2026 16:29:20 Europe/Rome] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Sokil\IsoCodes\Database\Countries::getByAlpha2() must be of the type string, null given, called in C:\www\pages\search\SearchHandler.inc.php on line 272 and defined in C:\www\lib\pkp\lib\vendor\sokil\php-isocodes\src\Database\Countries.php:42
Stack trace: #0 C:\www\pages\search\SearchHandler.inc.php(272): Sokil\IsoCodes\Database\Countries->getByAlpha2(NULL) #1 C:\www\lib\pkp\classes\core\PKPRouter.inc.php(391): SearchHandler->authors(Array, Object(Request)) #2 C:\www\lib\pkp\classes\core\PKPPageRouter.inc.php(231): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false) #3 C:\www\lib\pkp\classes\core\Dispatcher.inc.php(143): PKPPageRouter->route(Object(Request)) #4 C:\www\lib\pkp\classes\core\PKPApplication.inc.php(279): Dispatcher->dispatch(Object(Request)) #5 C:\www\index.php(68): PKPApplication->execute() #6 {main}
thrown in C:\www\lib\pkp\lib\vendor\sokil\php-isocodes\src\Database\Countries.php on line 42
[13-Mar-2026 16:29:28 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:29:57 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:31:10 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:31:27 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:33:53 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:34:25 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:34:54 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:35:08 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:35:17 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:35:39 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:35:43 Europe/Rome] ojs2: 404 Not Found
[13-Mar-2026 16:36:55 Europe/Rome] ojs2: 404 Not Found
We are setting up the new server and want to install the latest stable version. We are unsure how to transfer the archive from the old server to the new one. In the current version of OJS, due to these issues, we cannot access the plugins page to export issues and articles.
What do you recommend we do? Thank you for the support.
There is no need to use the import/export tools to upgrade to a new version of OJS; follow the directions in the PKP documentation hub, and in docs/UPGRADE.md in the OJS 3.3.0-x package.
Regards,
Alec Smecher
Public Knowledge Project Team
The server currently in use runs on Windows Server. OJS is version 3.1.2. We are unable to resolve the file download error; you can see it for yourself here: rifl.unical.it
In addition to this problem, when I log in as an administrator, many pages (e.g. plugins, static pages) are stuck in a loop.
We now have a new machine running Debian. To avoid carrying over the errors from the old site, we would like to start with a fresh installation of the stable version of OJS. However, we have the problem of transferring the archive from the old to the new server. This is why I was asking about the plugins page not working.
I checked a PDF link and it opened OK on my machine; are you seeing this only with certain PDFs?
I still recommend you look into the upgrade process, rather than using import/export; you’d lose a lot of data by exporting and re-importing submissions, as not all data is included in the export toolset.
Regards,
Alec Smecher
Public Knowledge Project Team