Hey guys,
I am using adodb5 following code:
$DB = NewADOConnection('mysqli');
$DB -> Connect($DB_Host, $DB_User, $DB_Password, "master") or DIE("Database Connection Failed!");
It seems to connect since I dont get the message database connection failed. THe website also generates but when I try to use mysql_real_escape_string or i guess try to do an INSERT
I get following errors:
[Tue May 18 16:48:27 2010] [error] [client IP ADDRESS] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/project/db_session/class.dbsession.inc on line 177
[Tue May 18 16:48:27 2010] [error] [client IP ADDRESS] PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in /var/www/html/project/db_session/class.dbsession.inc on line 177
Read from remote host SERVER_IP_ADDRESS: Connection reset by peer
The weird part is i am connecting to a remote mysql server so i dont even know why it tries to connect locally. What makes it more bizarre is that i have no problem generating the site (read)
change $DB = NewADOConnection('mysqli'); to mysql works fine. I checked the server and mysqli is enabled.