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
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
Hi, I have a problem with pdf files. I have installed adobe plugin for my browser but I can not view pdf file with this. When I clic on a pdf link a window ask me where it save the pdf file. I would like to use my pdf file with my browser. I try use this code to know the default mime_type:
<?php echo 'Mime type: ' . mime_content_type('pdf_file.pdf') . "<br/>\n"; ?>
Their output is :
Mime type: application/octet-stream
How I change this mime type to application/pdf?
- Posts: 3
- Joined: Fri Jan 04, 2008 1:06 pm
It sounds like you're having issues with your mime_content_type configuration. I've copied the following from a previous post:
OJS uses PHP's mime_content_type function to determine file types; if that function doesn't exist, it calls the external UNIX standard "file" utility. Either way, it determines file types based on a file called magic.mime. I'd suggest making sure that PHP's mime_content_type function is properly configured. See http://www.php.net/manual/en/function.m ... t-type.php
The line <?php echo 'Mime type: ' . mime_content_type('pdf_file.pdf') . "<br/>\n"; ?> should return type application/pdf, but it's not, most likely due to a misconfiguation. If you'd like, point me to a pdf file on your server to look at, and I can double-check that it's not a document problem.
Alternatively, you can search the forums for mime_content_type -- this issue has been discussed before.
- Posts: 4191
- Joined: Tue Feb 14, 2006 10:50 am
Return to OJS Technical Support
Who is online
Users browsing this forum: No registered users and 5 guests