Welcome Guest, Not a member yet? Register   Sign In
Strange error to core file after transfering site to new server.
#1

[eluser]Swammy[/eluser]
I built a site on my local server. Everything worked fine. When I put it online, imported and connected the database I go some strange error to a core file

Fatal error: Call to a member function num_rows() on a non-object in ****/system/database/DB_active_rec.php on line 986

I have tested and confirmed that the database is connecting. So this must be a server configuration issue. But can anyone suggest to me what it is?

The issue began as a database connection problem that I fixed by changing db_debug to false

Code:
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = '***';
$db['default']['password'] = '***';
$db['default']['database'] = '***';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = FALSE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
#2

[eluser]InsiteFX[/eluser]
Try turning off pconnect it causes problems and should not be used.
#3

[eluser]Swammy[/eluser]
Hi. Thanks for the reply. When I turn off pconnect I am able to see pages generated by the CI framework but I get database 'undefined variable' errors for each query. on the page (essentially the database isn't connected (but it is).




Theme © iAndrew 2016 - Forum software by © MyBB