title: Connect to mysql using php while working with Apache24
body: <p>Here is the details you must know to understand my question clearly.</p>
  
  <p>Steps :
  1) I installed Apache <a href="https://www.apachelounge.com/download/" rel="nofollow noreferrer">https://www.apachelounge.com/download/</a>* from here and installed and kept it in 'C:' drive on my PC.</p>
  
  <p>2 Installed PHP <a href="http://php.net/downloads.php" rel="nofollow noreferrer">http://php.net/downloads.php</a> ( Safe Thread ) from here which i used for Apache.</p>
  
  <p>3) Installed mysql from which i am using mysql workbench now.</p>
  
  <p>4) After installing I tried to connect to mysql from PHP using the following code :</p>
  
  <pre><code>#file Name : include.php        
  &lt;?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!!!");
  }
  ?&gt;
  </code></pre>
  
  <p>Then i included " include.php" in my other php file where the html code is written :</p>
  
  <pre><code>#File Name : index.php
  &lt;?php
      include '.\include.php'
  
  ?&gt;
  &lt;!--Starting of the HTML--&gt;
  
  
  &lt;!--language of the webpage--&gt;
  &lt;html lang="en"&gt;
  
  &lt;!--Starting of the head--&gt;
  &lt;head&gt;
  .....//mycodes....
  &lt;/head&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now i am getting this error while loading this in my browser :</p>
  
  <p><strong>" 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 "</strong></p>
  
  <p>Apache, PHP , Mysql is working fine indivisually.</p>
  
  <p>Can you help me out of this situation ?</p>
  
  <h3>EDIT</h3>
  
  <p>I have uncommented all extension :</p>
  
  <pre><code>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; 
  </code></pre>