Error when freshly installing OJS 3.3.0-7

I’m trying to freshly install OJS 3.3.0-7 but I’m Getting the following error:

[Tue Aug 17 00:40:15.328497 2021] [fcgid:warn] [pid 22298] [client 172.69.54.93:9074] mod_fcgid: stderr: PHP Fatal error:  Uncaught Error: Call to a member function getConnection() on null in /home/journal/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php:74
[Tue Aug 17 00:40:15.328517 2021] [fcgid:warn] [pid 22298] [client 172.69.54.93:9074] mod_fcgid: stderr: Stack trace:
[Tue Aug 17 00:40:15.328521 2021] [fcgid:warn] [pid 22298] [client 172.69.54.93:9074] mod_fcgid: stderr: #0 /home/journal/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php(200): Illuminate\\Database\\Capsule\\Manager::connection()
[Tue Aug 17 00:40:15.328525 2021] [fcgid:warn] [pid 22298] [client 172.69.54.93:9074] mod_fcgid: stderr: #1 /home/journal/public_html/lib/pkp/classes/db/DAO.inc.php(65): Illuminate\\Database\\Capsule\\Manager::__callStatic('raw', Array)
[Tue Aug 17 00:40:15.328528 2021] [fcgid:warn] [pid 22298] [client 172.69.54.93:9074] mod_fcgid: stderr: #2 /home/journal/public_html/lib/pkp/classes/context/ContextDAO.inc.php(63): DAO->retrieve('SELECT * FROM j...', Array)
[Tue Aug 17 00:40:15.328532 2021] [fcgid:warn] [pid 22298] [client 172.69.54.93:9074] mod_fcgid: stderr: #3 /home/journal/public_html/lib/pkp/classes/core/PKPRouter.inc.php(252): ContextDAO->getByPath('abaa')
[Tue Aug 17 00:40:15.328535 2021] [fcgid:warn] [pid 22298] [client 172.69.54.93:9074] mod_fcgid: stderr: #4 /home/journal/public_html/lib/pkp/classes/core/PKPRequest.inc.php(760): PKPRouter->getContext(Object(Request), 1)
[Tue Aug 17 00:40:15.328545 2021] [fcgid:warn] [pid 22298] [client 172.69.54.93:9074] mod_fcgid: stderr: #5 /home/journal/public_html/classes/core/Request.inc.php(64): PKPRequest->_delegateToRouter('getContext', 1)
[Tue Aug 17 00:40:15.328548 2021] [fcgid:warn] [pid 22298] [client 172.69.54.93:9074] mod_fcgid: stderr: #6 /home/journal/public_html/lib/pkp/classes/template/PKPTemplateManager.inc.php(114): in /home/journal/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php on line 74

The problem is that “abaa” in the ContextDAO->getByPath('abaa') is the name of another virtual host, how it was ended up in the log? Is there a misconfiguration on the server that may cause this?

Hi @Mohammad_Jaafar_Ali,

According to the error message

Call to a member function getConnection() on null

OJS cannot establish a connection with a database. Can you double-check if credentials are correct?

I’d also double check virtual host configuration.E.g., if it’s ubuntu + apache: How To Set Up Multiple Domains on an Apache Web Server | DigitalOcean