Dear friends,
I receive HTTP ERROR 500 server error with some pages that work normally. I did NOT do any changes.
The requested page url:
https://mysite.com/treatmenthistory/add?showdetail=treatmentdetails,patient_extraservice&showmaster=patients&fk_PatientID=680I checked the log file:Previous Error: Type: Doctrine\DBAL\Driver\PDOException Code: HY000 Message: SQLSTATE[HY000]: General error: 1300 Invalid utf8 character string: ‘\x98’ File: /home/physio/domains/physiotherapy.ir/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php Line: 91 Trace: #0 /home/physio/domains/physiotherapy.ir/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(911): Doctrine\DBAL\Driver\PDOConnection->query() #1 /home/physio/domains/physiotherapy.ir/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(207): Doctrine\DBAL\Connection->executeQuery() #2 /home/physio/domains/physiotherapy.ir/public_html/src/Lookup.php(721): Doctrine\DBAL\Query\QueryBuilder->execute() #3 /home/physio/domains/physiotherapy.ir/public_html/src/Lookup.php(249): PHPMaker2021\PHYSIO\Lookup->executeQuery() #4 /home/physio/domains/physiotherapy.ir/public_html/models/JobrequestsAdd.php(441): PHPMaker2021\PHYSIO\Lookup->toJson() #5 /home/physio/domains/physiotherapy.ir/public_html/controllers/ApiController.php(81): PHPMaker2021\PHYSIO\JobrequestsAdd->lookup() #6 /home/physio/domains/physiotherapy.ir/public_html/controllers/ApiController.php(247): PHPMaker2021\PHYSIO\ApiController->processLookup() #7
…What’s the problem ?thanks
mansour wrote:
Previous Error: Type: Doctrine\DBAL\Driver\PDOException Code: HY000 Message:
SQLSTATE[HY000]: General error: 1300 Invalid utf8 character string: ‘\x98’ File:
There is an invalid character in the SQL. You may check:
- Field names of the lookup table in the database
- Field names and other settings in the Lookup Table panel, make sure you have not inadvertently entered non utf-8 characters
Hi,
Thank you for your guideline.
I provided a complete database backup and used it locally on my xampp server. There is NO any issue?!
How can I find the problem ?
Is there any MySQL command to correct the issue?Thanks
Make sure your project uses utf-8 Charset, from HTML → General → Charset.
Hi,
Yes, it’s set as utf-8.
My project worked normally but recently I encounter this problem .
Any other configuration and fix?
Thanks
I am also facing same issue.
Avoid mixing character set. It is best to use everything in utf-8. You may update your database, for example,
- Export your database in .sql
- Convert the .sql to utf-8 encoded file, change all character set and collation in the file to utf-8 (Note that for MySQL 8, it should be utf8mb4 and utf8mb4_0900_ai_ci)
- Import the .sql back to replace your old database
- Set the project’s charset as utf-8
Hi,
I found the problem. The problem was caused by a photo that saved to disk with Persian name and special characters.
I removed that file and the problem solved.
Thanks
You may rename the file by removing the characters that cause the issue from Row_Inserting and/or Row_Updating server event.