Closed adiba closed 3 months ago
Hey 👋
Hard to tell what is wrong here. Did anything changed with your infra setup (php version etc?)
Hey 👋
Hard to tell what is wrong here. Did anything changed with your infra setup (php version etc?)
Thank you for your reply :)
I did not change anything and apparently my hosting provider did not change anything either.
The PHP version has been 8.1 since day 1.
Hello, i have the same error. I am using sqlite 3.46.0. I noticed that when I edit the code, the connections look correct: lib/MongoLite/Cursor.php
$sql[] = 'WHERE document_criteria("'.$this->criteria.'", document)';
Change to:
$sql[] = 'WHERE document_criteria(\''.$this->criteria.'\', document)';
Is it a matter of sqlite itself or Cockpit? The error started appearing recently. I am unable to install the new version of Cockpit.
Cockpit requires PHP 8.2. Can you confirm that you use PHP >= 8.2?
This is not a PHP issue. The SQLite developers have been announcing the change for years, but the Cockpit developers missed it. It is explained here: https://sqlite.org/quirks.html#double_quoted_string_literals_are_accepted.
Thank you for the hint 👍 Fix will be available in the next release!
Hi @aheinze, it seems that the fix should be applied here as well:
COCKPIT[ERROR]: SQLSTATE[HY000]: General error: 1 no such column: "criteria66d71829062f3" - should this be a string literal in single-quotes? @/lib/MongoLite/Collection.php:146
$sql = 'SELECT id, document FROM
'.$this->name.'WHERE document_criteria("'.$this->database->registerCriteriaFunction($criteria).'", document)';
I hope no other places left.
Hi @aheinze, it seems that the fix should be applied here as well:
COCKPIT[ERROR]: SQLSTATE[HY000]: General error: 1 no such column: "criteria66d71829062f3" - should this be a string literal in single-quotes? @/lib/MongoLite/Collection.php:146
$sql = 'SELECT id, document FROM
'.$this->name.'WHERE document_criteria("'.$this->database->registerCriteriaFunction($criteria).'", document)';
I hope no other places left.
Thank you for reporting!
In @/lib/MongoLite/Cursor.php
$sql[] = 'WHERE document_criteria("'.$this->criteria.'", document)';
into
$sql[] = "WHERE document_criteria('{$this->criteria}', document)";
as well.
@pshemek this should already be fixed in the current dev codebase
When trying to log in (with
$debug=true
), I receive an error toast:the HEX string after 'criteria' changes, but always starts with 667.
My cockpit v2.3.0 installation worked fine on the same system for a year until this week. I didn't even change anything in code, data, or configuration.
I also tried to re-install - same problem.
Any ideas how I can debug this further and track down the problem?