coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: scifirocket21 on August 14, 2006, 04:31:43 AM

Title: Bridging and Plug-in Problems
Post by: scifirocket21 on August 14, 2006, 04:31:43 AM
I have my Coppermine photo gallery bridged with PHPBB2.  When I try to install plug-ins, I usually ends up in a database error.  I tried the same files on a non bridged gallery and it worked fine.  What do I do? :(
Title: Re: Bridging and Plug-in Problems
Post by: Joachim Müller on August 14, 2006, 07:36:42 AM
Posting a link to your page and the actualy mySQL error you get (note: do not post debug_ouput, but only the error message) might help.
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 14, 2006, 10:35:58 PM
Error Message:
Critical error
There was an error while processing a database query

URL: http://www.mydpnet.com/videos/index.php
Title: Re: Bridging and Plug-in Problems
Post by: Joachim Müller on August 14, 2006, 11:46:51 PM
Turn debug mode on, leave notices turned off, post the actual error message.
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 15, 2006, 02:47:02 AM
Here is what I get now:

While executing query "SELECT * FROM cpg_mark_users WHERE user_id = 2" on 0

mySQL error:
Title: Re: Bridging and Plug-in Problems
Post by: Joachim Müller on August 15, 2006, 07:42:48 AM
What's the actual error message? What's your coppermine database table prefix? Does the table actually exist that the error message complains about?
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 15, 2006, 09:19:13 AM
It would probably be best if you looked here: http://www.mydpnet.com/videos/index.php.

The debug mode is on, so you should find what you are looking for.
Title: Re: Bridging and Plug-in Problems
Post by: Joachim Müller on August 15, 2006, 09:47:36 AM
Quote from: GauGau on August 15, 2006, 07:42:48 AM
Does the table actually exist that the error message complains about?
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 18, 2006, 12:50:15 AM
cpg_mark_users does not exist apprently.  I think that this table is removed or changed when I bridged coppermine with phpbb because coppermine's user thing (i dont know what to call it) reads off of the phpbb user thing.

(Sorry I'm vauge)
Title: Re: Bridging and Plug-in Problems
Post by: Sami on August 18, 2006, 08:30:33 AM
The cpg_mark_user is the custom (plugin) made table for CPGMark plugin , if it's not there then try to removing cpgmark from your cpg_plugins table manualy by phpmyadmin then try to install the plugin again
Title: Re: Bridging and Plug-in Problems
Post by: Jale Crni on August 18, 2006, 09:03:23 PM
where to download bridge between SMF  and Coppermine?    please help me
Title: Re: Bridging and Plug-in Problems
Post by: Sami on August 18, 2006, 09:25:42 PM
- Next time Please do not post to unrelated thread , create you own new thread ...
- Read the documentation & search board before post an issue
- SMF bridge is already under standard installation package , you don't need to download it if you already have installation package of CPG 1.4.8 you need to enable it under bridge manager
Title: Re: Bridging and Plug-in Problems
Post by: Jale Crni on August 18, 2006, 10:25:15 PM
Quote from: bmossavari on August 18, 2006, 09:25:42 PM
- Next time Please do not post to unrelated thread , create you own new thread ...
- Read the documentation & search board before post an issue
- SMF bridge is already under standard installation package , you don't need to download it if you already have installation package of CPG 1.4.8 you need to enable it under bridge manager
Ok, sorry.  I asked administrator (before posting in this thread) for help becouse i know that i'm asking noob  questions, but he didin't answer.
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 18, 2006, 10:39:51 PM
Quote from: bmossavari on August 18, 2006, 08:30:33 AM
The cpg_mark_user is the custom (plugin) made table for CPGMark plugin , if it's not there then try to removing cpgmark from your cpg_plugins table manualy by phpmyadmin then try to install the plugin again
It didn't work.  I still get error messages which can be seen at www.mydpnet.com/videos.  It appears that bridging CPG with another application removes any "users" tables from the CPG database, and reads all the user information from whatever you bridge CPG to.  I guess that's why it says this:
While executing query "SELECT * FROM cpg_mark_users WHERE user_id = 2" on 0

mySQL error:


The plug in works fine when CPG is not bridged.  So I know that something has to be wrong on CPG side, and it most likely has something to do with how CPG and PHPBB (the forum I'm using) share user information.  Other than that, I know nothing.  I tried re-installing CPG, but the same exact errors occured.

Sorry for rambling, I guess I'm trying to talk myself into solving the problem.  lol.

Any ideas?  (Thank you for your help so far.)
Title: Re: Bridging and Plug-in Problems
Post by: Nibbler on August 18, 2006, 10:51:52 PM
Bridging doesn't remove anything. If the table is not there then why don't you just create it and see what happens?


CREATE TABLE `cpg_mark_users` (
  `user_id` int(11) NOT NULL default '0',
  `use_watermark_img` tinyint(4) NOT NULL default '0',
  `img_vpos` varchar(10) NOT NULL default '',
  `img_hpos` varchar(10) NOT NULL default '',
  `use_watermark_txt` tinyint(4) NOT NULL default '0',
  `watermark_text` varchar(255) NOT NULL default '',
  `watermark_text_size` tinyint(4) NOT NULL default '0',
  `large_watermark_text_size` tinyint(4) NOT NULL default '0',
  `watermark_text_color` varchar(6) NOT NULL default '',
  `txt_vpos` varchar(10) NOT NULL default '',
  `txt_hpos` varchar(10) NOT NULL default '',
  PRIMARY KEY  (`user_id`)
) TYPE=MyISAM;
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 18, 2006, 11:05:33 PM
That error is gone, but now I need to creat table cpg_mark_config?  I must have installed the plug-in incorrectly, otherwise these tables would be where they were supposed to be.  I FTP the plug-in folder to the plug-ins folder on CPG.  Did I do somthing wrong, or am I skipping some step?
Title: Re: Bridging and Plug-in Problems
Post by: Nibbler on August 18, 2006, 11:09:41 PM
You should upload and then install the plugin using the plugin manager interface. Make sure your mysql user actually has permission to create new tables.
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 19, 2006, 12:51:30 AM
I'm about to go insane.
I re-uploaded the whole CPG gallery again, and then bridged it with my PHPBB forum.  I then uploaded and installed the plug-in using the Plug-in manager (I had to change the CHMOD of the plug-ins folder to 777, I assume you have to do that to upload the plug-ins (it worked)).  And i still get the same error messages.  I checked to make sure that the user can create tables.  It said that the user had all privileges. 

What confuses me is the message I get after I install the plug-in.  I shouldn't get the the following message with a clean installation of CPG, should I?

Performing Database Updates
CREATE TABLE `cpg_mark_watermark` ( `pid` INT NOT NULL, `watermarked` TINYINT NOT NULL, PRIMARY KEY (`pid`) ) TYPE=MyISAM Already Done
CREATE TABLE `cpg_mark_users` ( `user_id` int(11) NOT NULL default '0', `use_watermark_img` tinyint(4) NOT NULL default '0', `img_vpos` varchar(10) NOT NULL default '', `img_hpos` varchar(10) NOT NULL default '', `use_watermark_txt` tinyint(4) NOT NULL default '0', `watermark_text` varchar(255) NOT NULL default '', `watermark_text_size` tinyint(4) NOT NULL default '0', `large_watermark_text_size` tinyint(4) NOT NULL default '0', `watermark_text_color` varchar(6) NOT NULL default '', `txt_vpos` varchar(10) NOT NULL default '', `txt_hpos` varchar(10) NOT NULL default '', PRIMARY KEY (`user_id`) ) TYPE=MyISAM Already Done
CREATE TABLE `cpg_mark_config` ( `name` varchar(40) NOT NULL default '', `value` varchar(255) NOT NULL default '', PRIMARY KEY (`name`) ) TYPE=MyISAM Already Done
INSERT INTO `cpg_mark_config` VALUES ('watermark_path', 'watermarks/') Already Done
INSERT INTO `cpg_mark_config` VALUES ('small_watermark_image', 'watermark.png') Already Done
INSERT INTO `cpg_mark_config` VALUES ('large_watermark_image', 'watermark_large.png') Already Done
INSERT INTO `cpg_mark_config` VALUES ('display_image_mark', '0') Already Done
INSERT INTO `cpg_mark_config` VALUES ('upload_mark', '1') Already Done
INSERT INTO `cpg_mark_config` VALUES ('user_watermark', '0') Already Don

And then after I click next, it takes me to this error message (which we have already seen): While executing query "SELECT * FROM cpg_mark_users WHERE user_id = 2" on 0

mySQL error:


I noticed that it creaded the CPG Mark row in the plug-ins table of the database, but it won't create any other tables even if the user has all privileges.

Any more ideas?
Title: Re: Bridging and Plug-in Problems
Post by: Nibbler on August 19, 2006, 01:15:39 AM
Stop re-installing; Coppermine is not windows. Looks to me like the user does not have the CREATE TABLE privilege. Running the queries manually appears to solve your issues, so I would suggest running the rest of the create table statements via phpmyadmin or whatever you use.
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 19, 2006, 03:15:01 AM
The only reason I re-installed the script was because I thought I might have done some damage to the database after playing with it.  I'll try manually creating the tables again and see what happens.
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 19, 2006, 03:18:55 AM
Quote from: Nibbler on August 19, 2006, 01:15:39 AM
Stop re-installing; Coppermine is not windows. Looks to me like the user does not have the CREATE TABLE privilege. Running the queries manually appears to solve your issues, so I would suggest running the rest of the create table statements via phpmyadmin or whatever you use.

It would appear that the user does not have the CREATE TABLE privilege, but under the same user, it can create tables - only if CPG insn't bridged. 
Title: Re: Bridging and Plug-in Problems
Post by: Nibbler on August 19, 2006, 03:26:58 AM
Ah, I see what the issue is. There is a bug with the installer for the plugin, it uses mysql_query instead of cpg_db_query. If you change

mysql_query

to

cpg_db_query

in codebase.php then it should install correctly.
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 19, 2006, 04:23:00 AM
Quote from: Nibbler on August 19, 2006, 03:26:58 AM
Ah, I see what the issue is. There is a bug with the installer for the plugin, it uses mysql_query instead of cpg_db_query. If you change

mysql_query

to

cpg_db_query

in codebase.php then it should install correctly.

It didn't work.  I dont think there is anything wrong with the plug-ins themeselves.  I think that this could be a bridging issue.  If I disable bridging, the plug-in works, but if bridging is enabled, then CPG doesn't work and you get the errors I stated before.
Title: Re: Bridging and Plug-in Problems
Post by: Joachim Müller on August 19, 2006, 05:23:30 AM
Quote from: Jale Crni on August 18, 2006, 10:25:15 PM
Ok, sorry.  I asked administrator (before posting in this thread) for help becouse i know that i'm asking noob  questions, but he didin't answer.
Yes, you send me a PM, which clearly shows that you didn't read board rules (you agreed to respect them when signing up) nor my signature. Stay out of this thread. Read the documentation instead.
Title: Re: Bridging and Plug-in Problems
Post by: Sami on August 19, 2006, 06:07:40 AM
As nibbler said there is a bug under codebase.php , you can test it your self , just take a look at forum's (bridged phpbb) database
Is there a cpg_mark_user table ? if yes then you need to do as nibbler suggested again:
1- remove plugin from cpg_plugins table manualy
2- edit codebase and change mysql_query to cpg_db_query
3- try to install the plugin again
Title: Re: Bridging and Plug-in Problems
Post by: scifirocket21 on August 19, 2006, 07:41:12 AM
Hooray!  It finally worked!  Thanks to everyone who helped and put up with me.  Your help and support is greatly appreciated.