coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: MoskmaN on June 09, 2008, 07:37:15 AM

Title: Bug in Coppermine with SMF if user not logged in
Post by: MoskmaN on June 09, 2008, 07:37:15 AM
I have the problem , "query error conecting with database"
The error pops when i have not a user logged.
I solved the problem editing /include/init.inc.php
Line 395

when:

$user_id = USER_ID;
$result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_BANNED']} WHERE (ip_addr='$raw_ip' OR ip_addr='$hdr_ip' OR user_id='$user_id') AND brute_force=0");


replace with:

$user_id = USER_ID;
IF (empty($user_id)) {$user_id=´guest´;}; 
$result = cpg_db_query("SELECT * FROM {$CONFIG['TABLE_BANNED']} WHERE (ip_addr='$raw_ip' OR ip_addr='$hdr_ip' OR user_id='$user_id') AND brute_force=0");
Title: Re: Bug in Coppermine with SMF if user not logged in
Post by: Joachim Müller on June 09, 2008, 07:45:20 AM
Not a valid bug report. If you actually want to report a potential bug, post the details described in the sticky thread on this board.
Title: Re: Bug in Coppermine with SMF if user not logged in
Post by: MoskmaN on June 09, 2008, 07:47:49 AM
sorry for the problem, please you can move the topic to that section?
Title: Re: Bug in Coppermine with SMF if user not logged in
Post by: MoskmaN on June 09, 2008, 07:52:46 AM
i forgot post this

SMF v1.1.5  Coppermine v1.4.18
Title: Re: Bug in Coppermine with SMF if user not logged in
Post by: Joachim Müller on June 09, 2008, 08:00:28 AM
Quote from: MoskmaN on June 09, 2008, 07:47:49 AM
please you can move the topic to that section?
I already told you that yours is not a valid bug report, so I won't move this thread to the bugs board
Quote from: Joachim Müller on June 09, 2008, 07:45:20 AM
Not a valid bug report.
You should do as I suggested:
Quote from: Joachim Müller on June 09, 2008, 07:45:20 AM
post the details described in the sticky thread on this board.
The thread I refered to is When requesting bridge support - mandatory! (http://forum.coppermine-gallery.net/index.php/topic,24032.0.html).
Title: Re: Bug in Coppermine with SMF if user not logged in
Post by: MoskmaN on June 09, 2008, 08:04:18 AM
i cant have permission for post in there!  >:(
my user here is new.
Title: Re: Bug in Coppermine with SMF if user not logged in
Post by: Joachim Müller on June 09, 2008, 08:09:25 AM
Exactly: you don't have permissions to start new threads on the bugs board, because we don't want postings like yours to go into the bugs board. Only threads that are valid bug reports will be moved there by a moderator.
Start by reading my reply and doing as I suggested there instead of arguing about why you can't post on the bugs board. I already told you what you need to do to make your thread a valid bug report. Currently, your posting is just invalid. Period.