Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting to Sphinx using PDO

I am trying to connect to Sphinx with PDO, and it isn't working, I am getting this error:
SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers

Here is how I am connecting:

$pdo = new PDO("mysql:host=xxxxxx;port=9306;", "", "");

I used to be doing it with normal mysql and that used to work, but now it isn't working for some reason.

This used to work (now it doesn't and it doesn't even give an error):

$sql = mysql_connect("xxxxxx:9306", "", "");
like image 265
Get Off My Lawn Avatar asked Jun 19 '26 01:06

Get Off My Lawn


1 Answers

Okay, I fixed it.

What I did was downgrade php from 5.4.11 to 5.4.3

like image 63
Get Off My Lawn Avatar answered Jun 21 '26 14:06

Get Off My Lawn