Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help
Author Message
crabdance
Regular
Regular



Joined: Oct 20, 2006
Posts: 56

PostPosted: Sat Nov 04, 2006 1:40 pm Reply with quote

I get the following error(s) in my error_log file

Code:
function.mysql-real-escape-string</a>]: Access denied for user 'xxx'@'localhost' (using password: NO) in /home/xxx/public_html/modules/Multiheadlines/functions.php on line 289

[04-Nov-2006 13:20:45] PHP Warning:  mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in /home/xxx/public_html/modules/Multiheadlines/functions.php on line 289

[04-Nov-2006 11:02:41] PHP Warning:  mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: Access denied for user 'xxx'@'localhost' (using password: NO) in /home/xxx/public_html/modules/Multiheadlines/functions.php on line 580



line 289 in functions.php is: $title=mysql_real_escape_string(stripslashes(check_html($title, "nohtml")));

line 580 in functions.php is:
$db->sql_query("UPDATE ".$prefix."_multiheadlines_urls SET urls_infos='".mysql_real_escape_string($informations)."' WHERE urls_id = '".$url_id."'");


Multiheadlines seems to be working fine in my system so I don't understand why I would be getting these errors.

Any help greatly appreciated.... thanks
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Sun Nov 05, 2006 6:40 am Reply with quote

Warning - if you disclose your root path in a forum, it could be used against you by attackers. I removed it from your post.

That function appears to have been disabled by your host, or isn't available to your config.php database user. It won't prevent multiheadlines from working, but may cause problems if you have feeds with HTML in the title.

_________________
I search, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
crabdance







PostPosted: Sun Nov 05, 2006 8:36 am Reply with quote

Thank you kguske,

I didn't even think about exposing my root path. Thank you for changing it and helping me out. The problem is multiheadlines is using the wrong username and no password. Does anyone know where I change that?

thanks again
 
crabdance







PostPosted: Sun Nov 05, 2006 9:25 am Reply with quote

I think I have found the answer. I haven't had any errors in the error_log file for about 30 minutes so I think that it's safe to post this.

The answer is:
On line 289 and 580 use mysql_escape_string() function instead of mysql_real_escape_string()

I changed my code to this and so far have no more errors.

hope this helps someone and thanks to kguske for the help! Cool
 
kguske







PostPosted: Sun Nov 05, 2006 9:09 pm Reply with quote

Interesting - thanks for following up on this.
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sun Nov 05, 2006 9:11 pm Reply with quote

Yes thats the correct fix for that error.
 
View user's profile Send private message Send e-mail
kguske







PostPosted: Sun Nov 05, 2006 9:18 pm Reply with quote

Guardian pointed me towards multiheadlines recently, and it looks interesting, even though I'm not using it yet. It's better if we can avoid database-specific functions.

Nice to know that the problem is known and that is the correct fix for it.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Post Installation Help

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©