This topic is locked

Fatal error: Call to undefined function mysql_connect() in C:\Users\Administrator\Documents\PHPRunnerProjects\log\output\include\dbconnection.my.mysql.php on line 9

9/8/2015 5:17:05 AM
PHPRunner General questions
C
carrie3800332 author

Fatal error: Call to undefined function mysql_connect() in C:\Users\Administrator\Documents\PHPRunnerProjects\log\output\include\dbconnection.my.mysql.php on line 9

Discover previously forum content

I checked php.ini This content is extension=php_mysql.dll

But this does not solve the problem

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

Probably there´s something I have not done properly.

Thanks !
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

Admin 9/8/2015

This approach is correct, you just need to make sure you modifying correct php.ini file.
This article can help:

http://stackoverflow.com/questions/2750580/how-to-find-the-php-ini-file-used-by-the-command-line

C
carrie3800332 author 9/10/2015

Thank you for your reply

I still do not know how to solve exclude

But I try use vmware In the same environment

This error does not occur

Thanks !

MySql:

Apache Web Server Version 2.2.8

PHP Script Language Version 5.2.6

MySQL Database Version 5.0.51b

phpMyAdmin Database Manager Version 2.10.3
dbconnection.my.mysql.php on line 9

$conn = mysql_connect($strhost,$user,$pwd);
function db_connect()

{

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

$strhost=$host;

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

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

$conn = mysql_connect($strhost,$user,$pwd);

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

{

trigger_error(mysql_error(), E_USER_ERROR);

}

@mysql_query("set names ".$cMySQLNames);

$mysqlversion = "4";

$res = @mysql_query("SHOW VARIABLES LIKE 'version'",$conn);

if($row=@mysql_fetch_array($res,MYSQL_ASSOC))

$mysqlversion = $row["Value"];

if(substr($mysqlversion,0,1)<="4")

$bSubqueriesSupported=false;

return $conn;

}