PDF View and download issue

Hello Sir,
My OJS site seems like hacked few days ago. I have cleaned and restored backup. Now PDF file is not showing and download a blank HTML file. I have review all articles and tired all possible changes but still facing issue. Kindly Help me.
View of Infective Organisms and their Changing Antibiotic Sensitivity Trends in Infections Occurring in Orthopaedics Implant Surgery 2

Error Log

[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/classes/core/Request.inc.php on line 68
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method Request::getContext() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/lib/pkp/classes/plugins/ThemePlugin.inc.php on line 409
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/classes/core/Request.inc.php on line 68
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::getUser() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/classes/issue/IssueAction.inc.php on line 192
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/lib/pkp/classes/core/PKPRequest.inc.php on line 564
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::getUser() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/classes/issue/IssueAction.inc.php on line 86
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/lib/pkp/classes/core/PKPRequest.inc.php on line 564
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method Request::getJournal() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/classes/issue/IssueAction.inc.php on line 59
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/classes/core/Request.inc.php on line 42
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::getRemoteDomain() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/classes/issue/IssueAction.inc.php on line 157
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/lib/pkp/classes/core/PKPRequest.inc.php on line 453
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::getRemoteAddr() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/classes/issue/IssueAction.inc.php on line 157
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/lib/pkp/classes/core/PKPRequest.inc.php on line 425
[29-May-2018 18:30:28 UTC] PHP Deprecated: Non-static method PKPApplication::getCCLicenseBadge() should not be called statically, assuming $this from incompatible context in /home/jpoa/public_html/pages/article/ArticleHandler.inc.php on line 120

I am using version ojs 3.0.2.0.
using user register option hacker added code in index page and added some files.
I am using folder outside from web root.

Kindly view the issue View of Infective Organisms and their Changing Antibiotic Sensitivity Trends in Infections Occurring in Orthopaedics Implant Surgery

Thanks

Hi @altafnagary,

Is your files_dir in config.inc.php set correctly? Are the file permissions set there such that OJS can access and manage all files, subdirectories, etc. in that area?

Regards,
Alec Smecher
Public Knowledge Project Team

Yes, I have read all topics regarding this issue. Before hacked it works correctly. When I restored then it is not working.
Thanks for prompt response Sir,

Hi @altafnagary,

What files/directories do you see inside the directory referred to by the files_dir setting? If it doesn’t expose anything undesirable about your installation, what is your files_dir? What have you used for file permissions?

Regards,
Alec Smecher
Public Knowledge Project Team

Dear Sir,

I am very stuck in this issue. Kindly review detail and help.

Base URL:
base_url = “http://jpoa.org.pk
files_dir = “journals”
file permission on folder journal is 777

file hierarchy.
image

Hi @altafnagary,

A few things to try:

  • The journals directory should be inside your files directory. Create a directory called files, move journals inside it, and configure the files directory in your config.inc.php's files_dir directive.
  • Make sure files is outside your public_html. Otherwise your server will get attacked.
  • 777 permissions are never safe to use. Read the “File Permissions” FAQ entry in this forum and find something less permissive.

Regards
Alec Smecher
Public Knowledge Project Team

I am facing this issue now. Kindly guide.

image

Thanks Sir, Finally I have solved the issue. This is a very simple issue. In my case I have deleted the .htacces file, and set the correct location for pdf files. That work now.
Thanks for your guidance.

Hi @altafnagary,

Whay is your files_dir, directory structure and permissions now?

Regards
Alec Smecher
Public Knowledge Project Team

I have moved files to root and changed the file permission to 755. It was actually file extension restriction in my .htaccess file. Now its work fine.