forum.coppermine-gallery.net

Support => cpg1.6 bridging => cpg1.6.x Support => cpg1.6 bridge contributions => Topic started by: Fity on June 09, 2018, 09:10:17 am

Title: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 09, 2018, 09:10:17 am
I have been trialling CPG 1.6.03 and it has been functioning as expected up until now.  I enabled bridging and then the next screen that appeared was white screen with the following error message.

Quote
Coppermine critical error:
Unable to connect to UDB database !

Error: :

I can no longer access any page from Coppermine.  They all have the above message. I tried to access bridgemgr.php as suggested in the documents but the same error message appears and I can't disable bridging.

I tried a clean install of CPG1.6.03 with a new data base and the same bridging error occurred.

I know that bridging for VBulletin is for VB3, however I have used bridging with VB4 and CPG 1.5.x until a server configuration change to PHP7.1 which forced a Coppermine change.

Bridging was an important feature when selecting Coppermine.  Any ideas?
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 09, 2018, 09:13:43 am
I forgot to mention that I tried to repair the database tables in case that was the problem with no luck.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 10, 2018, 02:21:02 am
Use the installer stub to install/upgrade to CPG 1.6 with the very latest changes. (select the bottom choice, highlighted in red, in the installer)
http://forum.coppermine-gallery.net/index.php/topic,79013.msg383037.html#msg383037
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 10, 2018, 10:59:36 am
OK thanks. I will try that and post the results.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 11, 2018, 02:23:47 pm
I have reinstalled CPG with a new database using the stub suggestion above with no luck.  Every time that I enable bridging I loose CPG access with the same error message.  Any other suggestions?
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 14, 2018, 12:43:55 pm
 Any suggestions?  I am liking v1.6 a lot and would like to get the gallery live.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 14, 2018, 02:56:24 pm
If the vBulletin database is separate from the CPG database, make sure the correct credentials are configured for the bridge.

Or you can try installing CPG to use the same database as vB (with a different prefix).
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 15, 2018, 03:43:14 am
Thanks for the reply.

There are 2 databases, one for the forum and the other for CPG.  I am hesitant to use the same database for CPG and VB.

The structure is:

http://www.website.com/forum
http://www.website.com/gallery

In the bridging settings I have tried different paths with no luck.  Sometimes I can recover by clicking "back" and disabling bridging and other times the CPG installation is not accessible.

Could the problem be that there is also a CPG1.5 installation bridged to the same VB4?  Do I need to disable bridging in CPG1.5 before enabling cpg1.6?



Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 15, 2018, 06:45:52 am
These are the paths that I believe to be correct.

URL of bridging app:
http://www.website.com/forum

Relative path
../forum/
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 15, 2018, 12:19:02 pm
I can't put together a VB 4.2.5 instance to test with so you would have to give me access to your site to try to determine the problem. You would have to PM me with your site and its credentials or I can post a file for you to place in your site root that I can use to access everything I need.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 16, 2018, 12:25:26 pm
Here's the file. Place it unzipped, of course.

see next post first
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 16, 2018, 01:12:02 pm
I was just looking at things prior to doing any work at your site and may have come up with a solution.
Replace the vBulletin bridge file in your CPG 1.6 bridge folder with the one attached here (as .php).
Let me know if it solves the problem.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 18, 2018, 02:23:09 am
Thanks for the file.  I replaced the file in the bridging folder as suggested.  The error remains. :(
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: phill104 on June 18, 2018, 10:25:49 am
Did you remember to rename the file to end in.php
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 18, 2018, 10:46:57 am
Yes i removed the .txt and left it named the same as the original file.  The original file was renamed and left in the bridging folder. Will that be an issue?
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 19, 2018, 12:56:49 pm
Replace bridge/udb_base.inc.php with the attached file (as .php).
It will still fail but may give more indication of the error condition.

Are you using mysqli or PDO/mysql for the CPG 1.6 install?
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 20, 2018, 01:37:44 am
Thanks for the file.

cpg1.6 is MySQL. 

I replaced the file as suggested and the error message has a little more information.

Quote
Coppermine critical error:
Unable to connect to UDB database !

Error: 2005 : Unknown MySQL server host 'localhost:3306' (2)
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 20, 2018, 01:53:57 am
I forgot to mention that since replacing the vbulletin30.inc.php I have reliably backed out of the error message to the previous screen to disable bridging.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 20, 2018, 02:41:12 am
suggested and the error message has a little more information.

Great! Replace vbulletin30.inc.php again with the one attached here and (I'm hopeful) it'll run now.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 20, 2018, 02:54:20 am
I get a red error notification box with:

Quote
Critical error
There was an error while processing a database query
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 20, 2018, 03:30:21 am
 >:(
Can you please post 2 files here? Remove passwords but try not to change them in other ways.

<forum>/includes/config.php
and
<gallery>/include/config.inc.php

Or .. email them to me at ron4mac_(at sign)_me_dot_com
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 20, 2018, 03:50:18 am
Thanks for your efforts.

I will send you an email soon.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 20, 2018, 04:28:02 am
Email sent.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 20, 2018, 04:32:00 am
I get a red error notification box with:

Okay .. I think it is connecting to the database now, anyway.  Can you turn off bridging, turn debug mode on in CPG then try bridge mode again. Maybe we can see what SQL error it is getting.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 20, 2018, 04:42:46 am
Large red error notification box.  (I have removed the sensitive info)

Quote
Critical error

There was an error while processing a database query.


While executing query 'SELECT NULL FROM `******`.user LIMIT 1' in bridge/udb_base.inc.php on line 59

database error: 1142 : SELECT command denied to user '******'@'localhost' for table 'user'



File: /home/******/public_html/photo_gallery/include/functions.inc.php - Line: 253


This in the debug info box:

Quote
/include/init.inc.php
Notice line 198: Undefined index: log_retention
/bridgemgr.php
Notice line 137: Undefined variable: return
/bridge/vbulletin30.inc.php
Notice line 34: Constant USE_BRIDGEMGR already defined



Also I think I have lost access again as I receive this while trying to access any cpg page.

Quote
Fatal error:

While executing query 'SELECT NULL FROM `******`.user LIMIT 1' in bridge/udb_base.inc.php on line 59

database error: 1142 : SELECT command denied to user '******'@'localhost' for table 'user'
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 20, 2018, 05:31:25 am
Try commenting out line 36 in udb_base.inc.php
(put 2 forward slashes at the front of it)

Code: [Select]
// $this->can_join_tables = ($this->db['host'] == $CONFIG['dbserver'] . . . .
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 20, 2018, 05:45:28 am
Success! 

Commenting out that line has given me access to the cpg again and if I follow a link from Vbulletin bridging is working too.

I have only had a quick test but it appears to be operational.  Thanks for your help resolving this.  :D

Now to set up the gallery.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 20, 2018, 11:38:54 am
Great!!  Thanks for working through this with me. It would have been much easier had access to your site been possible.

Now I'll have to translate all this into permanent code changes to the distribution that will keep it from occurring in the first place.
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: Fity on June 20, 2018, 11:56:36 am
Glad to  help.  It was benefiting me too.

Was a change in VB4 causing the error?
Title: Re: Bridging CPG 1.6.03 with VBulletin 4.2.5 - Critical Error
Post by: ron4mac on June 20, 2018, 02:00:53 pm
Was a change in VB4 causing the error?

No, it involves MySQLi and bridging with different databases ... not so much with VB4.