Upgraded to OJS 3.1.1 from OJS 2, getting "The file could not be uploaded or revised" errors

ojs3

#1

Related to Problem with upload in OJS 3.0 [solved]

Just upgraded a site from OJS 2.4 to OJS 3.1.1. Getting the “The file could not be uploaded or revised” error whenever I attempt to upload an image or css file, etc.

The previous thread indicated that you need to reduce your apache version to 2.2. I’m currently on a system on v Apache/2.4.27, but other systems run on this server so I cannot downgrade to 2.2.

Has anyone found a solution for this issue that doesn’t include an Apache downgrade? Thanks.


#2

Hi @duspal,

It’s very unlikely that your Apache version is behind this. Have you investigated the other solutions in the FAQ regarding this message?

Regards,
Alec Smecher
Public Knowledge Project Team


#3

Config settings:

public_files_dir = public
umask = 0022

Turned off SELinux. Set permissions on public to 777 and ownership to apache (note: cache directory works on apache ownership without opening permissions to 777, so the former is temporary for testing). Copied out all content that got ported over so its an empty directory (in case it was a file overwrite issue.) So far, nothing is working.


#4

Hi @duspal,

The problem might be file type identification rather than file permissions. See this thread for details: Error message on upload: "No file uploaded or invalid file type!"

Regards,
Alec Smecher
Public Knowledge Project Team


#5

Found it. This was caused by a typo in the config.inc.php file.

One wrong letter and the whole house comes a-tumblin’ down. Thanks for the help!