Welcome Guest, Not a member yet? Register   Sign In
Need error logging 101
#1

[eluser]jmanpa[/eluser]
I'm new to CI and am trying to troubleshoot a DB connection problem but I can't determine if there is more information being captured on the error than the unhelpful message from ci in the browser:
"A Database Error Occurred
Unable to connect to your database server using the provided settings."

I checked the Apache log and nothing

I read up on the CI error handling but I don't see reference to which log file it writes to - Apache or some file in the logs directory. The ci logs directory is empty except for index.html.

Where is the ci logging going or why do I seem to not be getting any? My threshold is set thusly:
$config['log_threshold'] = 3;
#2

[eluser]pickupman[/eluser]
You probably won't find what your are looking for with your error logging level. What type of DB are you trying to connect to?
#3

[eluser]jmanpa[/eluser]
MySQL DB. I'm on Amazon EC2 but trying to connect to DB on Hostgator server. I wouldn't be surprised if it is a port/permissions thing but I need some decent logging to help me figure it out.
#4

[eluser]pickupman[/eluser]
Hostgator runs mysql under localhost. You will to login to HG cpanel, go to Remote MySQL, and add your host/ip to the list. By default 192.168.1.% is only thing enabled. You might also by to use sql tunneling if that doesn't work.
#5

[eluser]jmanpa[/eluser]
I fixed it. I had added two IPs to Hostgator but neither of them were correct.

However, to troubleshoot it I had to do native PHP mysql connection code so as to get the real error message. I would think a framework like CI should be able to present the error to me, somehow.




Theme © iAndrew 2016 - Forum software by © MyBB