Re: problem connecting php and mysql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

i'm not so good at running php on microsoft stuff, but it seems you dont have mysql support compiled in or not tuned php.ini properly. You can try php 4.3.11 zip package from http://php.net 'cause it said it has mysql support compiled in. Again, it's just a tip.

Balazs Hegedus

rahot man wrote:

I have windows server 2003, PHPv5.0.3, Mysql v4.1 and IIS 6 and i am
working in Macromedia Dreamweaver MX2004

i am unable to connect to the mysql server. but my php files are running
fine and my mysql server is also running fine.

i) i had changed the php.ini-dist file to php.ini.
ii)i uncommented the extensions of php_mysql.dll in php.ini file
iii)i set the extensions_dir to
 extension_dir = "D:\PHP\php-5.0.3\ext\" in php.ini file
iv)i had copied the libmysql.dll in windows\system32 and windows\system
v)i also copied the php_mysql.dll to D:\PHP\

i wrote the following code:
<?php
$dbhost = "localhost";
$dbusername = "root";
$dbpassword = "admin";
$dbname = "test";
$connect = @mysql_connect ( $dbhost,$dbusername,$dbpassword ) or
die ("Could not connect ".mysql_error());
mysql_select_db($dbname,$connect) or
die("Could not select database".mysql_error());
?>

but after all these i am still getting the error
Fatal error: Call to undefined function mysql_connect() in
D:\PHP\teknohub\new.php on line 14

please help me to solve this problem out




-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux