Hey Guys & Gals 😉

Well........:glare: ......here I go again....LOL, my new portal for my forum set up is working and I like it a lot, BUT I have one snag, I can't log in through it because I get this /Forum/Forum instead of just one /Forum now if I click on a topic from this portal it brings me there ok, but people may get confused and it should be fixed, any ideas how or what I should look at to get this solved??

thank you :o

    Well I am having same problem with my godaddy hosting. It seems to be an error of how paths get resolved when we redirect. If you does "full URL redirect whenever needed instead of just doing

    header("Location: index.php");

    use

    header("Location: http://www.yourdomain/index.php");

    will solve it

      SumitGupta wrote:

      Well I am having same problem with my godaddy hosting. It seems to be an error of how paths get resolved when we redirect. If you does "full URL redirect whenever needed instead of just doing

      header("Location: index.php");

      use

      header("Location: http://www.yourdomain/index.php");

      will solve it

      Thanks for the info. But where should I change that info? Right now my portal template looks like this:

      $phpbb_root_path = './Forum/'; 
      
      define ('IN_PHPBB', true);
      
      if (!file_exists($phpbb_root_path . 'extension.inc'))
      {

      actually the above code I think is ok but I beleave its in this area that I am having the problems:

      <form action="<?php echo $phpbb_root_path; ?>login.php" method="post" target="_top">
      <span class="gensmall">
      <?php echo $lang['Username']; ?>:<br />
      <input type="text" name="username" size="20" maxlength="40" value="" /><br />
      <?php echo $lang['Password']; ?>:<br />
      <input type="password" name="password" size="20" maxlength="25" /><br />
      <input type="checkbox" name="autologin" /> <?php echo $lang['Log_me_in']; ?>
      <br />&nbsp;<br />
      <?php
         //
         // NOTE: Redirecting to the portal after login works only
         // if the portal.php is within your phpBB2 root folder. If
         // you move the portal.php outside the root folder you will
         // have to change the redirect value by hand. See also
         // http://www.phpbbfetchall.com/docs/redirecting/
         // for further information.
         // ($phpbb_root_path, 0, -1)
      ?>
      <input type="hidden" name="redirect" value="<?php echo substr($phpbb_root_path, 0, -1) . $PHP_SELF; ?>" />
      <input type="hidden" name="sid" value="<?php echo $userdata['session_id']; ?>" />
      <input type="hidden" name="outside" value="1" />
      <div align="center"><input type="submit" class="mainoption" name="login" value="<?php echo $lang['Login']; ?>" />
      <br />&nbsp;<br />
      <a href="<?php echo append_sid($phpbb_root_path . 'profile.php?mode=sendpassword'); ?>"><?php echo $lang['Forgotten_password']; ?></a></div>
      </span>
      </form>

      I have noticed some thing strange here with this code bellow when used as you see it I get the /Forum/Forum instead of /Forum/login.php if I put a space before login.php I get /Forum/%20login.php

      <form action="<?php echo $phpbb_root_path; ?>login.php" method="post" target="_top">

      I think there might be a bug fix for this......???

        your last comment is what I mean, use complete URL or set your baseURL tag in HTML to correct the error

          SumitGupta wrote:

          your last comment is what I mean, use complete URL or set your baseURL tag in HTML to correct the error

          I tried that and it did not work not sure why, I tried all kinds of combinations, and the only thing that my portal will open with is how you see it bellow here, also it says don't use a URL BUT at the same time I am not sure how to do it the way you suggested but I will look into learning about the baseURL tag, thanks for the tips. 😉

          // This path points to the directory where phpBB is installed. Do
          // not enter an URL here. The path must end with a trailing
          // slash.
          //
          // Examples:
          // forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ccc/
          // --> $phpbb_root_path = './';
          // forum in /aaa/bbb/ccc/ and script in /aaa/bbb/
          // --> $phpbb_root_path = './ccc/';
          // forum in /aaa/bbb/ccc/ and script in /aaa/bbb/ddd/
          // --> $phpbb_root_path = '../ccc/';
          //
          
          $phpbb_root_path = './Forum/'; //was ./Forum/
          
          define ('IN_PHPBB', true);
          
          if (!file_exists($phpbb_root_path . 'extension.inc'))
          {
          	die ('<tt><b>phpBB Fetch All:</b>
          		$phpbb_root_path is wrong and does not point to your forum.</tt>');
          }

            I tried all this:

            <form action="login.php" method="post" target="_top">

            and it don't go to the /Forum/ folder

            <form action="./login.php" method="post" target="_top">

            same results and then I try this:

            <form action="Forum/login.php" method="post" target="_top">

            and I get this /Forum/Forum/login.php and thats no good there is only one Forum folder......LOL I can't figure this out :glare:

            and if I put the full path then the scrip at top puts in double URL's

              Write a Reply...