Error upload image OJS 3.1.2-1

Hi all

Recently I installed OJS 3:1.2-1 and I have problems when I try upload the magazine logo, OJS shows an error and i can not upload the image or any other type of file I would like to know if it is a configuration error of ojs or the server

thanks for the help

1 Like

I have the same error, if you find the solution please let me know.
Thank you

Hi @Pandora_ramin and @christian_criollo,

What type of image file are you trying to upload onto your sites? Are you getting any other errors on your site?

Kind Regards,
Patricia M.
Public Knowledge Project Team

The files are .jpg. It doesn’t allow me to upload any images. When I want to upload an image on the page footer and I want to saved it stays cycled.

@Pandora_ramin,

Unfortunately, I am unable to replicate the issue you’re having. Have you taken a look at you PHP log for any errors?

Kind Regards,
Patricia M.
Public Knowledge Project Team

Hi pmangahis

the files are jpg, png and other type files for exmaple PDF

Hi all,

Double-check the file permissions in your public directory (and all contents, recursively) – I suspect OJS is unable to store files there. There’s a FAQ entry on this forum about file permissions if you’re not sure.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi [asmecher]
I checked the permissions and the folder has 777 permission and I tried with 755 but nothing does not upload the images.
Thanks for you help

Hi @Pandora_ramin,

Did you set permissions recursively?

Note that 777 permissions are never safe to use, though they can be helpful for debugging.

Regards,
Alec Smecher
Public Knowledge Project Team

I have reviewed all the permissions and they are in order, the images are staying in a folder called Temp, but it seems that you cannot move them.
Any ideas

Hi @Pandora_ramin,

You’re describing what happens when the file permissions are not set correctly in the public directory, recursively (along with all its contents and their contents as well).

Regards,
Alec Smecher
Public Knowledge Project Team

I have reviewed and tried to put all in 0777 but the same error still appears “The file could not be uploaded or revised”

Hi @Pandora_ramin,

Specifically, what directories/files did you change the permissions for?

Regards,
Alec Smecher
Public Knowledge Project Team

I tried the public folder that saves the documents and also with the OJS installation folder and nothing. I have tried with all the folders and the problem is not solved.

Hi @Pandora_ramin,

Again, you need to be setting permissions recursively in the public directory. Using 777 permissions is risky and you should not leave anything set that way.

Regards,
Alec Smecher
Public Knowledge Project Team

Very well I have put the permits back in 0755

Please any idea why I can’t upload any files.
Thank you

I have modified the folder permissions of public and files (755) but pesist the error any idea or help

[07-Oct-2019 21:35:06 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/nydsigel/public_html/fuenteconfiable.com/lib/pkp/lib/adodb/adodb.inc.php on line 263
[07-Oct-2019 21:35:06 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/nydsigel/public_html/fuenteconfiable.com/lib/pkp/lib/adodb/adodb.inc.php on line 359
[07-Oct-2019 21:35:06 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/nydsigel/public_html/fuenteconfiable.com/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[07-Oct-2019 21:35:06 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/nydsigel/public_html/fuenteconfiable.com/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[07-Oct-2019 21:35:12 UTC] PHP Warning: chmod() has been disabled for security reasons in /home/nydsigel/public_html/fuenteconfiable.com/lib/pkp/classes/file/FileManager.inc.php on line 517

This appears in my error log. Someone can tell me that means,
Thanks

Check if OJS can write to temp directories. I’ve recently had a similar problem with CSS upload. It doesn’t go to /public/ but to temp first and then to public. If OJS can’t write to temp directory, an error will be displayed.

Check server logs for “tempnam” and “move_uploaded_file” for details.