Welcome to all phpBB2 Refugees!This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area. |
|
Author |
Message |
Salvatos Board Member
Joined: 19 Feb 2009
Posts: 449 Location: Québec
|
Posted: Mon Nov 22, 2010 6:07 pm Post subject: Nothing shows up |
|
|
Alright, so I'll cut to the chase for once. I had a vanilla phpBB2 running on a local server (running Apache 2.2.14 (Ubuntu), PHP 5.3.2-1ubuntu4.5 and MySQL 5.1.41) flawlessly. I later decided to replace those files and database with my old site's files instead of remodding a fresh install. Note that I actually don't have any database linked to the forum at the moment, though.
What I don't understand is that while the vanilla phpBB2 I had installed to see if my server worked had no problem at all, now I get blank pages everywhere whether I try using the files from my current host or a new install. While I could have blamed the former on the modifications I did, the latter doesn't make any sense to me since the first vanilla install worked until I replaced the files.
I have tried the good old "add echoes everywhere to see where the code is stalled" approach. On a fresh install, I started looking in install/install.php of course. The first block seems to occur on line 208, in function guess_lang().
Code: | if (isset($HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE']))
{
$accept_lang_ary = explode(',', $HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE']);
for ($i = 0; $i < sizeof($accept_lang_ary); $i++)
{
@reset($match_lang);
while (list($lang, $match) = each($match_lang))
{
if (preg_match('#' . $match . '#i', trim($accept_lang_ary[$i])))
{echo "1";
if (file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $lang)))
{echo "2";
return $lang;
}echo "3";
}
}
}
} |
In this particular part, I get the first echo, but not #2 or #3 or anything I could put further down. Commenting the line that calls the function ($language = guess_lang();) removes all echoes but still returns a blank page, so I can proceed further down. I get stalled again at line 456:
Code: | // Open config.php ... if it exists
if (@file_exists(@phpbb_realpath('config.'.$phpEx))) |
At this point I'll have to guess there are three possible culprits:
1. the file_exists function;
2. the phpbb_realpath function;
3. the @ command (I never actually learned what that does or how it's called, to be honest).
That still wouldn't explain why my first install worked and not this one, since I didn't update anything software-wise since the last time I tried the first install (that is, last night). Anyway, I comment that out and keep going. Now I'm able to load the page, but since there's no language (setting it to 'english' manually doesn't seem to work), there's not much to see (see attachment). Still, if anyone has any idea what the problem could be... please let me know!
Description: |
|
Filesize: |
21.93 KB |
Viewed: |
1886 Time(s) |
|
|
|
Back to top |
|
|
Salvatos Board Member
Joined: 19 Feb 2009
Posts: 449 Location: Québec
|
Posted: Wed Nov 24, 2010 4:02 pm Post subject: Re: Nothing shows up |
|
|
Ah, man. Got it. Apparently my permissions were off on most folders so the includes didn't work, therefore the functions from functions.php crashed the page.
|
|
Back to top |
|
|
dogs and things Board Member
Joined: 18 Nov 2008
Posts: 628 Location: Spain
|
Posted: Wed Nov 24, 2010 4:57 pm Post subject: Re: Nothing shows up |
|
|
Glad you discovered that.
_________________ phpBB2 will never die, I hope! |
|
Back to top |
|
|
|
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0547 seconds using 18 queries. (SQL 0.0146 Parse 0.0103 Other 0.0298) |
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com
|
|