Welcome Guest, Not a member yet? Register   Sign In
Error in DB.php
#1

[eluser]Tamilmani[/eluser]
Hi,

I have recently download from codeigniter . I am getting error message in DB.php

Code:
Fatal error: Call to undefined function instantiate_class() in C:\wamp\www\project\database\DB.php on line 1

what is the problem? Any one tell me how to fix this issue?
#2

[eluser]johnwbaxter[/eluser]
This doesn't belong in this forum section as this is for bugs. Yours is a support type request.

Can you show me some of your code please? Then i can tell you where you are going wrong.

Cheers!
#3

[eluser]Tamilmani[/eluser]
Yes . Mistakenly i done this .
#4

[eluser]johnwbaxter[/eluser]
No problem, just letting you know in case you weren't aware!

Have you solved your problem then? Or do you need some help?
#5

[eluser]Tamilmani[/eluser]
No,

Still i have that issue .
#6

[eluser]johnwbaxter[/eluser]
Can you show me the code in your controller?
#7

[eluser]Tamilmani[/eluser]
This is not controller issue.This is database problem . I got error message DB.php.

Here my sample database.php code

Code:
$db['default']['hostname'] = "63.55.72.149";
$db['default']['username'] = "username";
$db['default']['password'] = "password";
$db['default']['database'] = "database";
$db['default']['dbdriver'] = "mssql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
#8

[eluser]johnwbaxter[/eluser]
That's strange because line 1 is the line of code that sets the security for the file.

What if you try connecting to a mysql db? Same error?
#9

[eluser]Tamilmani[/eluser]
Now i have changed the code
Code:
$DB =& instantiate_class(new $driver($params)); to $DB =& new $driver($params);
in DB.php file.

Its loading fine . I don't get any error.
#10

[eluser]johnwbaxter[/eluser]
What version of PHP are you on?




Theme © iAndrew 2016 - Forum software by © MyBB