PDF files are not opening / downloading after server migration

Hi, we have recently shifted to another server (same specs as of previous one ). Everything seems to be working normal until if some one click on the PDF view button which leads to the following error:

PDF.js v2.6.347 (build: 3be9c65f)
Message: Unexpected server response (500) while retrieving PDF “https://pmsrj.com/index.php/pmsrj/article/download/33/2/153”.

Kindly help me in fixing this issue

Hi @KMC,

For 500 errors you’re going to want to check your PHP error logs and report on errors found there.
Also, can you please indicate which version you’re working from (e.g. 3.3.0-13), as that is very relevant for those who might assist you in troubleshooting here on the forum.

Best regards,

Roger
PKP Team

Thank you @rcgillis
We are using OJS Ver. 3.3.0.8

And the following are the error logs:

Type: League\Flysystem\Exception
Message: Impossible to create the root directory "/home/pmsrjc/public_html/uploads". mkdir(): Permission denied
File: /home2/kmcedupk/pmsrj.com/lib/pkp/lib/vendor/league/flysystem/src/Adapter/Local.php

Hi @KMC,

Check your files_dir setting in config.inc.php to make sure that it points to the right location – but take care not to leave this inside your web root as you seem to have it currently configured! That’s a dangerous configuration and may lead to your server being hacked. This is noted in the configuration file (and elsewhere).

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Dear @asmecher it worked, thank you for your help

1 Like