Describe the issue or problem
Please tell us what happens and what you expected to happen.
when i open a browser directed to ojs, it says,
Fatal error : Uncaught → Smarty: unable to write file /var/www/html/cache/t_compile/wrt63232fdf467111_12164032 ← thrown in /var/www/html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_runtime_writefile.php on line 60
What application are you using?
ojs-3.3.0-11
PHP 7.4.19 (cli) (built: May 4 2021 11:06:37) ( NTS )
Server version: Apache/2.4.37 (centos)
mysql Ver 8.0.26 for Linux on x86_64 (Source distribution)
Centos 8
Additional information
Please add any screenshots, logs or other information we can use to investigate this problem.
i have wasted almost 1 month (from 19-aug to 15-sep.) on installing ojs, but failed. so sad about this. anyone can help?
PHP scripts are running on your server as the “apache” user and group, and you are performing file operations as user id/group id 1000 (not sure why that doesn’t have a username showing). This is why the user and group digits of the permission value aren’t effective when set to 7 – the ownership and group do not match. The best solution would be for your server to run scripts in a setuid environment, if that’s possible. Otherwise, it’s best to have your files and cache directories also owned by apache, so that 777 permissions are not required.
This is more about server configuration and UNIX file permissions than OJS, so you might find guidance e.g. on Stack Overflow.
Regards,
Alec Smecher
Public Knowledge Project Team
after changing user:group of all installation files to be apache:apache, it works.
now i dont need to set chmod 777 anymore, now i use chmod 775 on all installation files.