View Single Post
  #19 (permalink)  
Old 03-19-07, 16:33
workerbee07 workerbee07 is offline
Registered User
 
Join Date: Mar 2007
Posts: 1
still having trouble:(

I am using Apache2.0.52, PHP5 and mysql4.0.21..when i run this program:

<?php
// Connecting, selecting database
$link = mysql_connect('localhost', '***', '***')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('my_database') or die('Could not select database');

// Performing SQL query
$query = 'SELECT * FROM my_table';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());

// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";

// Free resultset
mysql_free_result($result);

// Closing connection
mysql_close($link);
?>

i get this error:
Fatal error: Call to undefined function mysql_connect() in C:\Apache2\htdocs\connection.php on line 3

I have copied libmysql.dll and libmysqli.dll to system32 folder of my windows Xp..i have copied my php.ini to windows

dir and edited it..like i have uncomment this: extension=php_mysql.dll

I have added this to my path variable:
;C:\php5;c:\mysql\bin ...

i have done this too...extension_dir = "C:\php5\ext"

So why i m still getting this error...my phpinfo() is showing me the page powered by zend tech..
Reply With Quote