Welcome Guest, Not a member yet? Register   Sign In
Database Lib Loading Issue
#1

[eluser]Narkboy[/eluser]
For some reason, when I try to start the database library (in autoload or controller) CI fails to run properly. Without it, I can load my welcome controller in an instant - with it, it loads for several minutes before displaying a blank page - Apache reports a 200 message in the log.

No errors are displayed or logged, and nothing appears to be initialised (welcome has profiler on).

I'm using 1.7.2 with MySQL 5.1 on Apache 2.2 on Win7. I've recently updated all the server apps and now all of my sites with the db lib fial in the same way. It doesen't seem to matter if the database.php file is correctly configured or not.

Anyone else seen this or have a solution? Help!!

Thanks!
#2

[eluser]WanWizard[/eluser]
A connection problem, where PHP waits on a timeout when it tries to connect to the database?

MySQL running? On the correct port? No firewall (or other magical windows stuff) issues between webserver and database server?
#3

[eluser]Narkboy[/eluser]
Ok ignore me. This isn't a CI issue.

CI-induced lazyness has got me into bad habbits. I've just run an manual db connect script and that's suffering from the same issues... *sigh*

Thanks!
#4

[eluser]Narkboy[/eluser]
Ok, sorted. This is a known PHP issue - http://bugs.php.net/bug.php?id=50172

The solution is to uncomment or add 127.0.0.1 localhost to you hosts file. Apparently, it can't work it out... Some people have reported that using 127.0.0.1 instead of localhost worked for them, but not for me. The hosts edit has worked though!
#5

[eluser]WanWizard[/eluser]
What that bug report says is that you have this issue if your windows environment is dual stacked (IPv4 and IPV6), and you have "localhost" defined in your hostfile for both IPv4 and IPv6 local addresses.

You should already have a 'localhost' entry in your hosts file (c:\windows\system32\drivers\etc\hosts), chances are that you have two: one with 127.0.0.1, and one with ::1. If you don't, someone has modified the hosts file.

Make sure only the 127.0.0.1 entry is present, remove the ::1 (IPv6) entry. If you don't use IPv6 in your network, disable the entire stack. Nothing but trouble if you don't need it.




Theme © iAndrew 2016 - Forum software by © MyBB