Welcome Guest, Not a member yet? Register   Sign In
Help!!! Database error on the online server
#1

[eluser]chamu_cfi[/eluser]
Hello! I have been using 1.5.4 on my pc CI on Windows XP SP2 and XAMPP. The problem arises when I upload the project on my server "Datattec.com" in Argentina, the default CI controller loads sucessfully, but with database transaction get the following error: "
An Error Was Encountered

Unable to connect to your database server using the provided settings."

You do not need too much code for that to happen, it is enough to write the next line "$this->load->database();"

I'm trying now with CI16 and get the same error.
I also tried to change the php server version 5.2.0 to 4.4.4 and nothing.
Don't know if it's important, mysql server is "MySQL 4.1.22-standard".
I have others applications running on this server like dotProject and I have no problem.

I don't know what to do.
I would appreciate any help, ideas, url or anything

PD: Sorry, my english is bad, I did the best that I could.
#2

[eluser]Alex007[/eluser]
Double-check your databases settings in config/database.php , make SURE the username/password/server/dbname are PERFECT, it's simply a connection error you'Ve got there, it has to be related to theses settings.
#3

[eluser]chamu_cfi[/eluser]
I have tried many times and with all possible combinations.
There was any way of knowing wich the specific error is (server name, username, pass)?
Someone knows a hosting provider that supports CI and which I can try before hiring?
#4

[eluser]tonanbarbarian[/eluser]
i would talk to your current hosting provider and get them to confirm that the settings you are using are correct
for example they may be using a different port for mysql
or it might be on a different server
#5

[eluser]chamu_cfi[/eluser]
I finally solved the problem! I could see my hosting provider "php.ini" configuration file and saw the following line :
"Disable_functions = system, shell, exec, system_exec, shell_exec, mysql_pconnect, passthru, popen, proc_open, proc_close, proc_nice, proc_terminate, proc_get_status, escapeshellarg, escapeshellcmd."

Here we can see that the use of persistent connections to the database server disabled.

Then I had to change my "database.php" config file..
Change this line:

Code:
"$db['default']['pconnect'] = TRUE;"

by this one

Code:
"$db['default']['pconnect'] = FALSE;"

And now it works!!!

So now I need to know wich are the differences between a persistent connection and a non-persistent connection.
will I get the same functionality?




Theme © iAndrew 2016 - Forum software by © MyBB