Welcome Guest, Not a member yet? Register   Sign In
can't connect a remote database (server database)
#1

[eluser]Unknown[/eluser]
well, I gonna explain the trouble that I have.....

I am developing a website using codeigniter, I work a developer machine, this machine has a database but it`s of test NOT PRODUCTIVE, when I config the database.php with local items, that is Ok.

$db['default']['hostname'] = "programador";
$db['default']['username'] = "sa";
$db['default']['password'] = "******";
$db['default']['database'] = "BDcaja";
$db['default']['dbdriver'] = "mssql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

....but, when I try to test my application on the server database (Xserver), I change my config like this:

$db['default']['hostname'] = "xserver";
$db['default']['username'] = "sa";
$db['default']['password'] = "******";
$db['default']['database'] = "BDcaja";
$db['default']['dbdriver'] = "mssql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";

I get a error

A Database Error Occurred
Unable to connect to your database server using the provided settings.

I putted the server ip however the problem is the same.I changed the password of the server database but it doesn't work.

Can someone help me? How can I connect a remote database? o maybe something, I'm forgetting.

Postdata: The database is MSSQL. I get a aplication on windows that connect ok. But my web application can't do it.
#2

[eluser]Unknown[/eluser]
well, I already have had solution, If you use a MSSQL database, and you need to connect a remote database, you will need the ntwdblib.dll version 2000.80.194.0 library in order to connect. This library put on your Apache bin directory and php directory. That was my solution.




Theme © iAndrew 2016 - Forum software by © MyBB