MyBB Community Forums

Full Version: Index.php doesn't open. Blank white page.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi!

http://www.saveondish.com/forum/index.php doesn't open for users that are not logged in, it works just fine for those that are logged in though. What do you think may be causing the problem? It was all good until the server upgraded PHP.

Thanks
It's saying the forum hasn't been installed...
I was trying to fix it, please check now.

Here's a link to one of the subcategories: http://saveondish.com/forum/dish-network...a-f-1.html so you can get inside at least and see that everything else is working.
Do you have any plugins that affect only guests and that only show on the index??
None that are enabled.

I have:

Ads after First Post
MyBB eCellular
MP3 MyCode
NoFollow
SEO Links

enabled.
To rule out plugins as a cause of this issue, please try the following. In ./inc/init.php, find the code:

define("TIME_NOW", time());

After this code, add this:

define("NO_PLUGINS", 1);

Then save and/or reupload this edited version of the file so the forum will run the new code.

This edit will stop plugins being run when a page on the forum is loaded; it will not edit, delete or reset any content the plugin has added or changed, it will just temporarily stop the plugins being loaded, so some features on your forum may be temporarily missing or broken whilst this code is in place. When you remove this code, plugins will work again exactly as they were before. This change helps us to see if a plugin is the cause of a problem, without you having to manually deactivate every single plugin, which would mean you may lose data from them.

If your issue is fixed when this code is added, then the cause of your issue is a plugin; please post a list of your plugins and we will try and help you find which one it may be. If the problem still happens with this code added, then it is unlikely a plugin is the cause, in which case we will investigate the issue further.

Thank you.
Alright, it works when I add the code!

So I suppose the issue we have here is the incompatibility of a plugin with PHP 5.2? (since that's the only change from before when it was working)

I hope its not SEO Links! I really need that plugin...

These are the ones that I have enabled:

Ads after First Post
MyBB eCellular
MP3 MyCode
NoFollow
SEO Links

Its the SEO Links plugin...

God damn... how am I supposed to fix this now.

Thanks for the help Matt!
Found this at the Plugin developer's website. A user had posted this information and it is lifesaving stuff people.

For anyone whose guests can't view half the stuff ever since you've switched over to PHP 5.

pozmu Wrote:I have similar problem, I have an announcement that is visible when you are logged in, but when you log-out the page with that announcement is completely blank (disabling the plugin fixes it)

Update: ok, I disabled Add nofollow? and it works, but there is something broken anyway... I would like use nofollow too :/

Update 2: Ok, I found source of the error... It's pcre.backtrack_limit setting - the actual error is PREG_BACKTRACK_LIMIT_ERROR.... In PHP 5.2.x they changed this value from pcre default to something like 100k... Which is too little.... Despite that, the way that mybb seo add "nofollow" to links isn't very good... don't get me wrong - I don't know if there is better way, it may be plugins system limitation, but now it scans whole page looking for links, including the post itself.... but maybe it should be done that way?
FIX
To fix this problem, you have to specify new value for pcre.backtrack_limit. You can do this in php.ini if you have access to it (just search for such string, uncomment it and change value) or you can do it directly in the script using ini_set function: go to line 471 of seo.php (inc/plugins directory) and add after {
ini_set("pcre.backtrack_limit",10000000);
I think 10000000 is default pcre value (as in previous php versions).
You can also add error message that will inform you if this backtracking error occurs again (fingers crossed): just add this at the end of line 472
if (preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR) {
    print 'preg backtracking limit error!';
}
To sum it up: it should look something like this: (starting from line 470):
	if ($mybb->user['usergroup'] == 1 && NOFOLLOW_UNF_LINKS == 1)
	{ ini_set("pcre.backtrack_limit",10000000);
		$page = preg_replace("#(<a.+?href=.+?(search|stats|usercp2|printthread|sendthread|showteam|memberlist|calendar|member|online|private|newreply|newthread|showthread|forumdisplay)\.php)(.+?)>(.+?)</a>#e", "seo_add_nofollow('\\1', '\\3', '\\4')", $page); if (preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR) {
    print 'preg backtracking limit error!';
}
	}