Problem to access MYSQL through PHP

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



I am using php-5.2.5, IIS 5.1, MySQL mysql-5.0.51a in WinXP Service Pack 2 platform.
 
I have installed PHP php-5.2.5-win32-installer package. During Installation I choose IIS ISAPI Module and installed in C:\php directory with Entire Feature installing.
 
But, when I am trying to access MYSQL, then following line appears :-
 
<?
$user="root";
$password="admin";
$database="abc";
mysql_connect(localhost,$user,$password);
mysql_select_db($database) or die( "Unable to select database");
$query="CREATE TABLE contacts (id int(6) NOT NULL auto_increment,first varchar(15) NOT NULL,last varchar(15) NOT NULL,phone varchar(20) NOT NULL,mobile varchar(20) NOT NULL,fax varchar(20) NOT NULL,email varchar(30) NOT NULL,web varchar(30) NOT NULL,PRIMARY KEY (id),UNIQUE id (id),KEY id_2 (id))";
mysql_query($query);
mysql_close();
?>
 
Fatal error: Call to undefined function mysql_connect() in C:\Inetpub\wwwroot\mysql.php on line 5
I have changed PHP.INI under c:\php as following :-
extension_dir ="C:\PHP\ext", change the extension=php_mysql.dll under dynamic extension.
 
Still the error appears. How can I solve it. Pls, reply me immediately.
 
Attaching the PHP.INI also.
 
Thanking You.
Debasish Mondal


5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.

Attachment: php.ini
Description: 1376639456-php.ini


[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux