Re: mysql_real_escape_string() question
- From: I.F.A.C.Fokkema@xxxxxxx ("Ivo F.A.C. Fokkema")
- Date: Thu, 28 Sep 2006 17:27:23 +0200
On Thu, 28 Sep 2006 11:06:45 -0400, tedd wrote:
Hi gang:
In one of my snip-its, namely:
http://xn--ovg.com/pdf
I was generating a pdf document after the user filled in a form. I
had been cleaning the user input by using --
$name = mysql_real_escape_string($name);
-- even though I wasn't using MySQL (the code was a cut-paste from
some other code I had).
However, everything worked!
But, a couple of days ago it suddenly stopped working. Now, I get the
following error:
Warning: mysql_real_escape_string(): Access denied for user
'nobody'@'localhost' (using password: NO) in ...
When I comment-out the offending statement, it runs. I replaced the
statement, but wonder what happened -- when did using
mysql_real_escape_string() require a password?
What's up with that? Any ideas as to what happened?
tedd
Hi Tedd,
According to
http://nl3.php.net/mysql_real_escape_string
The function requires a MySQL connection. If there is none, it
will try and create one. That fails now. Possibly you could use addslashes()?
Regards,
Ivo
.
- Follow-Ups:
- Re: [PHP] Re: mysql_real_escape_string() question
- From: "Eric Butera"
- Re: [PHP] Re: mysql_real_escape_string() question
- References:
- mysql_real_escape_string() question
- From: tedd
- mysql_real_escape_string() question
- Prev by Date: recv() socket question
- Next by Date: Re: [PHP] Re: mysql_real_escape_string() question
- Previous by thread: mysql_real_escape_string() question
- Next by thread: Re: [PHP] Re: mysql_real_escape_string() question
- Index(es):
Relevant Pages
|