MyBB Community Forums

Full Version: redirect Page - Problem with Memory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I devloped an application that creates an user account, a new group and a private forum for our existing users.

Than I forwarded to this php page. It logs the user in automatically. But latly there is a problem with the memory.
In the error.log of my apache it always appears the massage: Allowed memory size of 8388608 bytes exhausted (tried to allocate 0 bytes).

here is the redirect page:
-
<?php
# define IN_MYBB in order to not fail with the check in inc/init.php
define("IN_MYBB", 1);

# regular code:
require "./global.php";

$cache->updateusergroups();
$cache->updateforums();
$cache->updateforumpermissions();
?>
 <script LANGUAGE="JavaScript">
    function redirectPage() {
      window.location.href=<?php echo '"http://www.something.com/forum/member.php?action=do_login&username='.$_GET["username"].'&password='.$_GET["password"].'"';?>
    }
  </script>
  <body onload="redirectPage()">
<table width="100%" height="100%">
    <tr><td align="center" valign="middle"><img src="../loadPic.gif"></td></tr>
    <tr><td align="right">
    <?php
        echo '<a href="http://www.something.com/forum/member.php?action=do_login&username='.$_GET["username"].'&password='.$_GET["password"].'" />If the site doesn\'t load automatically click here!</a>';
    ?>
    </td></tr>
    </table>
</body>
</html> 

I tried to comment a few lines out. And always when I enable the line $cache->updateforumpermissions(); this error happens again.
Maybe there is something in the db that I have to fix or the function updateforumpermissions does something that I didnt see.

Please help me!