Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Phalcon db adapter not working with mysql-proxy

Plain and simple I am getting this message:

PDOException: SQLSTATE[HY000]: General error: 1243 Unknown prepared statement handler (1) given to mysqld_stmt_execute
/var/www/project/app/controllers/IndexController.php (65)

when using mysql-proxy with phalcon.

Funny this that if I use plain php to connect to mysql-proxy that is working (I am using mysql-proxy for many projects and it is working on all of them).

This is query:

$users = User::query()
        ->where("parse_id != ''")
        ->order("ID")
        ->execute();

Any idea why this is not working and how to debug this? If you need more info please tell me what else of debug info do you need?



4.7k

This is not helping. I do not know what is the probelm in first place. Can you explain what phalcon is trying to do? Is this reposne from mysql server or?

Maybe this could help: http://stackoverflow.com/questions/16074952/mysql-1243-unknown-prepared-statement-handler-stmt-given-to-execute



4.7k
Accepted
answer

After some diggining I came to this conslusion.

This has nothing to do with Phalcon. mysql-proxy read/write script does not support mysql prepeard statments. So that is rw-splitting.lua problem and not Phalcon.



288

Hello , as a beginner , php uses larvarl framework I have encountered the same problem , the solution for several hours , and still not been resolved , ask for help , the rw-splitting.lua how to rewrite the script it?

After some diggining I came to this conslusion.

This has nothing to do with Phalcon. mysql-proxy read/write script does not support mysql prepeard statments. So that is rw-splitting.lua problem and not Phalcon.



288

PDOException in MySqlConnector.php line 56: SQLSTATE[HY000]: General error: 1243 Unknown prepared statement handler (2) given to mysqldstmtexecute