This topic is locked
[SOLVED]

 Fatal error: Call to undefined function mysql_connect() in

12/5/2005 5:31:51 PM
PHPRunner General questions
A
annchristin author

I'm testing PHPRunner under IIS,MysQL and PHP5 and have done all the copying and amendments corresponding to the PHP FAQ page.
This are my folders, where I have put them

C:/PHP

C:/MySQL

C:Inetpub/wwwroot
This is how include/dbconnection.php looks like with absolut values in the connect string
<?php
function db_connect()

{

global $host,$user,$pwd,$errstr,$sys_dbname,$port;

$strhost=$host;

if($port && $port!=3306)

$strhost=$strhost.":".$port;

$conn = mysql_connect("localhost","root","caidoz");

if (!$conn || !mysql_select_db($sys_dbname,$conn))

{

trigger_error(mysql_error(), E_USER_ERROR);

}

return $conn;

}
I realy hope someone has any idea how to get around this problem.

Probably there´s something I have not done properly.

Admin 12/6/2005

Hi,
PHP needs to be set up to use it with MySQL.

To do that please open php.ini file in your C:\Windows directory with a text editor, find the string
;extension=php_mysql.dll
and remove a semicolon from the beginning.

Then find the string beginning with
extension_dir =
and make sure that this points to folder within your PHP installation where php_mysql.dll file resides. Usually it is "c:\php\extensions"

And at last copy libmysql.dll from your MySQL installation into the C:\Windows\System32 directory.