[NEED HELP] Fatal error: Call to undefined function mysqli_connect()

sajid_buriro

Regular Member
Joined
Feb 28, 2011
Messages
269
Reaction score
48
Hi guys, i was trying to use a viral fb script and i was facing this problem in admin area also that script was not performing well, i am wondering what could be the problem.
The error which i get is:

Fatal error: Call to undefined function mysqli_connect() in/home/yourbest/public_html/specxxxxxxxx.com/new/include/db/Db_connection.php on line 42

so what could be the problem? is it with my hosting or that Db_Connection.php? sorry i am not much familiar with php stuff.
I have a linux based Cpanel X system,
[TABLE="class: truncate-table, width: 100%"]
[TR="class: row-even"]
[TD="class: stats_left, align: left"]PHP version[/TD]
[TD="class: stats_right, align: left"]5.2.17[/TD]
[/TR]
[TR="class: row-odd, bgcolor: #F3F3F3"]
[TD="class: stats_left, align: left"]MySQL version[/TD]
[TD="class: stats_right, align: left"]5.1.62-cll[/TD]
[/TR]
[/TABLE]
[TABLE="class: truncate-table, width: 100%"]
[TR="class: row-odd, bgcolor: #F3F3F3"]
[TD="class: stats_left, align: left"]cPanel Version[/TD]
[TD="class: stats_right, align: left"]11.32.2 (build 25)[/TD]
[/TR]
[/TABLE]

Thanks for your time..
 
In the config file do you have a choice of databases?
If there is one saying Mysqli, try changing it to MySQL and see if that helps.
 
Your host doesn't have the MySQLi extension activated. Ask them to add it or if they allow htaccess/php.ini to change directives, use it to enable mysqli.
 
No i don't have a choice over there, it is like this only..

//database access

$GLOBALS['db_host'] = 'localhost';

$GLOBALS['db_name'] = ' ';

$GLOBALS['db_user'] = ' ';

$GLOBALS['db_password'] = ' ';


//database tables names

$GLOBALS['fb_users_table_name'] = 'facebook_viral_users';

$GLOBALS['fb_settings_table_name'] = 'facebook_viral_settings';



In the config file do you have a choice of databases?If there is one saying Mysqli, try changing it to MySQL and see if that helps.
 
Ok i'll try to figure out how to do that.. thanks pal..
Your host doesn't have the MySQLi extension activated. Ask them to add it or if they allow htaccess/php.ini to change directives, use it to enable mysqli.
 
Back
Top