[EMAIL PROTECTED] wrote: > Hi Jule !!! > > This can be a socket error. > Sometimes when installing PHP/Mysql as binary dist PHP > does not know where mysql socket is. > > The default is (AFAIK) /tmp/mysql.sock > > Make a test: > Try to connect with mysql console with exactly > the same info as You use in Your PHP script. > shell#> mysql -hlocalhost -u theUser -p db_name > > If you connect succesfully then run command: > mysql> status > > Mysql shows some info about the connection and You should > see where the mysql socket is located. > > PHP test: > create a file phptest.php > <?php > phpinfo(); > ?> > > this file shows detailed information about mysql. > Find mysql info and mysql.sock > > If PHP is NOT using the same file tehn You propably > find the error !! You can then open php.ini, edit > "path to mysql.sock" to match with the one shown by > mysql console, then restart apache and try again... > > Good Luck > > =d0Mi= > > >>Hey guys, >>i'm getting this error with the following sql script using php: >>--error-- >>Warning: Supplied argument is not a valid MySQL-Link resource in >>/var/www/phpquiz/register_user.php on line 12 >>--error-- >> >>--script-- >>$link_glob = "mysql_connect('$host_glob', '$un_glob', '$pw_glob')"; >>$query = "INSERT INTO user values('0', '$fname', '$lname', '$email', >>'$username', PASSWORD('$password')"; >>$result = mysql_db_query('$db_glob', '$query', $link_glob'); >>if (!$result) { >>echo "<font size=+1>Your Information could not be entered into the >> > > > > --------------------------------------------------------------------- > 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 >
The strange thing i also noticed about this error, is that mysel_error() doesn't give any output.. Jule -- Jule Slootbeek [EMAIL PROTECTED] http://blindtheory.cjb.net --------------------------------------------------------------------- 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