Problem with upload in OJS 3.0 [solved]

Hello,

First thing, I’m a french speaker so please excuse my englsih.

I just got a fresh install of OJS 3.0 and upgrade it to 3.0.1 without problem.
My configuration : Linux Debian 8, apache 2.4.10, PHP 5.6.29 and mysql 5.5.53.

Everything was going fine until I have to upload a file (the logo for a journal but the same problem occured elsewhere). So everytime I have to make an upload, I have this message : “The file could not be uploaded or revised.”

I have checked the rights on the public and files directories and everything is ok (directories belong to th apache user and group and are writable too).

I have checked what happened on the server : a file of null size is created in files_dir/temp directory. In the apache logs, I have found this entry corresponding to the upload :
127.0.0.1 - - [30/Dec/2016:19:00:29 +0100] “\xda\xc1\x7f~\xe7j\xd6\xf7Y\x0cm \v\xb9\xdc\xbc\xd5*\xa4\x81\xb3\x84\l\xe4\xa1’\x9f\xe4\xb2\x1bn\xe1\xe6\xdbo\xe4\xe4\xcf\x1eN\xb5\x95AK\xe0\xcb\xd2v\xd7\xff\xc6k\xcf\xe7\xb55[\xf8\xea\xe9\xdfAh\x89r1H\x06cJ^\x89-\xb6\xc1\xc9\xa7\x9f\xc3\xfes\x0e\xe0\x9a\x8bO\xa3\x9co@\xc5\x11\xc2\x0c\xa3\x1c\x95\x11~'\xe86<7\x16\xd9\xea\"\x12#\xf0\xf3\x8cQ\xd5\x94K\xcf;\x8e\xbd\xf7\xd9\x8d\x93\xce\xba\x91\xa6na\x92\x94\xa06\x12A\x9dJ\x0c\x88\x0c\x17\x07\x10\xf4\x93{1\xdf\xf8\xf6-H\xb5\x03W_v\x06\xef\x99=\x9cr\x9c\x11\x0e\xaf\x80H\xc8\\\x8b\xdc\xb5p\xc4h\x99\x92\x99\x06x9\x1dU\xc9i\xc7\x7f\x843\xcf:\x89o\x9e\x7f%\xcf\xbe\xd2S\b[\xaal\xbb*>\xdb\x0e\x1c\x15\xb3\xf8\xc5\r\\y\xdd\x0f\xb8\xf3\x9eK8\xf8\xa0\xd1\xa88B\xc5\xa3q\x16\xf28\xc1\x93\x10o\xe9A\xf9\x82r)\xc26\x06\xf0C\x01&F\xa923\xa7\x8d\xe4\xaa+\xbe\xcd\x03\xf7\xcfg\xfe\xe2U\xf8]\x15\xb01i\xbff}\x8f\xe5\x9b\xdf\xba\x89\x8b/\xbd\x94\x19\xd3\xf7\xa0\xa2\xc7\xc0\x15\xe9\xc7@\x0f6\xea#3\x83\xa4HDE\x82\xb7\x1e#6\x80\xb1\xa8l4e\xdf\xf1\x85\xcf~\x9c\xbb\xef\xbe\x93\x9f\xfe\xf6n\T\x83( \xdd\xbc\x85\xbe\xa6\xe1\xfc\xab\xee\xe5\x8c\xd3\x8f\xe7\xe0)\xdd\x94\x06j\x90O\xc0\xd9\x18\xbc^$\x01\xb9g\xd1\x91\xc2y\x0e\xbc!%\xeaW\x1bO” 400 0 “-” “-”

This is a error 400 which is a bad request. It sounds like a problem between the js of the upload code and the server but I do not know more.
I have the same error with Firefox and Chrome.

By the way, do the upload go in files_dir or public directories ? It’s not very clear in the documentation.

Thanks in advance

Hi @farth,

Submission files will go in the files_dir (per config.inc.php); cover images etc. will go somewhere in public.

Have you checked your SAPI? This will determine what file ownership will need to be – it won’t always be apache or www-data. See this FAQ entry for details. (And of course make sure you’re setting permissions recursively.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher and thanks for the reply.

Ok for the files in files_dir or public. By the way, I have tried to upload a stylesheet CSS and this time no problem. But for image or doc/pdf.odt for submission ot logo, still no luck.
I’ve checked my SAPI and file ownership is correct (www-data in my case as php run in mod_php mode).

I will try a new fresh install with OJS 3.0.1 in pure web mode (the actual was done on script tools/install.php. Maybe some parameter differs.

And I still have a lot of translation in french to make.

If you have any more idea.

Hi @asmecher,

A fresh install do not work either but I have found a solution.

As I thought, the probleme was the link between the js code of Plupload and the server. Apache 2.4.10 do not understand the request (error 400). So I have tried with a backport (apache 2.2.22) and this time no problem.

Thanks for the help

Hi @farth,

Hmm, interesting – were you able to find any documentation about the change in Apache?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

no, I’ve checked the different changelogs for apache but nothing really interesting. I’ve seen someone on stackoverflow with the same problem with the plupload js code. I will see with them for this problem as it does not depend on OJS but on this library.

Regards

Olá tenho o mesmo problema no OJS 3.0.2. Quem pode me ajudar?

Hi @Botteon,

Have you checked any of the suggestions in this thread? Please provide more detail – the problem you’re encountering, what you’ve tried, and what the result was.

Regards,
Alec Smecher
Public Knowledge Project Team