| |
| |
|
|
|
|
| |
|
| |
|
| :: |
| Author |
Message |
aznole
Joined: 19 Nov 2006 Posts: 26
|
Posted: Sat Feb 17, 2007 8:53 pm Post subject: Error after installing Mixed Mod Re-write |
|
|
I used easy mod to install mixed mod rewriteand that went ok. I am running mxbb in root and phpbb is installed in a folder called /forum
After I install the mod I cannot navigate to any page in my site without getting the following error:
| Quote: |
Fatal error: Call to a member function on a non-object in /home/******/public_html/forum/includes/sessions.php on line 655 |
So when I go to sessions.php the offending code is as follows:
That specific line 655 is : | Quote: | | $url = $phpbb_seo->url_rewrite($url, $non_html_amp); |
If I logout of my site the error goes away, however as soon as I log back in it reappears. Also when I am logged out there aare no url's being rewritten at all.
I have removed the above code so my site will function but I'd like to get the rewrites working ...
any help greatly appreciated! |
|
|
| Back to top |
|
 |
|
 |
aznole
Joined: 19 Nov 2006 Posts: 26
|
Posted: Sat Feb 17, 2007 9:03 pm Post subject: Re: Error after installing Mixed Mod Re-write |
|
|
also ... when trying to view ANY forum I get the following error message:
| Quote: | | Fatal error: Cannot redeclare class phpbb_seo in /home/******/public_html/forum/phpbb_seo/phpbb_seo_class.php on line 16 |
That line says the following |
|
|
| Back to top |
|
 |
HB phpBB SEO Team

Joined: 16 Oct 2006 Posts: 809
|
Posted: Sun Feb 18, 2007 1:41 am Post subject: Re: Error after installing Mixed Mod Re-write |
|
|
What version are you installing and did you have prior versions installed? Based on your description, it sounds like you omitted this step:
| Code: | #
#-----[ OPEN ]------------------------------------------
#
common.php
#
#-----[ FIND ]------------------------------------------
#
if (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib');
}
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
include($phpbb_root_path . 'phpbb_seo/phpbb_seo_class.'.$phpEx);
$phpbb_seo = new phpbb_seo();
// www.phpBB-SEO.com SEO TOOLKIT END |
The "non object" call is probably from this code:
| Code: | #
#-----[ OPEN ]------------------------------------------
#
#
includes/sessions.php
#
#-----[ FIND ]------------------------------------------
#
function append_sid($url, $non_html_amp = false)
{
global $SID;
#
#-----[ AFTER, ADD]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
$url = $phpbb_seo->url_rewrite($url, $non_html_amp);
// www.phpBB-SEO.com SEO TOOLKIT END |
It expects that the global $phpbb_seo has already been initialized from the include in common.php above. Check your work and if you've had prior versions installed, double-check you haven't left any obsolete code behind.
PS: I don't recommend installing mods on a live board. You should setup a duplicate install folder (e.g., tforums) for testing. Ideally a mirror of your site including a copy of the database for testing is a wise decision. |
_________________ Dan Kehn |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14854
|
Posted: Mon Feb 19, 2007 11:03 pm Post subject: Re: Error after installing Mixed Mod Re-write |
|
|
I could as well be because mxBB is including some phpBB functions, apend_sid() being one of them.
But it's using it's own common.php file.
The trick is to do the following in the phpBB common.php :
| Code: | #
#-----[ FIND ]------------------------------------------
#
if (file_exists('install') || file_exists('contrib'))
{
message_die(GENERAL_MESSAGE, 'Please_remove_install_contrib');
}
#
#-----[ BEFORE, ADD ]------------------------------------------
#
if (!is_object($phpbb_seo)){
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
include($phpbb_root_path . 'phpbb_seo/phpbb_seo_class.'.$phpEx);
$phpbb_seo = new phpbb_seo();
// www.phpBB-SEO.com SEO TOOLKIT END
} |
And to do exactly the same in mxBB common.php.
Then, there may be some path issue in some links, depending on the mxBB and phpBB relative path, and the fact that mxBB uses, not necessary, but mxBB allow pretty trick folder structures.
It as well using a file named index.php, which will be rewritten as the forum one.
It's rather easy to prevent the rewriting when the append_sid function is called by mxBB, but this does not necessarily solve all the links, as phpBB can links to the portal as well.
If you're willing to give a try, it should no be too hard to fix, and I think the solution will be useful to some here.
Tell me a bit more about the way your portal and forum are installed. And better if you work on a local test server
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|
| |
|
|
|
|
| |
|
|
|
|
| |