step
step

Reputation: 2410

After PHP 7.4.14 Update I have some SQL errors

After update of PHP at 6.1.2021 from 7.4.13 to 7.4.14 I have some errors which was not before. MySql is 5.7.32. I have sqls thru:

$prep = $dbconn->prepare($sql);
$prep->execute();

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-server = utf8mb4_unicode_ci' at line 1; Query:SET collation-server = utf8mb4_unicode_ci

1115 Unknown character set: 'utf8mb4_unicode_ci'; Query:SET character_set_connection = utf8mb4_unicode_ci

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SESSION sql_mode = "NO_BACKSLASH_ESCAPES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUT' at line 1; Query:SESSION sql_mode = "NO_BACKSLASH_ESCAPES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

On my server at same day was updated also PHP 7.3 to 7.3.26. Same scripts running on 7.3 has no problems.

Before this update was everything OK.

Upvotes: 0

Views: 434

Answers (1)

Alexander Dobernig
Alexander Dobernig

Reputation: 753

It seems that you have a script that creates a mysql connection with the charset. utf8mb4_unicode_ci

And your mysql does not know this charset.

1115 Unknown character set: 'utf8mb4_unicode_ci'; Query:SET character_set_connection = utf8mb4_unicode_ci

Solutions: Edit the connection string.

Upvotes: 1

Related Questions