Mysqli to mysql query in Xampp 3.2.2

 

 

Using mysql in new xampp | Disable Mysqli | easy migrate Mysqli to mysql used code in localhost.

If your using ‘mysql_query’ in your PHP code and your code is not working or giving ‘Fatal error: Call to undefined function mysql_connect()
it means you are using latest version of Mysql  or  you are using new xampp.

new mysql  using PDO & Mysqli, you can check about mysqli here.

but if you want to use old mysql_query, you have to change in php.ini. Follow these step to use mysql instead of mysqli in new xampp.

  1. Open ‘xampp/php/php.ini’ in notepad or any editor.
  2. Search for ‘extension=php_mysql.dll‘ & ‘extension=php_mysqli.dll
  3. Now see which one is active e.g. ;;extension=php_mysql.dll or  ;;extension=php_mysqli.dll
  4. It should be like : 
    extension=php_mysql.dll
    ;;extension=php_mysqli.dll
    for using mysql.
  5. Save file.
  6. completely restart xampp.

That’s it! 🙂

Enjoy Mysql instead of Mysqli .

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *