OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki


ojs 2.4.1 does not upload .css or image 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, michael, jheckman, barbarah, btbell, bdgregg, 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.

ojs 2.4.1 does not upload .css or image files

Postby dankomed » Sat Dec 15, 2012 12:15 pm

Dear Team,

I have newly installed ojs 2.4.1 on GoDaddy server but I cannot upload .css or image files. It says error - the file is not the correct file format or upload failed.
The installation of ojs 2.3.7 on the same GoDaddy server however correctly uploads both images and .css files.
Both ojs 2.3.7 and ojs2.4.1 config.inc.php files contain this code:
[finfo]
mime_database_path = /etc/magic.mime
Is the problem connected with misconfiguration of the mime.magic on GoDaddy server, or something else is the cause? I am wondering why the ojs 2.3.7 uploads correctly, whereas ojs 2.4.1 cannot. I checked many times the permissions, and both the /public folder as well as the files_dir folder are writable.
dankomed
 
Posts: 28
Joined: Thu May 03, 2012 8:09 pm

Re: ojs 2.4.1 does not upload .css or image files

Postby asmecher » Mon Dec 17, 2012 11:58 am

Hi dankomed,

I posted about your MIME issues at http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=9450&p=36652#p36660.

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

Re: ojs 2.4.1 does not upload .css or image files

Postby dankomed » Mon Dec 17, 2012 12:35 pm

Dear Alec, your clarification is great! I am posting here how the upload function of ojs 2.4.1 is restored for those who will have the same problem on GoDaddy server, because previous posts were a bit misleading. Actually there are at least two /classes/core/ folders in ojs. I was looking for String.inc.php in the obvious folder:
/ojs/classes/core/String.inc.php
However, the correct localization is in:
/ojs/lib/pkp/classes/core/String.inc.php

If the mime setting does not work in ojs2.4.1 the code:
Code: Select all
    if (function_exists('mime_content_type')) {

should be changed to:
Code: Select all
    if (false && function_exists('mime_content_type')) {

in order to instruct OJS not to use PHP's mime_content_type function. Now with ojs 2.4.1 working I will fix the ISSN export by the OAI.
dankomed
 
Posts: 28
Joined: Thu May 03, 2012 8:09 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests