Hi, follow the step needed to install OJS on my local machine using and into an HTTP ERROR 500 whenever i try to view it in my browser.
Below is my php error log. have been struggling with this error for days.
#0 /Applications/XAMPP/xamppfiles/htdocs/ojs-3.1.2-1/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect('localhost', 'ojs', 'ojs', 'ojs')
#1 /Applications/XAMPP/xamppfiles/htdocs/ojs-3.1.2-1/lib/pkp/classes/db/DBConnection.inc.php(151): ADOConnection->Connect('localhost', 'ojs', 'ojs', 'ojs', false)
#2 /Applications/XAMPP/xamppfiles/htdocs/ojs-3.1.2-1/lib/pkp/classes/db/DBConnection.inc.php(126): DBConnection->connect()
#3 /Applications/XAMPP/xamppfiles/htdocs/ojs-3.1.2-1/lib/pkp/classes/db/DBConnection.inc.php(83): DBConnection->initConn()
#4 /Applications/XAMPP/xamppfiles/htdocs/ojs-3.1.2-1/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection()
#5 /Applications/XAMPP/xamppfiles/htdocs/ojs-3.1.2-1/lib/pkp/classes/db/DBConnection.inc.php(227): DBConnection->__construct()
#6 /Applications/XAMPP/xampp in /Applications/XAMPP/xamppfiles/htdocs/ojs-3.1.2-1/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456
Try switching your database connector in your config.inc.php from “mysql” to “mysqli”.
Thanks but i run into another errror. Database connection failed! . Hope am not bugging.
Hi @purple - can you actually connect to your database from the command line with the parameters you entered in your config file? You can use the mysql command line tool to attempt this, from your server.
I run into this error. DB Error: Table ‘ojs.sessions’ doesn’t exist. I did everything from the command line.
Oh. Is OJS actually installed? If you tried to install OJS with “mysql” as the database driver, and you needed “mysqli” instead, then it probably did not install. You can connect to mysql from the command line and then run “use your-database” and then run “show tables” (where your-database is your database name) and see if there are tables created. if not, that would be the problem.
No table created but if the browser is not giving me the option to try installing ojs again how do one add a table. Can it be done manually if yes can you send me an query with the require input as i don’t know them at finger tip.
Well, I wouldn’t try to create the tables manually, because chances are none of them are created and there are about 150 tables in OJS. Try changing “installed” to “off” in your config file and then hitting it in a browser again. It should take you through the installer.
Same error DB Error: Table ‘ojs.sessions’ doesn’t exist.
take a look at my php error log
[29-Jul-2019 13:41:38 Europe/Berlin] ojs2: DB Error: Table 'ojs.sessions' doesn't exist
[29-Jul-2019 13:41:38 Europe/Berlin] PHP Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0
[29-Jul-2019 13:41:38 Europe/Berlin] PHP Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: /Applications/XAMPP/xamppfiles/temp/) in Unknown on line 0
Did you go through the installer again?
Yes, i did the moment I clicked the install open journal system that pop up. I am thinking of starting the process from scratch again getting frustrating.
Thanks for keeping up. I do appreciate.
Please don’t double-post the same question (Anyone know what a session table is and how to create one)
As @jnugent writes, the most likely situation here is that the OJS database is empty, and the installer did not run successfully.
The thread “DB Error: table ojs.sessions doesn’t exist” might be a good location to followup on checking your database configuration and installation.
Run into this error
DB Error: Table 'ojs.sessions' doesn't exist
Below is my php error log
[29-Jul-2019 14:30:34 Europe/Berlin] ojs2: DB Error: Table 'ojs.sessions' doesn't exist
[29-Jul-2019 14:30:34 Europe/Berlin] PHP Warning: Unknown: Cannot call session save handler in a recursive manner in Unknown on line 0
[29-Jul-2019 14:30:34 Europe/Berlin] PHP Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: /Applications/XAMPP/xamppfiles/temp/) in Unknown on line 0```
That mistake happens for two things:
- Your backup was not completed completely
- At the time of importing your backup, it did not do so completely.
You must restore or generate the backup by command terminal to avoid those errors.