You are viewing the PKP Support Forum | PKP Home Wiki

Wrong Content-type when displaying pdf files

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Wrong Content-type when displaying pdf files

Postby rullrich » Fri May 09, 2014 5:33 am

Hi everybody,

I have a strange problem that I am not able to solve by myself. We are running OJS 2.4.3 with SuSE 11 and mysql, the default installation directory for ojs is a folder inside of apaches documentRoot. The inline display of an articles pdf file works as it should and the server returns the correct content-type application/pdf. However, we want to run our OJS installation within a virtual host environment, and after configuring apache accordingly PDF files don't get displayed, because now OJS returns a content-type of text/html when I try to view or download pdfs. The OJS files are identical to the one used in our default installation (copied with cp -p -r ), and both installations use the same database. I wonder if this maybe is an apache problem, but then why is it working in a subdirectory with the default DocumentRoot but not within a virtualhost?

The problem occurs on the following page: http//ourvirtualhost/article/view/657/341.
Could somebody point me in the right direction, maybe?


Posts: 7
Joined: Thu Dec 13, 2012 6:15 am

Re: Wrong Content-type when displaying pdf files

Postby asmecher » Fri May 09, 2014 9:53 am

Hi Ralf,

Is there a public URL you could send me so I can try this myself?

Alec Smecher
Public Knowledge Project Team
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Return to OJS Technical Support

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot], pkpForTaclSupport and 1 guest