Install OJS Nginx, PHP

Hello everybody,

I have problem, and I don’t understand how resolve it. I cant install OJS 3.1 on CentOS 7, php 5.6 (try it 5.7 and 7.1) and nginx

# nginx -v
nginx version: nginx/1.14.2
# php -v
PHP 7.2.15 (cli) (built: Feb  5 2019 19:50:47) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
# uname -a
Linux hostname 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

php-fpm and nginx installed and tested. I used phpinfo for test. Work.

In log nginx server:

2019/02/11 04:11:10 [error] 31695#31695: *5 FastCGI sent in stderr: "PHP message: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with La
zyLoadPlugin::getEnabled($contextId = NULL) in /usr/share/nginx/html/ojs/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 386" while reading response h
eader from upstream,  server: localhost, request: "GET /ojs/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "host"
2019/02/11 04:11:10 [error] 31695#31695: *5 open() "/usr/share/nginx/html/ojs/index.php/index/install" failed (20: Not a directory),  server: localho
st, request: "GET /ojs/index.php/index/install HTTP/1.1", host: "host", referrer: "host/ojs/"
2019/02/11 06:20:03 [error] 31695#31695: *7 FastCGI sent in stderr: "PHP message: PHP Warning:  Declaration of PKPUsageEventPlugin::getEnabled() should be compatible with La
zyLoadPlugin::getEnabled($contextId = NULL) in /usr/share/nginx/html/lib/pkp/plugins/generic/usageEvent/PKPUsageEventPlugin.inc.php on line 386" while reading response heade
r from upstream, client: 10.190.16.206, server: localhost, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "host"
2019/02/11 06:20:03 [error] 31695#31695: *7 open() "/usr/share/nginx/html/index.php/index/install" failed (20: Not a directory), client: 10.190.16.206, server: localhost, re
quest: "GET /index.php/index/install HTTP/1.1", host: "host"

Who can help with installation on nginx? Or may be there is installation guide for Linux, PHP and Nginx?
Thank you!

Hi @corwin

Those PHP errors are cosmetic - it’s complaining about a few constructors used by some OJS plugins, and they won’t affect the running of OJS. Can you try turning off PHP warnings in your PHP configuration file and try again?

Cheers,
Jason

Hi @jnugent
Thank you for your answer.
Yes. sure. I modified my php.ini files and turn off warning. But, I can’t install ojs 3.1 again :frowning:

2019/02/12 06:03:57 [error] 11864#11864: *1 open() "/usr/share/nginx/html/ojs/index.php/index/install" failed (20: Not a directory), client: 10.190.16.206, server: localhost, request: "GET /ojs/index.php/index/install HTTP/1.1", host: "host"

May be there is installation guide for Linux, PHP and Nginx?

Hi @corwin,

We don’t have an official installation guide for it, but there are other threads on the forum about getting OJS working with nginx, e,g. OJS3 on nginx + php7.0-fpm

Cheers,
Jason

Almost three years have passed. Do you have an official installation guide now, in 2022?

hi @shoorick

We do not.

Best
Jason