|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-06-03 10:49 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 18:00:01 2025 UTC |
Description: ------------ i have loaded PHP 5.0.4 on Windows 2000 server, IIS 5 & MySQL 4.1. when i try to run a php script to establish a connection with MySQL, it gives me a Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\estbconn.php on line 2 in the script file. i am able to use MySQL @ command line. i have copied the file libmysql.dll to c:\winnt\system32 folder and it also exists in c:\PHP folder. i have also set the path in for C:\PHP. pls help me in order to enable me to execute more PHP scripts for MySQL database Reproduce code: --------------- <?php $connection=mysql_connect("localhost","root","sql123") or die("A connection to server could not be established"); echo "root user login in MySQL server @ localhost successful"; ?> Expected result: ---------------- connectivity to happen Actual result: -------------- Fatal error: Call to undefined function mysql_connect() in c:\Inetpub\wwwroot\estbconn.php on line 2