CodeIgniter Forums
Strange error to core file after transfering site to new server. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Strange error to core file after transfering site to new server. (/showthread.php?tid=52611)



Strange error to core file after transfering site to new server. - El Forum - 06-18-2012

[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;



Strange error to core file after transfering site to new server. - El Forum - 06-19-2012

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



Strange error to core file after transfering site to new server. - El Forum - 06-19-2012

[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).