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();
?>
$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
- Prev by Date: Building PHP fails - "incompatible implicit declaration of built-in function 'exit'" warning
- Next by Date: Can't install PHP > 5.2.0
- Previous by thread: Building PHP fails - "incompatible implicit declaration of built-in function 'exit'" warning
- Next by thread: Can't install PHP > 5.2.0
- Index(es):