title: How do I install MySQL modules within PHP?
body: <p>I've updated <strong>php.ini</strong> and moved <strong>php_mysql.dll</strong> as explained in <a href="https://stackoverflow.com/questions/11919/how-do-i-get-php-and-mysql-working-on-iis-70#94341">steps 6 and 8 here.</a></p>
  
  <p>I get this error&hellip;</p>
  
  <pre>Fatal error: Call to undefined function mysql_connect() in C:\inetpub...</pre>
  
  <p>MySQL doesn't show up in my <strong>phpinfo;</strong> report.</p>
  
  <hr>
  
  <p>I've updated the <strong>c:\Windows\php.ini</strong> file from</p>
  
  <pre>; Directory in which the loadable extensions (modules) reside.  
  extension_dir = "./"</pre>
  
  <p>to</p>
  
  <pre>; Directory in which the loadable extensions (modules) reside.  
  extension_dir = ".;c:\Windows\System32"</pre>
  
  <p>Result: no change.</p>
  
  <hr>
  
  <p>I changed the <strong>php.ini</strong> value of extension_dir thusly:</p>
  
  <pre>extension_dir = "C:\Windows\System32"</pre>
  
  <p>Result: much more in the <strong>phpinfo;</strong> report, but MySQL still isn't working.</p>
  
  <hr>
  
  <p>I copied the file <strong>libmysql.dll</strong> from folder <strong>C:\php</strong> to folders <strong>C:\Windows\System32</strong> and <strong>C:\Windows</strong></p>
  
  <p>Result: no change.</p>
  
  <hr>
  
  <p>I stopped and <strong>restarted IIS</strong>.</p>
  
  <p>Result: new, different errors instead!</p>
  
  <pre>Warning: mysql_connect() [function.mysql-connect]: Access denied for  
  user '...'@'localhost' (using password: YES) in C:\inetpub\...
  error in query.</pre>
  
  <pre>Fatal error: Call to a member function RecordCount() on a non-object  
  in C:\inetpub\...</pre>
  
  <hr>
  
  <p>I found several .php files in the website where I had to set variables:</p>
  
  <pre>$db_user  
  $db_pass</pre>
  
  <p>Result: The site works!</p>