problem with mysql_real_escape_string()



Hi to all!

I moved my website from one php4/mysql4 based server to new hosting
company and php5/mysq5 based server.
Everything worked fine on old server, though now, on one page after I
submit new record, I'll get this error:

Warning: mysql_real_escape_string() [function.mysql-real-escape-string
<https://www.mydomain.com/function.mysql-real-escape-string>
]: Access denied for user 'daemon'@'localhost' (using password: NO) in
/srv/www/mydomain/add_record.php on line 30

Warning: mysql_real_escape_string() [function.mysql-real-escape-string
<https://www.mydomain.com/function.mysql-real-escape-string>
]: A link to the server could not be established in
/srv/www/mydomain.com/add_record.php on line 30

and this is a code:

26 if(isset($_POST['SubmitNewRecord']))
27 {
28 foreach($_POST as $key => $value)
29 {
30 ${$key} = mysql_real_escape_string($value);
31 }
32 }

Never got such a error message before.

Any thoughts?

Thanks.

-afan
.



Relevant Pages

  • RE: The object invoked has disconnected from its clients.
    ... The latest server Usage Report email only contained this error message. ... It is recommended that you contact Microsoft Customer ... Support Services via telephone so that a dedicated Support ... Professional can assist you recover the server in a more efficient manner. ...
    (microsoft.public.windows.server.sbs)
  • Re: startx fails
    ... Subject: startx fails ... Have you looked in the paths shown in the error message? ... configure the netscape http server. ... install, or one on which people have done lots of patches? ...
    (comp.unix.sco.misc)
  • Re: Publishing WebForms to Production System
    ... Its already Off but same error message. ... <!-- CUSTOM ERROR MESSAGES ... Set trace enabled="true" to enable application trace logging. ... > and upload the modified web.config file to your server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Publishing WebForms to Production System
    ... Its already Off but same error message. ... <!-- CUSTOM ERROR MESSAGES ... Set trace enabled="true" to enable application trace logging. ... > and upload the modified web.config file to your server. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Problems Downloading Messages
    ... > Your server has unexpectedly terminated the connection. ... >> The full text of the error message would be helpful (blah, ... >> error message rather than retyping it. ... I have 4 email accounts one on our local network the others external. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)