This is to document my resolutions when moving a 2.7 install to a new server.
I wanted to make the old code base run with PHP 7.4 before upgrading
I ran into an Error
[PDOException] SQLSTATE[42000]: Syntax error or access violation
Had to set activate quoteIdentifiers
config/app.php [Line 257]
‘quoteIdentifiers’ => true,
Then there also was a Warning in the error.log
preg_match(): Compilation failed: invalid range in character class
This got resolved by changing the order in the regular expression
vendor/cakephp/cakephp/src/Database/SqlDialectTrait.php [Line 71]
if (preg_match(‘/[1]*[\w_-]+/’, $identifier)) {
\w_\s- ↩︎