OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OMP 1.1 - Site Setup - Can't upload title image

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

Moderators: jmacgreg, michael, asmecher

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

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 OMP Discussion subforum; if you have a development question, try the OMP Development subforum.

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby JasonNugent » Thu Mar 20, 2014 5:59 am

Hi everyone,

Just a suggestion -- submission files are stored in your OMP files/ directory, whereas CSS and images for the press and site are stored in a public/ directory, which may have sub directories that also need to have the correct permissions on them. In such a case, it would be possible to have submission uploads work fine, but other uploads fail.

Just an idea.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 894
Joined: Tue Jan 10, 2006 6:20 am

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby GidgetDigit » Thu Mar 20, 2014 12:09 pm

I checked, and the permissions are (and were) set to "write" for the public/ dir and it's only sub-dirs (presses/ and site/ -- both are empty, although I have created a press instance, and set up the descriptions and admin details for it, so shouldn't it show the press by name there?)

Is there someplace else that specific file types need to be named? I've tried this with .png and .jpg or .gif and nothing works.

thanks for any info...
pj
GidgetDigit
 
Posts: 10
Joined: Sun Nov 04, 2012 2:54 pm

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby Guilherme Ataíde Dias » Thu Mar 20, 2014 1:18 pm

Dear Jason, thank you for your help!

The UPLOAD does not work in ENGLISH. Does not matter the locale.

===============
"Hi Guilherme,

Out of curiosity, do uploads work if you switch to a different locale, like english?

Regards,
Jason"
===============

Guilherme Dias
Guilherme Ataíde Dias
 
Posts: 17
Joined: Fri Jun 30, 2006 10:50 am

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby JasonNugent » Thu Mar 20, 2014 4:34 pm

Hi GidgetDigit,

It should show the press id, (a numerical value) as a sub directory, so presses/1/... in the presses/ directory. I'll have to verify that the sub directories are created when files are uploaded if they do not exist, but you could try creating one to see if that solves your problem.

Regards,
Jason

GidgetDigit wrote:I checked, and the permissions are (and were) set to "write" for the public/ dir and it's only sub-dirs (presses/ and site/ -- both are empty, although I have created a press instance, and set up the descriptions and admin details for it, so shouldn't it show the press by name there?)

Is there someplace else that specific file types need to be named? I've tried this with .png and .jpg or .gif and nothing works.

thanks for any info...
pj
JasonNugent
Site Admin
 
Posts: 894
Joined: Tue Jan 10, 2006 6:20 am

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby heidelberg » Thu Mar 20, 2014 11:52 pm

Hi Jason,

in our case - it did upload the stylesheet - I do have the sub-dir presses/1/ with the css styleSheet.css
So this should not be a permission issue while uploading. The problem only comes up when uploading the logos.

Stefanie
heidelberg
 
Posts: 40
Joined: Mon May 04, 2009 2:17 am

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby GidgetDigit » Fri Mar 21, 2014 5:51 am

The subdir 1/ wasn't created, but doing so (and double checking permissions) didn't fix this issue. It's not other file uploads, nor the css files, only the logo images. And this remained a perplexing problem, and so I actually re-installed the whole thing on a different server, and had no trouble with the uploads there.
GidgetDigit
 
Posts: 10
Joined: Sun Nov 04, 2012 2:54 pm

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby JasonNugent » Mon Mar 24, 2014 12:39 pm

Hi guys,

I've spent some time debugging this, and I may have an idea. Can those folks who are having problems uploading images try the following:

1. Edit your PHP ini file (probably /etc/php.ini or something like that)
2. Find the directive that says: disable_functions and make it say:

disable_functions = finfo_open

3. Save the file, and restart Apache. See if that solves your problem.

If it does, then I can look into that further. What that effectively does is bypass some code that sets the content type of the uploaded file. In some cases, the finfo PHP library will flag images as application/octet-stream instead of the correct mime type. You can verify the problem by looking in your temporary_files table in the database. Any images in there would have the incorrect mime type.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 894
Joined: Tue Jan 10, 2006 6:20 am

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby heidelberg » Mon Mar 24, 2014 11:40 pm

Hi Jason,

that did solve the problem.

Will you still need to have the shell access today?

Best wishes,
Stefanie
heidelberg
 
Posts: 40
Joined: Mon May 04, 2009 2:17 am

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby JasonNugent » Tue Mar 25, 2014 4:08 am

Hi Stefanie,

No, I won't. Ultimately, the correct work around for this is to re-enable the fifo function, and make sure that the mime_database_path directive in your config.inc.php file points *either* to a file that correctly parses PNG and JPEG files or else points to a location that does not exist. In the latter case, PHP uses an internal MIME database that will get the mime detection correct.

I suspect that this is why it works with some PHP installations and not others.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 894
Joined: Tue Jan 10, 2006 6:20 am

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby JasonNugent » Tue Mar 25, 2014 8:57 am

Hi again everyone,

After discussing this a bit with Alec, we feel that the best option for your configuration is to either comment out the mime database setting completely, or just set it to an empty value. Both options work, and are going to make PHP use the internal MIME database for detection.

We'll update our default configuration accordingly.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 894
Joined: Tue Jan 10, 2006 6:20 am

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby Guilherme Ataíde Dias » Fri Mar 28, 2014 6:58 am

YES!
It also worked for me. Now I am able to upload the book covers.
Is that all? I appreciate any further enlightenment...

Currently we are studying and customizing (http://www.editora.ufpb.br/sistema/press) the system.

Thanxs again.
Guilherme Ataíde Dias
 
Posts: 17
Joined: Fri Jun 30, 2006 10:50 am

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby rbatzing » Fri Nov 28, 2014 8:59 pm

I too am having this problem on OMP1.1.0.0 using PHP 5.5.9

The file seems upload but the OK button is never released


[img]error.png[/img]
and the same error message comes up:

No file upload or invalid file type.

BTW I also get that same error attempting to upload a PDF manuscript

At the same time the graqphic file uploads and displays just fine in the html text editor window
Attachments
error.png
error.png (35.24 KiB) Viewed 181 times
rbatzing
 
Posts: 2
Joined: Thu Nov 27, 2014 5:41 am

Re: OMP 1.1 - Site Setup - Can't upload title image

Postby asmecher » Sun Nov 30, 2014 11:47 am

Hi rbatzing,

Have you tried the solutions discussed in this thread? If so, which?

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

Previous

Return to OMP Technical Support

Who is online

Users browsing this forum: No registered users and 0 guests