Describe the issue or problem
Be able to connect to the database
Steps I took leading up to the issue
So, in my case, my company already have a running OJS3.3 that I just copied the source code because I need to add some modifications to it. I already tried to redo the steps on how to run OJS, except for the steps that require git and npm because the source code doesn’t have the .git anymore (probably because it was extracted from a zip file) and the commands throws an error, respectively. I also saw this question, which I think I already fixed because by using a xampp with a lower version, like the one I’m currently using which is 7.4.30. I did some test before by getting my own copy of OJS3.3.11 and IIRC, I was able to run it properly using my local MySQL installation. But even that test copy isn’t working now. Here what my error looks like:
PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000] [2002] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
in C:\xamppv7.4.30\htdocs\ojs-from-IT\ojs\lib\pkp\lib\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:38
Stack trace:
#0 C:\xamppv7.4.30\htdocs\ojs-from-IT\ojs\lib\pkp\lib\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php(38): PDO->__construct(‘mysql:host=192…’, ‘db_user’, ‘db_pword’, Array)
#1 C:\xamppv7.4.30\htdocs\ojs-from-IT\ojs\lib\pkp\lib\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php(67): Doctrine\DBAL\Driver\PDOConnection->__construct(‘mysql:host=192…’, ‘db_user’, ‘db_pword’, Array)
#2 C:\xamppv7.4.30\htdocs\ojs-from-IT\ojs\lib\pkp\lib\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php(46): Illuminate\Database\Connectors\Connector->createPdoConnection(‘mysql:host=192…’, ‘db_user’, '! in C:\xamppv7.4.30\htdocs\ojs-from-IT\ojs\lib\pkp\lib\vendor\laravel\framework\src\Illuminate\Database\Connection.php on line 671
I do have 2 xampp, but I target the php of the xampp 7.4.30 when executing the command
php -S localhost:8000
.
So my command looks like:
C:\xamppv7.4.30\php\php.exe .\tools\install.php
instead.
What application are you using?
OJS 3.3.11
Additional information
Please add any screenshots, logs or other information we can use to investigate this problem.