MYSQLI not working.

Ask about a PHP problem here.
Post Reply
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

MYSQLI not working.

Post by olliekb »

I have a problem on my server...
Its a LAMP server put some reason it mysqli syntax dont work. mysql querys are fine but I dont understand why mysqli doesnt work. Im running PHP5.3 and ive checked the phpinfo()
MySQL Support	enabled
Active Persistent Links	0
Active Links	0
Client API version	5.5.31
MYSQL_MODULE_TYPE	external
MYSQL_SOCKET	/var/run/mysqld/mysqld.sock
MYSQL_INCLUDE	-I/usr/include/mysql
MYSQL_LIBS	-L/usr/lib/x86_64-linux-gnu -lmysqlclient_r

Directive	Local Value	Master Value
mysql.allow_local_infile	On	On
mysql.allow_persistent	On	On
mysql.connect_timeout	60	60
mysql.default_host	no value	no value
mysql.default_password	no value	no value
mysql.default_port	no value	no value
mysql.default_socket	/var/run/mysqld/mysqld.sock	/var/run/mysqld/mysqld.sock
mysql.default_user	no value	no value
mysql.max_links	Unlimited	Unlimited
mysql.max_persistent	Unlimited	Unlimited
mysql.trace_mode	Off	Off

mysqli

MysqlI Support	enabled
Client API library version	5.5.31
Active Persistent Links	0
Inactive Persistent Links	0
Active Links	0
Client API header version	5.5.29
MYSQLI_SOCKET	/var/run/mysqld/mysqld.sock

Directive	Local Value	Master Value
mysqli.allow_local_infile	On	On
mysqli.allow_persistent	On	On
mysqli.default_host	no value	no value
mysqli.default_port	3306	3306
mysqli.default_pw	no value	no value
mysqli.default_socket	/var/run/mysqld/mysqld.sock	/var/run/mysqld/mysqld.sock
mysqli.default_user	no value	no value
mysqli.max_links	Unlimited	Unlimited
mysqli.max_persistent	Unlimited	Unlimited
mysqli.reconnect	Off	Off


this is what the phpinfo() says anyhelp please
User avatar
Helx
Posts: 350
Joined: Thu May 17, 2012 6:45 am
Location: Auckland, New Zealand

Re: MYSQLI not working.

Post by Helx »

Could you please give us the actual error?
If there's any sensitive information in the error statement, then please blank it out/replace it.

:)
olliekb
Posts: 12
Joined: Sat Jun 29, 2013 12:42 pm

Re: MYSQLI not working.

Post by olliekb »

Error loading character set latin1:
mysqli_real_escape_string() might not work proper.Connect failed: Unknown MySQL server host 'localhost:3306' (2)
Post Reply