mysql_real_escape_string()
| From: | Ron Piggott | Date: | Tue, 13 Nov 2007 02:22:46 +0000 |
| Subject: | mysql_real_escape_string() | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-44340@lists.php.net to get a copy of this message | ||
Last week the server my web site hosting company uses went down (along
with a bunch of other servers) My files have been moved to another
server the company uses. I am in the midst of configuring my site for
the new server.
Before the server went down I wasn't getting error messages. I know my
PHP code is ok. The new server is configured slightly differently. The
server is set up with the following:
Operating system Linux
Kernel version 2.4.21-47.0.1.ELsmp
Apache version 1.3.33 (Unix)
PHP version 4.3.10
MySQL version 4.1.22-standard
I am tweaking my site to make it work.
My actual question is this line of code:
$other = mysql_real_escape_string($other);
is giving me this error message:
Warning: mysql_real_escape_string(): Access denied for user
'nobody'@'localhost' (using password: NO) in /path/to/file/file.php on
line 148
Warning: mysql_real_escape_string(): A link to the server could not be
established in /path/to/file/file.php on line 148
I understand the error message and the request an open connection to the
database.
Where the previous server didn't require this I am wondering if there is
a line I may add to my .htaccess to by-pass this requirement. My
concern is that if I don't find all the instances I will have errors on
my site ... this is extensive to correct.
Suggestions?
Ron