OJS Installation Error with tries for both 2.4.7 and 2.4.8

This is my first time trying out OJS and I cant even get the installation right. I have been reading a lot of posts about fixing the issues i run into but i just dont seem to be able to fix my situation.

I am running a virtual box with Windows 7 and CentOS7 as the operating systems. I had to install both because I was under the suspicion my errors could be OS dependent.
I am running Apache Version 2.4.6 on the CentOS with PHP version 5.4.16. I however get a blank white display when i load the install url for OJS. I traced down to the logs and uncovered the following errors.

[Thu Mar 10 16:54:59.063840 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: fopen(/var/www/html/ojs-2.4.7/cache/fc-locale-39ad57a0a799a092b476f7b3d029e60d.php): failed to open stream: Permission denied\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/cache/FileCache.inc.php\n At line: 86\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.063986 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: chmod(): No such file or directory\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/cache/FileCache.inc.php\n At line: 89\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.065275 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: fopen(/var/www/html/ojs-2.4.7/cache/fc-locale-1cfde42be2b25bdac1c9a16538de37a8.php): failed to open stream: Permission denied\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/cache/FileCache.inc.php\n At line: 86\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.065344 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: chmod(): No such file or directory\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/cache/FileCache.inc.php\n At line: 89\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.068241 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: fopen(/var/www/html/ojs-2.4.7/cache/fc-locale-03b174b61510807426c2a2c128f6a86a.php): failed to open stream: Permission denied\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/cache/FileCache.inc.php\n At line: 86\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.068320 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: chmod(): No such file or directory\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/cache/FileCache.inc.php\n At line: 89\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.069101 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: fopen(/var/www/html/ojs-2.4.7/cache/fc-locale-list.php): failed to open stream: Permission denied\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/cache/FileCache.inc.php\n At line: 86\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.069165 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: chmod(): No such file or directory\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/cache/FileCache.inc.php\n At line: 89\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.070349 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: fopen(/var/www/html/ojs-2.4.7/cache/fc-locale-8c15ce7dfec31e437114d80f1f936272.php): failed to open stream: Permission denied\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/cache/FileCache.inc.php\n At line: 86\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.070460 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: chmod(): No such file or directory\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/cache/FileCache.inc.php\n At line: 89\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.073567 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.\n In file: /var/www/html/ojs-2.4.7/lib/pkp/classes/core/Core.inc.php\n At line: 95\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.106681 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: strftime(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.\n In file: /var/www/html/ojs-2.4.7/lib/pkp/lib/smarty/Smarty_Compiler.class.php\n At line: 400\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.107040 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: USER ERROR: Smarty error: unable to write to $compile_dir ‘/var/www/html/ojs-2.4.7/cache/t_compile’. Be sure $compile_dir is writable by the web server user.\n In file: /var/www/html/ojs-2.4.7/lib/pkp/lib/smarty/Smarty.class.php\n At line: 1093\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.107117 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: include(/var/www/html/ojs-2.4.7/cache/t_compile/%%7D^7DC^7DC17B21%%install.tpl.php): failed to open stream: No such file or directory\n In file: /var/www/html/ojs-2.4.7/lib/pkp/lib/smarty/Smarty.class.php\n At line: 1256\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:54:59.107163 2016] [:error] [pid 4074] [client ::1:56137] ojs2 has produced an error\n Message: WARNING: include(): Failed opening ‘/var/www/html/ojs-2.4.7/cache/t_compile/%%7D^7DC^7DC17B21%%install.tpl.php’ for inclusion (include_path=‘.:/var/www/html/ojs-2.4.7/classes:/var/www/html/ojs-2.4.7/pages:/var/www/html/ojs-2.4.7/lib/pkp:/var/www/html/ojs-2.4.7/lib/pkp/classes:/var/www/html/ojs-2.4.7/lib/pkp/pages:/var/www/html/ojs-2.4.7/lib/pkp/lib/adodb:/var/www/html/ojs-2.4.7/lib/pkp/lib/phputf8:/var/www/html/ojs-2.4.7/lib/pkp/lib/pqp/classes:/var/www/html/ojs-2.4.7/lib/pkp/lib/smarty:.:/usr/share/pear:/usr/share/php’)\n In file: /var/www/html/ojs-2.4.7/lib/pkp/lib/smarty/Smarty.class.php\n At line: 1256\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.287876 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: fopen(/var/www/html/ojs-2.4.8/cache/fc-locale-39ad57a0a799a092b476f7b3d029e60d.php): failed to open stream: Permission denied\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/cache/FileCache.inc.php\n At line: 86\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.288006 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: chmod(): No such file or directory\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/cache/FileCache.inc.php\n At line: 89\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.289229 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: fopen(/var/www/html/ojs-2.4.8/cache/fc-locale-1cfde42be2b25bdac1c9a16538de37a8.php): failed to open stream: Permission denied\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/cache/FileCache.inc.php\n At line: 86\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.289295 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: chmod(): No such file or directory\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/cache/FileCache.inc.php\n At line: 89\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.292528 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: fopen(/var/www/html/ojs-2.4.8/cache/fc-locale-03b174b61510807426c2a2c128f6a86a.php): failed to open stream: Permission denied\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/cache/FileCache.inc.php\n At line: 86\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.292609 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: chmod(): No such file or directory\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/cache/FileCache.inc.php\n At line: 89\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.293569 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: fopen(/var/www/html/ojs-2.4.8/cache/fc-locale-list.php): failed to open stream: Permission denied\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/cache/FileCache.inc.php\n At line: 86\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.293669 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: chmod(): No such file or directory\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/cache/FileCache.inc.php\n At line: 89\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.295034 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: fopen(/var/www/html/ojs-2.4.8/cache/fc-locale-8c15ce7dfec31e437114d80f1f936272.php): failed to open stream: Permission denied\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/cache/FileCache.inc.php\n At line: 86\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.295106 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: chmod(): No such file or directory\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/cache/FileCache.inc.php\n At line: 89\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.298117 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: date(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.\n In file: /var/www/html/ojs-2.4.8/lib/pkp/classes/core/Core.inc.php\n At line: 95\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.314588 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: strftime(): It is not safe to rely on the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone.\n In file: /var/www/html/ojs-2.4.8/lib/pkp/lib/smarty/Smarty_Compiler.class.php\n At line: 400\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.314894 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: USER ERROR: Smarty error: unable to write to $compile_dir ‘/var/www/html/ojs-2.4.8/cache/t_compile’. Be sure $compile_dir is writable by the web server user.\n In file: /var/www/html/ojs-2.4.8/lib/pkp/lib/smarty/Smarty.class.php\n At line: 1093\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.314967 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: include(/var/www/html/ojs-2.4.8/cache/t_compile/%%7D^7DC^7DC17B21%%install.tpl.php): failed to open stream: No such file or directory\n In file: /var/www/html/ojs-2.4.8/lib/pkp/lib/smarty/Smarty.class.php\n At line: 1256\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql
[Thu Mar 10 16:55:13.315012 2016] [:error] [pid 4072] [client ::1:56138] ojs2 has produced an error\n Message: WARNING: include(): Failed opening ‘/var/www/html/ojs-2.4.8/cache/t_compile/%%7D^7DC^7DC17B21%%install.tpl.php’ for inclusion (include_path=‘.:/var/www/html/ojs-2.4.8/classes:/var/www/html/ojs-2.4.8/pages:/var/www/html/ojs-2.4.8/lib/pkp:/var/www/html/ojs-2.4.8/lib/pkp/classes:/var/www/html/ojs-2.4.8/lib/pkp/pages:/var/www/html/ojs-2.4.8/lib/pkp/lib/adodb:/var/www/html/ojs-2.4.8/lib/pkp/lib/phputf8:/var/www/html/ojs-2.4.8/lib/pkp/lib/pqp/classes:/var/www/html/ojs-2.4.8/lib/pkp/lib/smarty:.:/usr/share/pear:/usr/share/php’)\n In file: /var/www/html/ojs-2.4.8/lib/pkp/lib/smarty/Smarty.class.php\n At line: 1256\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.16\n Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n DB Driver: mysql

I could tell from the logs that i had permission issues and after reading several blogs on how to solve permission issues, I went ahead to change permissions for my ojs folder directories to 775 and files to 644. When that didnt solve the problem, I logged in as root and went through the entire process of downloading ojs, extracting as root, effecting permissions on folder, patching folder with patch and then trying to run the ojs install.That did not work either.

I switched to my windows platform and installed Uniserver Zero application as my server infrastructure which houses Apache 2.4.18, PHP 7.0.4, MYSQL 5.5.48. Upon running the ojs install, the browser displays an error as follows " The localhost page isn’t working. Local host is currently unable to handle request. 500". I track this down further to the apache error logs and uncovered the following errors.

[Thu Mar 10 09:48:26.229840 2016] [core:warn] [pid 1932:tid 120] AH00098: pid file C:/UniServerZ/core/apache2/logs/httpd.pid overwritten – Unclean shutdown of previous Apache run?
[Thu Mar 10 09:49:01.401715 2016] [mpm_winnt:notice] [pid 1932:tid 120] AH00455: Apache/2.4.18 (Win32) PHP/7.0.4 configured – resuming normal operations
[Thu Mar 10 09:49:01.401715 2016] [mpm_winnt:notice] [pid 1932:tid 120] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Thu Mar 10 09:49:01.401715 2016] [core:notice] [pid 1932:tid 120] AH00094: Command line: ‘C:\UniServerZ\core\apache2\bin\httpd_z.exe -d C:/UniServerZ/core/apache2 -f C:\UniServerZ\core\apache2\conf\httpd.conf -d C:\UniServerZ\core\apache2’
[Thu Mar 10 09:49:01.401715 2016] [mpm_winnt:notice] [pid 1932:tid 120] AH00418: Parent: Created child process 2372
[Thu Mar 10 09:49:02.479840 2016] [mpm_winnt:notice] [pid 2372:tid 240] AH00354: Child: Starting 150 worker threads.
[Thu Mar 10 09:54:37.216209 2016] [:error] [pid 2372:tid 1440] [client ::1:49190] PHP Deprecated: Non-static method PKPApplication::defineExposedConstant() should not be called statically in C:\UniServerZ\www\ojs_2.4.8\lib\pkp\classes\core\PKPApplication.inc.php on line 545, referer: http://localhost/index.php
[Thu Mar 10 09:54:37.216209 2016] [:error] [pid 2372:tid 1440] [client ::1:49190] PHP Deprecated: Non-static method PKPApplication::getExposedConstants() should not be called statically in C:\UniServerZ\www\ojs_2.4.8\lib\pkp\classes\core\PKPApplication.inc.php on line 513, referer: http://localhost/index.php
[Thu Mar 10 09:54:37.419235 2016] [:error] [pid 2372:tid 1440] [client ::1:49190] PHP Fatal error: Cannot use ‘String’ as class name as it is reserved in C:\UniServerZ\www\ojs_2.4.8\lib\pkp\classes\core\String.inc.php on line 57, referer: http://localhost/index.php

I am logged into windows as admin and only have one user account. The windows interface seems not to have any issues with permissions but a deprecated PHP error and one Fatal Error.
I am at wits end and dont know what else to do to get OJS to install successfully.

Will appreciate every tiny bit of help. Thanks.

In your CentOS install, you will want to confirm not just the file/directory permissions (e.g. 775 and 644), but also the file/directory ownership (eg. nobody:nobody or apache:apache). The important thing is that the web user (might be nobody, might be apache, might be another account) be able to read and write to those locations.

In CentOS (or other modern linux flavors) you may also need to check the status of selinux. If selunix is enforcing, there is another level of file permissioning (selinux contexts) which need to be configured. Check the status of selinux with the command sestatus.

In Windows, it looks like your Apache install is using PHP 7, which is probably breaking OJS 2.x. Try a version of PHP 5 instead.

1 Like

Thanks @ctgraham your reply is very much helpful. running ojs via windows with apache 5.4 got it working. I will however like to understand and solve the issue on CentOS as well. The file/directory ownership used to be root which triggered the above errors. I managed to check which user apache was running a php file in the browser containing the following code.

<?php echo shell_exec('whoami'); ?>

The results showed “apache”
I went further to confirm this by running the following in terminal

ps aux | egrep '(apache|httpd)'

The results showed the first process to be running as root and the subsequent ones as apache.
So i changed the file/directory ownership to apache.

I restarted apache afterwards and tried to install ojs but encountered the same error. I then went on to consider the second paragraph about selinux. I run the command sestatus and you were right.

From the looks of it selinux is enabled as you earlier put it as “enforcing”. In this context, selinux had a troubleshooting prompt that guided me as to how to amend the permissions for the relevant folders and files. I was also given the option to disable the selinux plugin engine within the browser but i suppose thats not a good idea so i went on to amend the permissions accordingly and now ojs installtion page comes up okay.

Thank you very much for your help