Ojs unable to find files

Describe the issue or problem
We had to move our OJS software (OJS 3.4.0.7) to a new server. We appeared to have no problems, but quickly realized we have lost the path to the files that the authors and reviewers have loaded.

This is the message I get when I try to download a file.

This site can’t be reached

The webpage at https://palaeo-electronica.org/ojs/index.php/pe/$$$call$$$/api/file/file-api/download-file?submissionFileId=3328&submissionId=1515&stageId=5 might be temporarily down or it may have moved permanently to a new web address.

ERR_INVALID_RESPONSE

It seems like we broke the path between OJS and the file repository. What file/s do I need to look at to reset the path to the file directory?

Thanks,

Jennifer

Hi @jrumford,

Check the files_dir in your config.inc.php configuration file.

Regards,
Alec Smecher
Public Knowledge Project Team

Where are the files supposed to appear? I have a directory called ojsfiles, but it appears to be empty.

Thanks,

Jennifer

Hi @jrumford,

When you moved OJS from the old server to the new one, did you bring the contents of this directory?

(Make sure not to put the files_dir inside the web root, as noted in config.inc.php – or you will get hacked.)

Regards,
Alec Smecher
Public Knowledge Project Team

Yes - the files are there - as I can go in via SFPT and see them. I did a test load today and it is definitely there. But I can’t access them via OJS.

Thanks,

Jennifer

I was able to find the file via SFTP in this line:

private_html/ojsfiles/journals/1/articles/1671

primate_html is in the root, everything else below that.

But I cannot download the file when I am in OJS.

Jennifer

I doubt this will help, but you can try checking the rights to the files_dir (https://docs.pkp.sfu.ca/admin-guide/3.3/en/configure#secure-files-directory) to see if the web server has the rights. We usually just set the www-data as the owner and group of the files_dir (recursively).

I can definitely load files into OJS, and the files are visible in OJS, as well as on the server as in this string: private_html/ojsfiles/journals/1/articles/1671

But if I click on the highlighted file in OJS, it does not download. I still get this message:

The webpage at https://palaeo-electronica.org/ojs/index.php/pe/$$$call$$$/api/file/file-api/download-file?submissionFileId=3530&submissionId=1671&stageId=1 might be temporarily down or it may have moved permanently to a new web address.

Jennifer

Hi @jrumford,

Interesting that you’re getting an ERR_INVALID_RESPONSE from the browser, when I would expect to get a 404 if the file was not present or in the wrong place.

Can you check your web browser’s developer tools and look in particular at the Network tab? When you attempt to download the file, it should record the server’s response, which you can then see on the Response tab. It should look something like this (but with different contents in the Response area):

Also, please check the PHP error log on your server side to see if there is something relevant.

Regards,
Alec Smecher
Public Knowledge Project Team

I don’t see a Response area - but I will check with a friend who is more server savvy than I am.

When you click the link in the OJS you should see new line(s) appear in the Network tab of the browser console. This line corresponds to the HTTP request initiated by clicking the link. You should then select (click) this line, and the details of this particular response (headers/request/response/etc) will appear.

The files are definitely present, as I can download them with SFTP. I imagine that is why I don’t get a 404. I think it is because of a server setting.

Thanks,

Jennifer

We opened permission settings in the server, but we are still getting this message:
Is there somewhere in OJS that we need to change a directive? Why can’t we download files from OJS?

The webpage at https://palaeo-electronica.org/ojs/index.php/pe/$$$call$$$/api/file/file-api/download-file?submissionFileId=2210&submissionId=1501&stageId=3 might be temporarily down or it may have moved permanently to a new web address.

Hi @jrumford,

Can you follow the directions suggested by @voffch above to get more information on the response your web server is giving when you attempt to download the file?

If the file was simply missing or inaccessible by OJS, you would get a 404 – but the message you’re getting is something different.

Regards,
Alec Smecher
Public Knowledge Project Team

I’m tried but I can’t see the network tab. I know the files are there because I can ftp them off the server. The files are not missing. The files are there. We simply can’t download them.

Also - articles that have only reached Submission stage - I can download by using the download button in submissions.

This doesn’t help during the review process or production because there is no download button on the other tabs.

Jennifer

Hi @jrumford,

You’re already there in the screenshot you posted above.

It might also be worth looking at the PHP error log to see if there’s something relevant there.

Regards,
Alec Smecher
Public Knowledge Project Team

We were able to get this PHP error script. Hoping this sheds some light on our problem. Thank you!

[Thu Jan 22 01:21:41.307470 2026] [proxy_fcgi:error] [pid 71986:tid 72053] [client 172.103.214.18:0] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function PKP\\services\\fpassthru() in /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/services/PKPFileService.php:181\nStack trace:\n#0 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/controllers/api/file/FileApiHandler.php(135): PKP\\services\\PKPFileService->download()\n#1 [internal function]: PKP\\controllers\\api\\file\\FileApiHandler->downloadFile()\n#2 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()\n#3 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest()\n#4 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\\core\\PKPComponentRouter->route()\n#5 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPApplication.php(395): PKP\\core\\Dispatcher->d…’, referer: https://palaeo-electronica.org/ojs/index.php/pe/submission?id=1674

49:[Thu Jan 22 08:14:42.164694 2026] [proxy_fcgi:error] [pid 236729:tid 236759] [client 147.231.18.195:0] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function PKP\\services\\fpassthru() in /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/services/PKPFileService.php:181\nStack trace:\n#0 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/controllers/api/file/FileApiHandler.php(135): PKP\\services\\PKPFileService->download()\n#1 [internal function]: PKP\\controllers\\api\\file\\FileApiHandler->downloadFile()\n#2 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()\n#3 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest()\n#4 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\\core\\PKPComponentRouter->route()\n#5 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPApplication.php(395): PKP\\core\\Dispatcher->d…’, referer: https://palaeo-electronica.org/ojs/index.php/pe/workflow/index/1670/1

58:[Thu Jan 22 09:32:18.832127 2026] [proxy_fcgi:error] [pid 303221:tid 303229] [client 37.0.113.103:0] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function PKP\\services\\fpassthru() in /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/services/PKPFileService.php:181\nStack trace:\n#0 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/controllers/api/file/FileApiHandler.php(135): PKP\\services\\PKPFileService->download()\n#1 [internal function]: PKP\\controllers\\api\\file\\FileApiHandler->downloadFile()\n#2 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()\n#3 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest()\n#4 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\\core\\PKPComponentRouter->route()\n#5 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPApplication.php(395): PKP\\core\\Dispatcher->d…’, referer: https://palaeo-electronica.org/ojs/index.php/pe/workflow/index/1671/1

59:[Thu Jan 22 09:32:29.230908 2026] [proxy_fcgi:error] [pid 303221:tid 303224] [client 37.0.113.103:0] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function PKP\\services\\fpassthru() in /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/services/PKPFileService.php:181\nStack trace:\n#0 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/controllers/api/file/FileApiHandler.php(135): PKP\\services\\PKPFileService->download()\n#1 [internal function]: PKP\\controllers\\api\\file\\FileApiHandler->downloadFile()\n#2 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()\n#3 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest()\n#4 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\\core\\PKPComponentRouter->route()\n#5 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPApplication.php(395): PKP\\core\\Dispatcher->d…’, referer: https://palaeo-electronica.org/ojs/index.php/pe/workflow/index/1671/1

62:[Thu Jan 22 09:48:43.772426 2026] [proxy_fcgi:error] [pid 303221:tid 303341] [client 37.0.113.103:0] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function PKP\\services\\fpassthru() in /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/services/PKPFileService.php:181\nStack trace:\n#0 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/controllers/api/file/FileApiHandler.php(135): PKP\\services\\PKPFileService->download()\n#1 [internal function]: PKP\\controllers\\api\\file\\FileApiHandler->downloadFile()\n#2 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPRouter.php(334): call_user_func()\n#3 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPComponentRouter.php(291): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest()\n#4 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/Dispatcher.php(165): PKP\\core\\PKPComponentRouter->route()\n#5 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPApplication.php(395): PKP\\core\\Dispatcher->d…’, referer: https://palaeo-electronica.org/ojs/index.php/pe/workflow/index/1671/1

65:[Thu Jan 22 10:04:30.552060 2026] [proxy_fcgi:error] [pid 327020:tid 327042] [client 37.0.113.103:0] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined function PKP\\services\\fpassthru() in /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/services/PKPFileService.php:184\nStack trace:\n#0 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/controllers/api/file/FileApiHandler.php(136): PKP\\services\\PKPFileService->download()\n#1 [internal function]: PKP\\controllers\\api\\file\\FileApiHandler->downloadFile()\n#2 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPRouter.php(327): call_user_func()\n#3 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPComponentRouter.php(265): PKP\\core\\PKPRouter->_authorizeInitializeAndCallRequest()\n#4 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/Dispatcher.php(157): PKP\\core\\PKPComponentRouter->route()\n#5 /home/510533.cloudwaysapps.com/cxseytzwev/public_html/ojs/lib/pkp/classes/core/PKPApplication.php(429): PKP\\core\\Dispatcher->d…’, referer: https://palaeo-electronica.org/ojs/index.php/pe/dashboard/editorial?currentViewId=active&workflowSubmissionId=1671&workflowMenuKey=workflow_1

Hi @jrumford,

Your server seems to have disabled the PHP passthru function. I suspect they have listed it in the disable_functions configuration setting. OJS requires this in order to work.

Regards,
Alec Smecher
Public Knowledge Project Team

We have removed passthru from disabled functions list for OJS, but I am still getting this error when I try to open/download a file.

The webpage at https://palaeo-electronica.org/ojs/index.php/pe/$$$call$$$/api/file/file-api/download-file?submissionFileId=171&submissionId=1500&stageId=3 might be temporarily down or it may have moved permanently to a new web address.