Advanced search  

News:

cpg1.5.42 maintenance release - upgrade recommended
The Coppermine development team is releasing an update for Coppermine in order to fix several minor issues. All fixes are not security critical, so if your gallery is running fine with cpg1.5.36, cpg1.5.38 or cpg1.5.40 you don't need to upgrade. If you are running an older version than cpg1.5.36, you must update to this latest version as soon as possible because of the security impact!
[more]

Pages: [1]   Go Down

Author Topic: bridge with phpbb3  (Read 16634 times)

0 Members and 1 Guest are viewing this topic.

spyro00

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
bridge with phpbb3
« on: October 01, 2010, 05:36:26 PM »

im getting an error after activating the bridge with custom groups, before it was working ok withou custom groups
now every time i create a new category it gives me this error


error
While executing query 'INSERT INTO cpg14x_categorymap (cid, group_id) VALUES (0, 2)' in catmgr.php on line 594

mySQL error: Duplicate entry '0-2' for key 'PRIMARY'




debug



USER:
------------------
Array
(
    [ID] => d58d245b99a2a90403f9cc3f297815ab
    [am] => 1
    [lang] => portuguese
)

==========================
USER DATA:
------------------
Array
(
    [user_id] => 2
    [user_name] => admin
    [groups] => Array
        (
           
  • => 1

        )

    [disk_max] => 0
    [disk_min] => 0
    [can_rate_pictures] => 1
    [can_send_ecards] => 1
    [can_post_comments] => 1
    [can_upload_pictures] => 1
    [can_create_albums] => 1
    [has_admin_access] => 1
    [access_level] => 3
    [pub_upl_need_approval] => 0
    [priv_upl_need_approval] => 0
    [group_name] => Administrators
    [group_quota] => 0
    [can_see_all_albums] => 1
    [group_id] => 1
    [allowed_albums] => Array
        (
        )

)

==========================
Queries:
------------------
Array
(
   
  • => SELECT name, value FROM cpg14x_config [include/init.inc.php:178] (1 ms)
  • [1] => SELECT * FROM cpg14x_plugins ORDER BY priority
[include/plugin_api.inc.php:54] (0 ms)
    [2] => SELECT name, value FROM cpg14x_bridge [include/functions.inc.php:4408] (0 ms)
    [3] => SELECT user_id, user_password, group_id FROM `abaldaia_phbb1`.phpbb_sessions INNER JOIN `abaldaia_phbb1`.phpbb_users ON session_user_id = user_id WHERE session_id = '117a35ea07df14f2730aab9e8be8c498' [bridge/phpbb3.inc.php:131] (0 ms)
    [4] => SELECT u.user_id AS id, u.username AS username, user_password AS password, ug.group_id AS group_id FROM `abaldaia_phbb1`.phpbb_users AS u, `abaldaia_phbb1`.phpbb_user_group AS ug WHERE u.user_id=ug.user_id AND u.user_id='2' [bridge/udb_base.inc.php:70] (0 ms)
    [5] => SELECT MAX(group_quota) AS disk_max, MIN(group_quota) AS disk_min, MAX(can_rate_pictures) AS can_rate_pictures, MAX(can_send_ecards) AS can_send_ecards, MAX(can_post_comments) AS can_post_comments, MAX(can_upload_pictures) AS can_upload_pictures, MAX(can_create_albums) AS can_create_albums, MAX(has_admin_access) AS has_admin_access, MAX(access_level) AS access_level, MIN(pub_upl_need_approval) AS pub_upl_need_approval, MIN( priv_upl_need_approval) AS  priv_upl_need_approval FROM cpg14x_usergroups WHERE group_id in (1) [bridge/udb_base.inc.php:321] (0 ms)
    [6] => SELECT group_name FROM  cpg14x_usergroups WHERE group_id= 1 [bridge/udb_base.inc.php:325] (0 ms)
    [7] => SELECT lang_id FROM cpg14x_languages WHERE enabled='YES' [include/init.inc.php:326] (0 ms)
    [8] => SELECT user_favpics FROM cpg14x_favpics WHERE user_id = 2 [include/init.inc.php:384] (0 ms)
    [9] => DELETE FROM cpg14x_banned WHERE expiry < '2010-10-01 10:25:08' [include/init.inc.php:440] (0 ms)
    [10] => SELECT null FROM cpg14x_banned WHERE (user_id=2 OR '195.23.96.28' LIKE ip_addr ) AND brute_force=0 LIMIT 1 [include/init.inc.php:456] (0 ms)
    [11] => INSERT INTO cpg14x_categories (pos, parent, name, description) VALUES (10000, 0, 'ss', '') [catmgr.php:587] (0 ms)
    [12] => INSERT INTO cpg14x_categorymap (cid, group_id) VALUES (0, 2) [catmgr.php:594] (0 ms)
    [13] => SELECT COUNT(*) FROM cpg14x_pictures WHERE approved = 'NO' [include/functions.inc.php:2402] (0 ms)
    [14] => SELECT lang_id, abbr FROM cpg14x_languages WHERE available='YES' AND enabled='YES' [include/themes.inc.php:2315] (0 ms)
    [15] => DELETE FROM cpg14x_temp_messages WHERE time < 1285943108 [include/functions.inc.php:4903] (0 ms)
)

==========================
GET :
------------------
Array
(
    [op] => createcat
)

==========================
POST :
------------------
Array
(
    [parent] => 0
    [user_groups] => Array
        (
           
  • => 2

        )

    [name] => ss
    [description] =>
    [cat_submit] => Alterar/Criar categoria
    [form_token] => 3f5836408f176455913e9ca6bbb96684
    [timestamp] => 1285946664
    [cid] => 0
)

==========================
COOKIE :
------------------
Array
(
    [cpg15x_data] => YTozOntzOjI6IklEIjtzOjMyOiJkNThkMjQ1Yjk5YTJhOTA0MDNmOWNjM2YyOTc4MTVhYiI7czoyOiJhbSI7aToxO3M6NDoibGFuZyI7czoxMDoicG9ydHVndWVzZSI7fQ==
    [7d0d147a665830c5739864edcd30f874] => c3a01604274508d6597dcf6b5a92c60c
    [style_cookie] => null
    [phpbb3_envrd_u] => 2
    [phpbb3_envrd_k] =>
    [phpbb3_envrd_sid] => c1f63edf0f91071172efd6f3ac1a2225
    [phpbb3_envr_k] =>
    [phpbb3_envr_u] => 2
    [phpbb3_envr_sid] => 117a35ea07df14f2730aab9e8be8c498
)

==========================
VERSION INFO :
------------------
PHP version        5.2.14 OK   
MySQL version      5.1.50 OK   
Coppermine version 1.5.6  stable

==========================
Module: GD
------------------
Exact version                    2.0.34                     
GD Version                       bundled (2.0.34 compatible)
FreeType Support                 1                         
FreeType Linkage                 with freetype             
T1Lib Support                                               
GIF Read Support                 1                         
GIF Create Support               1                         
JPG Support                      1                         
PNG Support                      1                         
WBMP Support                     1                         
XPM Support                      1                         
XBM Support                      1                         
JIS-mapped Japanese Font Support                           

==========================
Key config settings
------------------
site_url             http://fotografar.com.pt/galeria/           
charset              utf-8                                       
allow_private_albums 1                                           
cookie_name          cpg15x                                     
cookie_path          /                                           
impath               /usr/bin/                                   
lang                 brazilian_portuguese                       
main_page_layout     breadcrumb/catlist/alblist/random,2/lastup,2
silly_safe_mode      0                                           
smtp_host                                                       
theme                curve                                       
thumb_method         im                                         

==========================
Plugins
------------------

==========================
Server restrictions
------------------
safe_mode                                                 
safe_mode_exec_dir                                       
safe_mode_gid                                             
safe_mode_include_dir                                     
sql.safe_mode                                             
disable_functions        dl                               
file_uploads             1                               
include_path             .:/usr/lib/php:/usr/local/lib/php
open_basedir                                             
allow_url_fopen          1                               
max_execution_time       30                               
max_input_time           60                               
upload_max_filesize      64M                             
post_max_size            64M                             
memory_limit             64M                             
suhosin.post.max_vars                                     
suhosin.request.max_vars                                 


==========================
Page (performance)
------------------
Parameter        Current Peak   
Memory usage     2.66 MB 4.04 MB
Page generation  90 ms   90 ms 
Page query time  1 ms    1 ms   
Page query count 16      16     


==========================
               
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: bridge with phpbb3
« Reply #1 on: October 01, 2010, 07:22:35 PM »

Not a valid bug report. Not even a valid support request. Moving from cpg1.5 Testing/Bugs to the corresponding support board. Provide the needed details as per documentation if you want help.
Logged

Nibbler

  • Guest
Re: bridge with phpbb3
« Reply #2 on: October 01, 2010, 07:30:43 PM »

Fix is to change include/functions.inc.php

Code: [Select]
function cpg_db_last_insert_id()
{
    return mysql_insert_id();
}

to

Code: [Select]
function cpg_db_last_insert_id()
{
    global $CONFIG;

    return mysql_insert_id($CONFIG['LINK_ID']);
}

Commited in 7947
Logged
Pages: [1]   Go Up
 

Page created in 0.073 seconds with 20 queries.