tags:

views:

56

answers:

1

Hey all,

I've a really weird issue going on here. Am trying to migrate an installation of vBulletin 3.8.0 to a new server. Config of the new server is PHP 5.2.11 with APC, Apache 2.2.3, MySQL 5.0.84 and CentOS 5. I've transferred all the files perfectly and the error I get is:

Fatal error: Call to undefined function construct_forum_bit() in /var/www/forums/index.php on line 565

So I found out that function construct_forum_bit() is in includes/functions_forumlist.php file and changed line 61 inside index.php from

require_once(DIR . '/includes/functions_forumlist.php');

to

require(DIR . '/includes/functions_forumlist.php');

I know its weird but it did load the index.php page. But there are lot of other pages which had issues so I replaced all the require_once to require using the following command:

grep -rl require_once . | xargs sed -i -e 's/require_once/require/'

Doing this fixed lot of pages and left me with one strange problem. When I try to visit http:// forumsurl/member.php?u=5441 works but http:// forumsurl/member.php?u=337 doesnt work. It shows a blank page/white page. On what userid will it show the white page is intermittent but if it works it never breaks and if it doesnt it always shows the blank page.

On Google Chrome it says Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.

I've tried to repair all the tables but no luck.

So I started manual debug process and narrowed it down to following code where it breaks:


473 foreach ($blocklist AS $blockid => $blockinfo)
474 {
475     $blockobj = $blockfactory->fetch($blockinfo['class']);
476     $block_html = $blockobj->fetch($blockinfo['title'], $blockid, $blockinfo['options'], $vbulletin->userinfo);
477 
478     if (!empty($blockinfo['hook_location']))
479     {
480           $template_hook["$blockinfo[hook_location]"] .= $block_html;
481      }
482      else
483      {
484           $blocks["$blockid"] = $block_html;
485       }
486 }

I've put echo statement at different lines in the file and if I 'exit' before the above foreach it shows all the statements but it breaks inside the loop on the 6th iteration.

Can anyone help me out here? Thanks.

A: 

You should not change all instances of require_once to require, they don't do the same thing.

Diff your source against a clean copy downloaded from vBulletin.com. That will probably show you where the real error is.

Also, you should consider upgrading your copy of vBulletin. 3.8.0 has been out quite a while now and there are several issues which need to be patched.

Conor McDermottroe
Thank you for replying back. I know I need to upgrade to the latest version of vBulletin but am trying to figure out the source of the problem. 'require' did make the page working but something in 6th iteration of the foreach loop that breaks the script.So I setup a LAMP stack and installed PHP 5.3.3. To my surprise it worked properly! Though I didnt check the functionality of each and every link but most of it just worked. But sadly I'll have to stick with PHP 5.2.11 as I already have one big app running on it which is not yet ready for 5.3.x.
miles