I see that its looking for mysql.sock in /tmp/mysql.sock but I searched on my system and only found mysql.sock in /var/lib/mysql/
is there a section where I need to change this setting? or a conf file? "Hans Prins" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Would you care to explain to the rest of the list how you intend to use > > mysql_error () to return connection failure information? > > > > It returns the text of the error message from previous MySQL operation > > Description: string mysql_error ( [resource link_identifier]) > > > > Seems to me that without a connection, we wouldn't have a valid > > link_identifier. > > maybe so, but it works nonetheless............. > > if for example the username stated in the connection initialization was > wrong it will print an error like: > > "Access denied for user: 'username@localhost' (Using password: YES)" > > MI, > > my code would look somethign like this: > > $link = @mysql_pconnect("localhost", "test1", "test1"); > > // If connection failed... > if (!$link) { > // Inform user of error and quit > print "Couldn't connect to database server<br>\n"; > print mysql_error(); > exit; > } > > > > "Jason K Larson" <[EMAIL PROTECTED]> schreef in bericht > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > Would you care to explain to the rest of the list how you intend to use > > mysql_error () to return connection failure information? > > > > It returns the text of the error message from previous MySQL operation > > Description: string mysql_error ( [resource link_identifier]) > > > > Seems to me that without a connection, we wouldn't have a valid > > link_identifier. > > > > What you probably should attempt going for is getting something back > > from PHP itself regarding the error returned when the mysql_connect > failed. > > > > Here's a snippet from: > > http://www.php.net/manual/en/language.operators.errorcontrol.php > > > > If the track_errors feature is enabled, any error message generated by > > the expression will be saved in the global variable $php_errormsg. This > > variable will be overwritten on each error, so check early if you want > > to use it. > > > > Hope that clears things up a bit. > > > > Regards, > > Jason k Larson > > > > > > > > Hans Prins wrote: > > > did you try: > > > print mysql_error(); > > > > > > "Ml" <[EMAIL PROTECTED]> schreef in bericht > > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > > > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php