1

I get this error

PHP Fatal error: Call to undefined function mysqli_connect() in /home/webdesignsolutio/public_html/process/conn.php on line 28

when my hosting is blank and i am testing for MySQLi test. then its show the result mysqli is available here , and when i host my website and import database there its show mysqli connect error, after installing database and website files there and page show blank without any connection

so when i move to go-daddy hosting and upload that and do same thing its running

i didn't understand that, whats a problem with that ?? Help me

For Testing of Mysqli i put this code :-

/* to check mysqli on your hosting / WHM / Cpanel */
/* Code start here */

<?php
 if (!function_exists('mysqli_init') && !extension_loaded('mysqli')) {
      echo 'no mysqli :(';
 } else {
      echo 'Yeah !!! we gots it :)';
 }
?>

/* Code End here */

Before import the database and upload the website

enter image description here

after import the database and upload the website

enter image description here

Dharman
  • 30,962
  • 25
  • 85
  • 135
abhinav
  • 21
  • 2
  • Can you give us the content (without your current credentials) of `/home/webdesignsolutio/public_html/process/conn.php` ? – funilrys Jan 25 '17 at 13:41
  • Maybe check the PHP settings in cPanel. I don't know if GoDaddy has mysqli enabled by default. – apokryfos Jan 25 '17 at 13:43
  • Try `$f = get_defined_functions(); sort($f['internal']); echo '
    '; print_r($f); echo '
    '; die();` and see if `mysqli` functions are available. If not then contact your host and tell them to enable it.
    – MonkeyZeus Jan 25 '17 at 13:59

1 Answers1

-1

Maybe a simpler and possibly more accurate test would have been straight out of the manual

<?php
// replace `???` with correct data for your host
$link = mysqli_connect("???", "???", "???", "???");

if (!$link) {
    echo "Error: Unable to connect to MySQL." . PHP_EOL;
    echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
    echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
    exit;
}
echo 'Connection ok';

This way you may get some useful information from the error messages.

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149