Mysql
 SQL >> Database >  >> RDS >> Mysql

"Wrong COM_STMT_PREPARE Response Size" su hosting condiviso

Stesso errore qui, su 000webhost. Impostare ATTR_EMULATE_PREPARES di PDO a true in config/database.php lo ha risolto:

'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), // ... 'options' => [ PDO::ATTR_EMULATE_PREPARES => true, ], ],

Se la tua configurazione è in cache, esegui poi php artisan config:cache — oppure config:clear — perché la modifica abbia effetto.

La causa è una risposta a una prepared statement lato server che il client non riesce a interpretare, comune sugli host condivisi con versioni MySQL/MariaDB non allineate. Le prepare emulate sono un workaround, non una soluzione; l'aggiornamento del driver è la risposta duratura.