Dear Sir,
When I run this php script then system show some errors.
script and errors is below .....
Please advice me how can I resolv this problem.

/var/www/html/test2.php
-----------------------
<?
$dbuser = 'root';
$dbhost = 'localhost';
$dbpass = 'root';
$dbname = 'mysql';
$dbtable = 'user';
mysql_connect ($dbhost, $dbuser, $dbpass);
$mysql_link = mysql_connect($dbhost, $dbuser, $dbpass);
$column=mysql_list_fields($dbname,$dbtable,$mysql_link);
 for ($i=0;$i<mysql_num_fields($column);$i++)
  {
   print mysql_field_name($column,$i)."<br>";
  }
?>

Errors after browsing via web page:
-----------------------------------
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (111) in
/var/www/html/test2.php on line 7

Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (111) in
/var/www/html/test2.php on line 8

Warning: Supplied argument is not a valid MySQL-Link resource in 
/var/www/html/test2.php on line 9

Warning: Supplied argument is not a valid MySQL result resource in 
/var/www/html/test2.php on line 10

Regards,
Iqbal

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to