MyBB Community Forums

Full Version: Integrating MyBB into your website. (Login Form)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
Done it but

Warning: Cannot modify header information - headers already sent by (output started at /home/dot11/public_html/index.php:7) in /home/dot11/public_html/forum/inc/functions.php on line 1118

Any Help?
Jag100 Wrote:Done it but

Warning: Cannot modify header information - headers already sent by (output started at /home/dot11/public_html/index.php:7) in /home/dot11/public_html/forum/inc/functions.php on line 1118

Any Help?

Whitespace above <?php ?
Jag your sending output on line seven of index.php. You cannot do that until after global.php is in included.
Tkey Wrote:anyone help me?

We would be glad to help you if you submitted some more information instead of just the error, Tkey.

Would you like to post the problematic code for us?
Hi

I'm also getting header errors.

"Warning: Cannot modify header information - headers already sent by (output started at /usr/home/parties/domains/parties.net.nz/public_html/forum/test.php:1) in /usr/home/parties/domains/parties.net.nz/public_html/forum/inc/functions.php on line 1118"

I only get these errors when the user is not logged in, after the user is logged in I get no errors.

My entire web page is as follows and is in the same directory as the forums files

<?php
define('IN_MYBB',1);
require_once "./global.php";

if($mybb->user['uid'])
{
// The user is logged in, say Hi
echo "Hey, $mybbuser[username].<br>
Thanks for logging in.";
}
else
{
// The user is not logged in, Display the form
echo "<form action='member.php' method='post'>";
echo "Username: <input type='text' name='username' size='20' maxlength='30' /><br />";
echo "Password: <input type='password' name='password' size='20' />";
echo "<input type='hidden' name='action' value='do_login' />";
echo "<input type='hidden' name='url' value='test.php' />";
echo "<input type='submit' class='submit' name='submit' value='Login' /></form><br>";
}
?>

Can anyone help?

This is a brand new install of MyBB 1.2.6, and a simple test integration page.

From my limited understanding its something to do with setting cookies, which modifies the headers...
You need to remove any spaces or invisible characters before <?php in your test.php script.
Tikitiki Wrote:You need to remove any spaces or invisible characters before <?php in your test.php script.

Thanks that fixed it, had to use a hex editor to see them though!
I am having a little problem here...

I am using drupal as my home page and trying to put the login box in a block.

This is my file:
<?php
define("IN_MYBB", 1);
chdir('forum'); // path to MyBB
include './global.php';
?>
<HTML>
<?php
if($mybb->user['uid'] > 0) 
{
// The user is logged in, say Hi
echo "Hey, ".$mybb->user['username']."."; 
}
else
{
// The user is not logged in, Display the form
echo "<form action='http://forum.innogaming.net/member.php' method='post'>
Username: <input type='text' name='username' size='25' maxlength='30' /><br />
Password: <input type='password' name='password' size='25' />
<input type='hidden' name='action' value='do_login'>
<input type='hidden' name='url' value='http://innogaming.net/index.php' />
<input type='submit' class='submit' name='submit' value='Login' /></form><br>
<a title='Click here to register on our forums.' href='http://forum.innogaming.net/member.php?action=register'>Register</a>";
}
?>
</HTML>

It works when I go directly to the file, but when I use the include fuction in the block I get this error.
Fatal error: Call to a member function on a non-object in /homepages/44/d185031242/htdocs/ing/forum/inc/class_datacache.php on line 42

Any help?
Hey guys,

I've followed all the steps above but I have the following error:

Fatal error: Cannot redeclare redirect() in /home/tmcev0y/public_html/tin/mybb/inc/functions.php on line 540

Fatal error: Cannot redeclare class databaseengine in /home/tmcev0y/public_html/tin/mybb/inc/db_mysqli.php on line 0

Any idea how to solve it?
I have integrated mybb into a tracker well i riped of from a source and installed it on my source its pretty easy
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48