Page 1 of 1

says it not connected when it is.

Posted: Wed Dec 18, 2002 7:30 pm
by Sevengraff
Ok, Im making a multi-user blog script (its here) and i am trying to make things a little easier by making a function that would print a specific blog. Now, the function works fine when I test it by itself, but when i use it in a script and then try to do other MySQL querries it gives me the error

Warning: Access denied for user: 'ODBC@127.0.0.1' (Using password: NO) in d:\program files\apache group\apache\htdocs\nlblog\view.php on line 200

Warning: MySQL Connection Failed: Access denied for user: 'ODBC@127.0.0.1' (Using password: NO) in d:\program files\apache group\apache\htdocs\nlblog\view.php on line 200

Warning: MySQL: A link to the server could not be established in d:\program files\apache group\apache\htdocs\nlblog\view.php on line 200
cant get list of comments. 13

when earlier in the script i connected and executed sevearl queries. what could be doing this?

Posted: Wed Dec 18, 2002 9:31 pm
by nathus
do you have a mysql_close anywhere in the code? if so I'd look at that as being the problem.

Posted: Wed Dec 18, 2002 9:33 pm
by Sevengraff
in the function there is a mysql_close, but that's on a different file with its own mysql_connect call. would that affect it?

Posted: Wed Dec 18, 2002 9:42 pm
by nathus
is that file used at all in the script giving you problems? earlier today I misplaced a } in a loop and ended up calling a mysql_close during a loop, which gave me an error message like what you're getting.

Posted: Wed Dec 18, 2002 9:43 pm
by Sevengraff
no, i use that file on every page, it holds all my functoins. but i only get an error when i use it on one page.

Posted: Wed Dec 18, 2002 10:52 pm
by nathus
could you post a bit of the code maybe?

you said the function works fine by itself, but when put in the application, it fails. looked over the error messages again, and it looks like you're trying to do a connect without a password. I do a lot of testing on my local machine, which doesn't have a password on the mysql server, and sometimes forget to change it on the remote site. could this be your problem?