Here is the details you must know to understand my question clearly.
Steps : 1) I installed Apache https://www.apachelounge.com/download/* from here and installed and kept it in 'C:' drive on my PC.
2 Installed PHP http://php.net/downloads.php ( Safe Thread ) from here which i used for Apache.
3) Installed mysql from which i am using mysql workbench now.
4) After installing I tried to connect to mysql from PHP using the following code :
#file Name : include.php
<?php
$hostname = "localhost";
$user = "root";
$pass = "root";
$dbName = "TEST_DB";
$conn = mysqli_connect($hostname, $user, $pass, $dbName);
if(!$conn) {
die(mysqli_error($conn));
}
else {
die("SUCCES!!!");
}
?>
Then i included " include.php" in my other php file where the html code is written :
#File Name : index.php
<?php
include '.\include.php'
?>
<!--Starting of the HTML-->
<!--language of the webpage-->
<html lang="en">
<!--Starting of the head-->
<head>
.....//mycodes....
</head>
</html>
Now i am getting this error while loading this in my browser :
" Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in C:\Apache24\htdocs\include.php:6 Stack trace: #0 C:\Apache24\htdocs\index.php(2): include() #1 {main} thrown in C:\Apache24\htdocs\include.php on line 6 "
Apache, PHP , Mysql is working fine indivisually.
Can you help me out of this situation ?
EDIT
I have uncommented all extension :
extension_dir='c:\php\ext'
extension=bz2;
extension=curl
extension=fileinfo
extension=gd2
extension=gettext
extension=gmp
extension=intl
extension=imap
extension=interbase
extension=ldap
extension=mbstring
extension=exif ; Must be after mbstring as it depends on it
extension=mysqli;
extension=oci8_12c ; Use with Oracle Database 12c Instant Client
extension=odbc
extension=openssl
extension=pdo_firebird
extension=pdo_mysql
extension=pdo_oci
extension=pdo_odbc
extension=pdo_pgsql
extension=pdo_sqlite
extension=pgsql
extension=shmop;