Welcome Guest, Not a member yet? Register   Sign In
stored procs, mysqli, 1and1 sockets ... what a mess.
#1

[eluser]ingrimm[/eluser]
Hey Guys,

first of all i'd like to wish merry christmas to all of you.

Now lets take a look at my problem.

A friend of mine and me are developing an app, that uses mysql5's stored procedures.
We've been developing on a testing enviroment and everything worked fine. Well... until now. We uploaded the project to its supposed live enviroment on a managed server hosted by 1and1. On the testing stage, we've been using the mysqli driver and had no problems at all.

1and1 decided to bitch around and do weird stuff with their sockets. The MySQL 5 socket is accessed trough localhost:/tmp/mysql5.sock. The mysqli socket is /tmp/mysqld.sock. This is where the problem starts. It took a bit to figure that out. My app said that it could not connect to the database using the provided settings in the first place. Once i figured out how to connect through mysqli my site started to render properly. It also worked fine with the old "mysql" driver. I couldn't make use of any stored procs while using that driver but the rendering worked.

While i changed the dbdriver to mysqli and started using the mysqld socket my app started to return false resultsets from every query i tried to perform. And this is my Question.

What am i missing? i var_dumped one of the results and this is the output:

Code:
object(CI_DB_mysqli_result)#17 (7) { ["conn_id"]=> bool(false) ["result_id"]=> NULL ["result_array"]=> array(0) { } ["result_object"]=> array(0) { } ["current_row"]=> int(0) ["num_rows"]=> NULL ["row_data"]=> NULL }

I guess that the connection isnt established at all.

this is my database.php

Code:
$db['live']['hostname'] = "localhost:/tmp/mysqld.sock";
$db['live']['username'] = "xxx";
$db['live']['password'] = "xxx";
$db['live']['database'] = "dbxxx";
$db['live']['dbdriver'] = "mysqli";
$db['live']['dbprefix'] = "";
$db['live']['pconnect'] = TRUE;
$db['live']['db_debug'] = FALSE;
$db['live']['cache_on'] = FALSE;
$db['live']['cachedir'] = "";
$db['live']['char_set'] = "utf8";
$db['live']['dbcollat'] = "utf8_general_ci";

Again. The site renders just fine and there are no errors on pageload that tell me, that a dbconnection could not be established. But every query returns a false result.
i really hope someone can help me... i'm starting to lose options :-)

thanks in advance.

Michael




Theme © iAndrew 2016 - Forum software by © MyBB