My Journal website is https://xlescience.org/index.php/IJASIS
The search link is https://xlescience.org/index.php/IJASIS/search .
The search doesn’t return anything but shows the below error message
This page isn’t working
xlescience.org is currently unable to handle this request.
HTTP ERROR 500
Please let us know how to solve this issue.
Thank you.
Hi @srinivasanchelliah ,
In cases of getting the HTTP 500 error it is helpful to check your PHP error logs and report on any errors found there - could you do that and let us know of any relevant errors in your log?
Best regards,
Roger
PKP Team
Hi @rcgillis
I got the following errors in my errorlog.txt file
[06-Mar-2023 22:54:44 America/Chicago] PHP Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’ in /home1/xlescien/public_html/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:80
Stack trace:
#0 /home1/xlescien/public_html/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(80): PDO->prepare(‘SELECT\n\t\t\t\to.su…’, Array)
#1 /home1/xlescien/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(361): Doctrine\DBAL\Driver\PDOConnection->prepare(Object(Illuminate\Database\Query\Expression))
#2 /home1/xlescien/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\Query\Expression), Array)
#3 /home1/xlescien/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\Database\Connection->runQ in /home1/xlescien/public_html/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671
Please let us know how to solve this issue.
Thank you.
Hi All,
Kindly help me to get the search option working in OJS
Journal link: https://xlescience.org/index.php/IJASIS
Thank you
Hi @srinivasanchelliah ,
You’ll need to contact your technical support and ask them to ensure all tables of your database are using the same collation (give preference to the utf8_general_ci
).
Best,
Jonas Raoni
Hi @jonasraoni
I checked now and set all tables’ collation to utf8_general_ci as per your suggestion.
But still, it is not working.
Please find the attached screenshot.
Kindly check and let me know
Thank you
And did you configure the collation correctly in your config.inc.php ?
Hi,
Fields might have their own collation, so ensure they are also ok
SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLLATION_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_schema = 'xlescien_ojs998';
ps: Hopefully I wrote the table_schema
filter right
Best,
Jonas Raoni
Hi @mpbraendle
I checked config.inc.php file. Database collation is correctly configured.
Kindly check and let me know if possible.
Thank you
Hi @rcgillis
I ran the query and checked the results that I got. Most of the tables’ collation are set to utf8_general_ci. Some tables’ collation is set to utf8_unicode_ci. I think they are not related to the search option.
Some tables’ collation is set to NULL.
Kindly check sir.
Thank you
Hi @srinivasanchelliah
ehm, no. You need to remove the ; in front to un-comment it.
Hi @srinivasanchelliah ,
About the field collation… Even if those fields are not related to the search issue, it’s better to fix them. Problems might be happening elsewhere
Once you fix, please reshare the error message.
About the collation at the config file. It’s already ok, when the setting is commented, the application uses utf8_general_ci
by default:
$capsule = new Capsule;
$capsule->addConnection([
'driver' => $driver,
'host' => Config::getVar('database', 'host'),
'database' => Config::getVar('database', 'name'),
'username' => Config::getVar('database', 'username'),
'port' => Config::getVar('database', 'port'),
'unix_socket'=> Config::getVar('database', 'unix_socket'),
'password' => Config::getVar('database', 'password'),
'charset' => Config::getVar('i18n', 'connection_charset', 'utf8'),
'collation' => Config::getVar('database', 'collation', 'utf8_general_ci'),
]);
$capsule->setEventDispatcher($eventDispatcher);
$capsule->setAsGlobal();
if (Config::getVar('database', 'debug')) Capsule::listen(function($query) {
error_log("Database query\n$query->sql\n" . json_encode($query->bindings));//\n Bindings: " . print_r($query->bindings, true));
});
// Set up Laravel queue handling
$laravelContainer->bind('exception.handler', function () {
Best,
Jonas Raoni
This topic was automatically closed after 60 days. New replies are no longer allowed.