Lampwrights Forum > Other Stuff > vBulletin Wordpress Bridge
Register Community Today's Posts Search

Reply
 
Thread Tools
05-29-2012, 03:53 AM   #1
Spikedadragon
Junior Member
 
Join Date: Mar 2011
Posts: 15
Rep Power: 0
Spikedadragon is getting browny points
Error in Vbulletin 4.2

Hello,

I know you have stated that this is for 3.x and have no intent on working with vb4.x, however it was working fine up to 4.1.12.

Just curious if you can help out and figure out why the error :
Fatal error: Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30

Is now appearing when going to the wordpress site, following upgrade to Vbulletin 4.2.0 ?

They may have changed something I suppose which makes the wordpress bridge no longer work.

This is line 29-38 on vb.php
Code:
 */
abstract class vB
{
    /*Properties====================================================================*/

    /**
     * Whether the framework has been initialized.
     *
     * @var bool
     */
    private static $initialized;
Also at the top of the file is this single line. I don't recall it before but never looked either.

<?php if (!defined('VB_ENTRY')) die('Access denied.');


Thanks!
D
Spikedadragon is offline   Reply With Quote

05-29-2012, 04:20 AM   #2
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
You could try adding this to your wp-config.php file:

PHP Code:
define('VB_ENTRY'true); 
I have no idea though, I am not running vb 4.x..
Jeff is offline   Reply With Quote
05-29-2012, 04:29 AM   #3
Spikedadragon
Junior Member
 
Join Date: Mar 2011
Posts: 15
Rep Power: 0
Spikedadragon is getting browny points
Man, I wish that was that easy... but nope

Trying to find out from VB what changed as well.
Spikedadragon is offline   Reply With Quote
05-29-2012, 04:50 PM   #4
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
Will need to see the error from your error log.
Jeff is offline   Reply With Quote
05-29-2012, 06:08 PM   #5
Spikedadragon
Junior Member
 
Join Date: Mar 2011
Posts: 15
Rep Power: 0
Spikedadragon is getting browny points
Quote:
Originally Posted by Jeff View Post
Will need to see the error from your error log.
Unfortunately this is all you gt in the error log.

Code:
[29-May-2012 11:59:31] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 13:41:30] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 17:03:03] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 18:00:22] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 18:12:39] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 18:35:53] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 19:06:00] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 19:55:25] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 20:43:10] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 20:51:25] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 20:58:56] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 21:23:58] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 22:07:15] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 22:07:16] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30 [29-May-2012 22:07:18] PHP Fatal error:  Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30
Spikedadragon is offline   Reply With Quote
05-29-2012, 06:23 PM   #6
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
Well, if 4.x has a class called VB, then yeah, that is going to cause issues because I named the class VB in the loader. You could try renaming my class and then editing every instance of:

PHP Code:
VB::instance()-> 
To:

PHP Code:
NEW_CLASSNAME::instance()-> 
And any instance of:

PHP Code:
new VB
To:

PHP Code:
new NEW_CLASSNAME
I guess I should rename this class in the next version, but just have no time for it now.
Jeff is offline   Reply With Quote
05-29-2012, 06:28 PM   #7
Spikedadragon
Junior Member
 
Join Date: Mar 2011
Posts: 15
Rep Power: 0
Spikedadragon is getting browny points
Interesting. Didn't think those conflicted.

I'll give it a try and let you know
Spikedadragon is offline   Reply With Quote
05-29-2012, 07:30 PM   #8
Spikedadragon
Junior Member
 
Join Date: Mar 2011
Posts: 15
Rep Power: 0
Spikedadragon is getting browny points
Hey Jeff,

It's working!
Renamed all $VB class/instances/occurences to $WPVB4 which hopefully vbulletin's developers have no need to use hah.

Just to be sure though were there any other files to the plugin but vbloader.php and vbbridge.php ?
Spikedadragon is offline   Reply With Quote
05-29-2012, 07:31 PM   #9
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
That's it.
Jeff is offline   Reply With Quote
05-29-2012, 07:33 PM   #10
Spikedadragon
Junior Member
 
Join Date: Mar 2011
Posts: 15
Rep Power: 0
Spikedadragon is getting browny points
Quote:
Originally Posted by Jeff View Post
That's it.
Hah great, thank you!

Hopefully this thread helps others then as that's one update on vbulletin that they changed something that actually broke the plugin that's based for vb3
Spikedadragon is offline   Reply With Quote
05-31-2012, 07:09 AM   #11
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
I will have to change this class name in the next version just to avoid headaches lol.. Once I get some free time, I will do that and package it up.
Jeff is offline   Reply With Quote
05-31-2012, 07:18 AM   #12
Spikedadragon
Junior Member
 
Join Date: Mar 2011
Posts: 15
Rep Power: 0
Spikedadragon is getting browny points
Quote:
Originally Posted by Jeff View Post
I will have to change this class name in the next version just to avoid headaches lol.. Once I get some free time, I will do that and package it up.
It'll probably be easier if you do so. There are after all a ton of instances in the two files. I thought I caught them all, then did a recursive find and found a few I missed but in the end, works great.

I can attach my vbbridge.php and vbloader.php files later if it helps.
Spikedadragon is offline   Reply With Quote
06-01-2012, 01:32 AM   #13
ChaseH
Junior Member
 
Join Date: May 2012
Posts: 1
Rep Power: 0
ChaseH is getting browny points
Quote:
Originally Posted by Spikedadragon View Post
It'll probably be easier if you do so. There are after all a ton of instances in the two files. I thought I caught them all, then did a recursive find and found a few I missed but in the end, works great.

I can attach my vbbridge.php and vbloader.php files later if it helps.
If you could, that would be great. I *think* I have it working, but every now and then I get some errors. Thanks
ChaseH is offline   Reply With Quote
06-01-2012, 02:45 AM   #14
Spikedadragon
Junior Member
 
Join Date: Mar 2011
Posts: 15
Rep Power: 0
Spikedadragon is getting browny points
Quote:
Originally Posted by ChaseH View Post
If you could, that would be great. I *think* I have it working, but every now and then I get some errors. Thanks
No problem. Attached as .zip. since php files arne't allowed to attach.
Keep in mind this isn't checked over by Jeff!
It's also not been widely used as the site I work with is currently 'renovating' the design so we haven't even fully opened the access outside the Admin and Moderator groups
Attached Files
File Type: zip vbbridge_classedit.zip (10.0 KB, 134 views)
Spikedadragon is offline   Reply With Quote
07-29-2012, 10:42 PM   #15
Kwith
Junior Member
 
Join Date: Jul 2012
Posts: 1
Rep Power: 0
Kwith is getting browny points
I'm getting a different error than what is on here. Now, I'm running VB 4.2 and WP 3.4.1 so this may very well be the issue but this is what its saying:

Warning: include_once(/home/thegc315/public_html/wordpresstest/wp-content/plugins/vbbridge/vbloader.php) [function.include-once]: failed to open stream: No such file or directory in /home/thegc315/public_html/wordpresstest/wp-content/plugins/vbbridge.php on line 47

Warning: include_once() [function.include]: Failed opening '/home/thegc315/public_html/wordpresstest/wp-content/plugins/vbbridge/vbloader.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/thegc315/public_html/wordpresstest/wp-content/plugins/vbbridge.php on line 47

Fatal error: Class 'WPVB4' not found in /home/thegc315/public_html/wordpresstest/wp-content/plugins/vbbridge.php on line 49

I tried using the posted files but it still says the same thing when I go to activate the plugin. Any ideas?
Kwith is offline   Reply With Quote
08-05-2012, 05:44 AM   #16
insulinclub
Junior Member
 
Join Date: Aug 2012
Posts: 1
Rep Power: 0
insulinclub is getting browny points
Quote:
Warning: Invalid argument supplied for foreach() in /var/ww/html/wordpress/wp-content/plugins/vbbridge/vbbridge.php on line 87

Warning: Cannot modify header information - headers already sent by (output started at /var/www/ml/wordpress/wp-content/plugins/vbbridge/vbbridge.php:87) in /var/www/ml/wordpress/wp-includes/pluggable.php on line 881
Can somebody help me ?

Last edited by insulinclub; 08-05-2012 at 06:02 AM.
insulinclub is offline   Reply With Quote
08-05-2012, 09:09 AM   #17
Jeff
Administrator
 
Jeff's Avatar
 
Join Date: Jul 2010
Posts: 402
Rep Power: 10
Jeff is getting browny points
This plugin does NOT work for vbulletin 4.
Jeff is offline   Reply With Quote
08-28-2012, 12:37 PM   #18
opersme
Junior Member
 
Join Date: Aug 2012
Posts: 2
Rep Power: 0
opersme is getting browny points
Spike,

May i know which version of Wordpress you are using on vBulletin 4.1.12 ?



Quote:
Originally Posted by Spikedadragon View Post
Hello,

I know you have stated that this is for 3.x and have no intent on working with vb4.x, however it was working fine up to 4.1.12.

Just curious if you can help out and figure out why the error :
Fatal error: Cannot redeclare class vB in /home/halkum1/public_html/vb/vb.php on line 30

Is now appearing when going to the wordpress site, following upgrade to Vbulletin 4.2.0 ?

They may have changed something I suppose which makes the wordpress bridge no longer work.

This is line 29-38 on vb.php
Code:
 */
abstract class vB
{
    /*Properties====================================================================*/

    /**
     * Whether the framework has been initialized.
     *
     * @var bool
     */
    private static $initialized;
Also at the top of the file is this single line. I don't recall it before but never looked either.

<?php if (!defined('VB_ENTRY')) die('Access denied.');


Thanks!
D
opersme is offline   Reply With Quote
Reply

Tags

vbulletin wordpress bridge



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 10:02 PM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2024, vBulletin Solutions, Inc.