Fatal error after installing Zerodupe

Zero duplicate support forum.
Personalized HTTP 301 dynamic redirections.

Moderator: Moderators

Fatal error after installing Zerodupe

Postby Zhak » Sat Apr 21, 2007 6:29 pm

Hello, I've just followed the steps in phpBB-SEO-Mixed-Zero-dupe_V0.2.2.txt and I've uploaded the "contrib" dir to admin/mods/phpbb_seo/zerodupe/

My forum index now shows a blank page with this error:

Fatal error: Call to undefined function: seo_req_uri() in /home/content/h/i/d/hidextasy/html/foro/index.php on line 132

Thanks!
José Antonio Carvallo
Zhak
 
Posts: 6
Joined: Sat Apr 21, 2007 5:14 am

Advertisement

Postby HB » Sun Apr 22, 2007 3:57 pm

Did you install the rewrite mod first? It defines the phpbb_seo global variable that the zero dup mod is referring to.
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1211
Joined: Mon Oct 16, 2006 2:25 am

Postby Zhak » Sun Apr 22, 2007 5:47 pm

Hello HB, thank for your reply.
Of course I did, It was even working great (I installed the mixed mod rewrite), but URLs were something like topic10.html instead of topic-name-10.html, so I think I must install this first so the url will have the name injected. (I Think, XD).

Thank you.
Zhak
 
Posts: 6
Joined: Sat Apr 21, 2007 5:14 am

Postby HB » Mon Apr 23, 2007 2:29 am

The advanced rewrite mod is the one that injects titles into the URL. Double check your work and especially this part of the zero dup mod that defines the missing function cited above:

Code: Select all
#
#-----[ OPEN ]------------------------------------------
#

phpbb_seo/phpbb_seo_class.php

#
#-----[ FIND ]------------------------------------------
#

}
?>

#
#-----[ BEFORE, ADD ]------------------------------------------
#

   // --> Zero Duplicate
   /**
   * Custom HTTP 301 redirections.
   * To kill duplicates
   */
   function seo_redirect($url, $header = "301 Moved Permanently", $code = 301, $replace = TRUE) {
      global $db;
      if ( !empty($db) ) {
         $db->sql_close();
      }
      if (strstr(urldecode($url), "\n") || strstr(urldecode($url), "\r") || strstr(urldecode($url), ';url')) {
         message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
      }
      $http = (@function_exists("getallheaders")) ? "HTTP/1.1 " : "Status: ";
      header($http . $header, $replace, $code);
      header("Location:" . $url);
      exit();
   }
   /**
   * Helps out grabbing boolean vars
   */
   function seo_cond($bool = FALSE, $or = FALSE) {
      if ( $bool || ($this->do_redir && $or) ) {
         $this->do_redir = TRUE;
      }
      return;
   }
   /**
   * Returns the REQUEST_URI
   */
   function seo_req_uri() {
      // Apache mod_rewrite
      if ( isset($_SERVER['REQUEST_URI']) ) {
         return $_SERVER['REQUEST_URI'];
      }
      // IIS  isapi_rewrite
      if ( isset($_SERVER['HTTP_X_REWRITE_URL']) ) {
         return $_SERVER['HTTP_X_REWRITE_URL'];
      }
      // no mod rewrite
      return  $_SERVER['SCRIPT_NAME'] . ( ( isset($_SERVER['QUERY_STRING']) ) ? '?'.$_SERVER['QUERY_STRING'] : "" );
   }
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1211
Joined: Mon Oct 16, 2006 2:25 am

Re: Fatal error after installing Zerodupe

Postby dcz » Mon Apr 23, 2007 10:47 am

Zhak wrote:Hello, I've just followed the steps in phpBB-SEO-Mixed-Zero-dupe_V0.2.2.txt and I've uploaded the "contrib" dir to admin/mods/phpbb_seo/zerodupe/

As well, there is no such thing to do while installing the zero dupe.

You only need to edit files that should already be online (phpbb_seo_class.php, viewforum.php ...).

And, HB said, only the phpBB SEO advanced mod rewrite does inject topic titles.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Postby Zhak » Mon Apr 23, 2007 10:27 pm

Ouups, I see, thank you very much for your answers.

English isn't at all my main language, I've learnt it alone, and I think much users also did.

After reading this:
Description : This mod will URL rewrite phpBB URLs, injecting categories and forums titles in their URLS.
Topics remains statically rewritten (topicxx.html).


I don't know if the mod is the one I need or not because the example is a little contradictory with the description :P

I'll update to the advanced now,

Thank you very much!
Zhak
 
Posts: 6
Joined: Sat Apr 21, 2007 5:14 am

Postby dcz » Tue Apr 24, 2007 9:29 am

Zhak wrote:
I don't know if the mod is the one I need or not because the example is a little contradictory with the description :P


This does not concern the zero duplicate, but rather the mixed mod rewrite.

But after reading this post, I think we shall continue this in French, what do you think ?

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm


Return to Zero duplicate phpBB2

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 2 guests