Our OJS was working fine until a few days ago we got the error message when trying to upload a “cover image” then when I tried to upload a pdf it gave a http error. Iv’e read other possible solutions and checked permissions, all looks good but still change permissions on the .php file mentioned in the error_log but still didn’t work so I reversed it to what it was before. The error_log shows a permission issue.
It isn’t a permission problem with your PHP files, but rather a problem with your cache/ folder. The warning is just being generated by the PHP file mentioned in the log entry. That cache/ folder needs to be writable by your webserver or whoever your PHP scripts run as.
Thank you for the reply. Any suggestions how can I fix this error?
I did try giving writable access to that cache folder and files. I did 777 just to test it but it still gave the following error. I attached the error i’m getting now. The user is apache which is what we always used and was working until a few days ago. We didn’t do any updates to changes. Thanks for your help
That’s the wrong cache folder. You don’t want to change the classes responsible for the cache code, but rather the cache itself. Look carefully at the path in your error message. It’s /opt/ojs/311/cache
Thank you for pointing that out. Sorry about that. I went the directory as you mentioned and it does look like the owner which is apache already has writable rights. I am fairly new to linux so excuse me if I miss something but im excited to learn something new every time haha. I will attach what I’m looking at. Any advise is appreciated.
I was able to fix my original uploading error by reapplying this command.
setenforce 0
I still don’t know why all of a sudden I was unable to upload images and pdf’s but after some research, I finally decided to try and run the above command again and now i’m able to upload. Hope this helps someone. Thanks jnugent for trying to help. Appreciate it
setenforce is a linux command line command that needs to be run as the root user and can be used to disable SELinux, if you’re using it. You’d need to ask your systems administrator to run it for you.