Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [Solved]: problem with smf bridge with modpack  (Read 4744 times)

0 Members and 1 Guest are viewing this topic.

darkpollo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
[Solved]: problem with smf bridge with modpack
« on: July 27, 2008, 11:14:56 pm »

Hi. I have got this old problem:
http://forum.coppermine-gallery.net/index.php/topic,37583.0.html

Code: [Select]
While executing query "SELECT c.msg_id, c.msg_author, c.msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, c.author_id, c.author_md5_id, c.msg_raw_ip, c.msg_hdr_ip, c.pid, u.avatar AS avatar_url FROM cpg14x_comments AS c LEFT JOIN `motos_smf`.smf_members AS u ON c.author_id=u.ID_MEMBER WHERE pid='382' ORDER BY c.msg_id ASC" on Resource id #25

mySQL error: No database selected

Fichero: /home/motos/public_html/galeria/include/functions.inc.php - Línea: 248 

Coppermine install:

http://www.todo-motos.es/galeria
Forum install: http://www.todo-motos.es/foros
Coppermine version: 1.4.18(stable)
Forum version: SMF 1.1.5
Test user account: test2 / testtest

URL del foro:      http://www.todo-motos.es/foros
ruta relativa de su archivo de configuración de la aplicación BBS's:    ../foros/
¿Usar grupos basados en POST?:    0
Path where avatars are stored:    avatars
Habilitar/deshabilitar integración con Simple Machines (SMF) 1.x

I have updated to the latest modpack as you suggest on the other topic with no solution.

Thanks

« Last Edit: August 29, 2008, 12:05:56 pm by Nibbler »
Logged

darkpollo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: problem with smf bridge with modpack
« Reply #1 on: July 28, 2008, 12:50:08 am »

I have setup a plugin to avoid the error but you can check it here:
http://www.todo-motos.es/galeria/displayimage.php?album=20&pos=2
Logged

darkpollo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: problem with smf bridge with modpack
« Reply #2 on: August 04, 2008, 03:12:28 pm »

Any news to that error?
Cause the plugin only jumps over it, but something is still broken on the web.

Thanks.
Logged

darkpollo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: problem with smf bridge with modpack
« Reply #3 on: August 29, 2008, 09:50:09 am »

Please, nobody knows how to help me?

Do you need more info?

Thank you.
Logged

Nibbler

  • Guest
Re: problem with smf bridge with modpack
« Reply #4 on: August 29, 2008, 11:44:03 am »

Look in bridge/udb_base.inc.php for this

Code: [Select]
function get_comments($pid, $comment_sort_order)

{

global $CONFIG;

if ($this->can_join_tables) {

$sql = "SELECT c.msg_id, c.msg_author, c.msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, c.author_id, c.author_md5_id, c.msg_raw_ip, c.msg_hdr_ip, c.pid, u.{$this->field['avatar_url']} AS avatar_url FROM {$CONFIG['TABLE_COMMENTS']} AS c LEFT JOIN {$this->usertable} AS u ON c.author_id=u.{$this->field['user_id']} WHERE pid='$pid' ORDER BY c.msg_id $comment_sort_order";



$result = cpg_db_query($sql, $this->link_id);

return $result;

} else { //no join -> we do not get the avatar URL and if needed we need to get it later on in another query

$sql = "SELECT c.msg_id, c.msg_author, c.msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, c.author_id, c.author_md5_id, c.msg_raw_ip, c.msg_hdr_ip, c.pid FROM {$CONFIG['TABLE_COMMENTS']} AS c WHERE pid='$pid' ORDER BY c.msg_id $comment_sort_order";



$result = cpg_db_query($sql);

return $result;

}

}

and try changing

Code: [Select]
$result = cpg_db_query($sql, $this->link_id);
to

Code: [Select]
$result = cpg_db_query($sql);
Logged

darkpollo

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 73
Re: problem with smf bridge with modpack
« Reply #5 on: August 29, 2008, 12:04:20 pm »

It works!

Thank you very much!

Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.