View Full Version : This happened when registering
SapphirePhoenix
12-18-2015, 12:15 AM
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/functions/functions_forums.php on line 87
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/functions/functions_forums.php on line 87
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/classes/class_cookies.php on line 85
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/classes/class_cookies.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/classes/class_cookies.php on line 90
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/classes/class_cookies.php on line 92
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/functions/functions_forums.php on line 87
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/functions/functions_forums.php on line 87
This happened when I was testing creating accounts. I was only testing to see if the welcome message worked. Also, when I clicked 'Manage Account' (this shows you finish registering) it logged me out.
The account's fine when I log in again and the welcome message did show.
Distortion
12-18-2015, 12:23 AM
Did you add kyttias's welcome pm code? If so, add your username to where it says YourUsernameHere in the code. The same goes with message title and content. Ex. below:
if($mysidia->input->post("submit")){
$document->setTitle($this->lang->success_title);
$document->addLangvar($this->lang->success.$mysidia->input->post("username").$this->lang->success2);
$pm = new PrivateMessage(); // Send them a welcoming message
$pm->setsender('SapphirePhoenix');
$pm->setrecipient(htmlentities(addslashes(trim($mysidia->input->post("username")))));
$pm->setmessage("Welcome", "Test text.");
$pm->post();
return;
}
The first error has nothing to do with it. It's the same problem I have as well.
SapphirePhoenix
12-18-2015, 12:27 AM
I added Kyttias's, which is for the version 1.3.4 and I put 'SYSTEM' for the YourUsernameHere part, it works fine.
Hall of Famer
12-18-2015, 10:37 AM
Well when posting threads like this, you need to give information about what modifications you have made to the script. Note by modification I mean script edits or file changes, not changes you made through admin control panel. This way it will be easier to get an idea of what problem you may be having.
SapphirePhoenix
12-20-2015, 05:11 AM
This is what I did:
http://mysidiaadoptables.com/forum/showthread.php?t=4231
I did the one Kyttias posted.
SapphirePhoenix
12-20-2015, 05:36 PM
I tried changing it back but there's still the same error. Is anyone else having this problem?
SapphirePhoenix
12-22-2015, 12:29 AM
@Hall of Famer , is this caused by forum integration?
Hall of Famer
12-22-2015, 01:16 AM
Most likely yes, without forum integration you wont see messages with keyword 'functions_forums'.
SapphirePhoenix
12-22-2015, 05:54 PM
Can I fix this? If not, would it be fine to just delete the forum?
Hall of Famer
12-22-2015, 06:03 PM
Well you can just disable forum integration, edit file inc/config_forum.php and change $mybbenabled from 1 to 0, and the error will go away.
SapphirePhoenix
12-22-2015, 07:30 PM
Thank you! And after that, is it possible for me to create an offsite forum and then link it to my site?
Hall of Famer
12-22-2015, 09:21 PM
Sure, you can upload a forum script to your server using FTP, install it and add it as a link from Mysidia's ACP.
SapphirePhoenix
01-10-2016, 12:33 AM
Does anyone know how to fix this?
Kyttias
01-10-2016, 09:43 AM
I think this comes down to some change (or lack thereof) that's been made on your end.
I could tell you exactly what the error means but I don't think it'll help all that much. So...Here's one source of information (http://stackoverflow.com/questions/2658083/setcookie-cannot-modify-header-information-headers-already-sent), but let me explain it in my own words: Basically headers are really picky. There cannot be any html, even whitespace, rendering before it's called. If it's rendering, say, an error message because it's looking for improper or incomplete config data, well, you'd get a header error instead of the error that would tell you that's what's wrong, unfortunately.
First off, make sure your inc/config_forums.php has the correct information AND that it should also go without saying that you also should have installed the forum by visiting it's url and creating an admin account for it - its not as simple as just dropping the files in. The prefix being correct is the most important part. The file I talk about below is going to look inside your database for data from a forum install with that prefix. So if the config data is correct and the forum properly installed, you should be able to log into the forum by visiting its url with the admin account you just created for it during it's install process. If all this is good, then it's not the problem.
Inside functions/functions_forums.php, which relies upon the information above being correct, the line the error is happening in is the function mybbsetcookie() which is called in mybbregister(), also in that file, from the file register.php. This should be working just fine - so long as nothing is being rendered to the page BEFORE this happens. Can you verify for me that absolutely no changes have been made to register.php by putting in a copy from a fresh version of the files?
But this isn't the only place where problems could have occurred. Afterall, $mysidia->user->register(); is called before mybbregister() and if it attempted to render anything to the page, even a blank space, this error would be happening. I'm pretty sure that function is being called up from it's location in classes/class_visitor.php (since the visitor class is what actually registers users and extends user) and it's register() function. All this function should be doing is adding a user to the database. Definitely not writing anything to the page, so it shouldn't be interfering. Put in a fresh copy of classes/class_visitor.php to confirm no changes were made here from the default?
If you've literally made no changes at all (or if your forum config was correct), I don't see how this would be happening.
It's also worth asking, if all the above is fine, what version of MyBB are you trying to integrate? It's best with v1.6, which is slightly older. (Other types of forum software will not work, period, unless you write your own integration technique and cookie forwarder.)
Hall of Famer
01-10-2016, 09:56 AM
Well her site is on my webhost, so the PHP version is 5.5 which shouldnt be a problem. I thought the problem was resolved last time, so I dont quite understand what the OP is asking for this time?
Kyttias
01-10-2016, 09:59 AM
It was never resolved. You asked her to turn off forum integration. Yes, that solved the problem, but she opened another thread asking how to integrate a forum and even PMed me about it. She knew she was doing something wrong (and I'm going to guess it was not installing the forum after putting the files in).
Hall of Famer
01-10-2016, 10:07 AM
I see. If she has an active site with users, its a bit harder to integrate the forum. I thought her forum integration was working before, unless my memory wasnt correct. In this case, it may be good to ask her when it stopped working all of a sudden. Or if my memory was indeed wrong, did it never work in the first place?
SapphirePhoenix
01-10-2016, 09:54 PM
The forum works fine, but when I register testing accounts (on my site, not the forum) there's this error:
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/functions/functions_forums.php on line 87
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/functions/functions_forums.php on line 87
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/classes/class_cookies.php on line 85
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/classes/class_cookies.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/classes/class_cookies.php on line 90
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/classes/class_cookies.php on line 92
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/functions/functions_forums.php on line 87
Warning: Cannot modify header information - headers already sent by (output started at /home/azurelia/public_html/functions/functions_forums.php:1) in /home/azurelia/public_html/functions/functions_forums.php on line 87
So...
Kyttias
01-10-2016, 10:35 PM
Did you try anything from my post a few posts ago (http://www.mysidiaadoptables.com/forum/showpost.php?p=33436&postcount=14)? I really feel something there should fix it. @w@
SapphirePhoenix
01-10-2016, 11:38 PM
Inside functions/functions_forums.php, which relies upon the information above being correct, the line the error is happening in is the function mybbsetcookie() which is called in mybbregister(), also in that file, from the file register.php. This should be working just fine - so long as nothing is being rendered to the page BEFORE this happens. Can you verify for me that absolutely no changes have been made to register.php by putting in a copy from a fresh version of the files?
But this isn't the only place where problems could have occurred. Afterall, $mysidia->user->register(); is called before mybbregister() and if it attempted to render anything to the page, even a blank space, this error would be happening. I'm pretty sure that function is being called up from it's location in classes/class_visitor.php (since the visitor class is what actually registers users and extends user) and it's register() function. All this function should be doing is adding a user to the database. Definitely not writing anything to the page, so it shouldn't be interfering. Put in a fresh copy of classes/class_visitor.php to confirm no changes were made here from the default?
I believe the problem is probably that part, but I have checked that the files weren't edited. But then this:
Afterall, $mysidia->user->register(); is called before mybbregister() and if it attempted to render anything to the page, even a blank space, this error would be happening.
Is something that I'm not 100% sure about, so can you please explain? :pleased:
EDIT:
Also, I have noticed that when I registered on other Mysidia sites with integrated forums, the same error shows up.
Kyttias
01-11-2016, 02:01 AM
The rest of that paragraph explains it? $mysidia->user->register(); (which exists in classes/class_visitor.php so I had you make sure no edits were made there) is called first. Simple as that? All it does is process the form and should not output any data.
Who else has an integrated forum? I do and I don't have this issue.
SapphirePhoenix
01-11-2016, 03:03 AM
If I recall correctly, mysgardia.com, which I registered yesterday and Distortion (in second post this thread) says they also have the problem...
Kyttias
01-11-2016, 05:13 AM
And what version of MyBB are you trying to install? Could be relevant.
SapphirePhoenix
01-11-2016, 06:03 AM
Well, I'm not sure, HoF installed it for me.
So, @Hall of Famer ?
Hall of Famer
01-11-2016, 06:31 AM
Yeah I remember, I did install it for her and integrated her site and forum a while ago. It clearly was working before, as I did a quick search in her site and forum databases in phpmyadmin. As you can see from the two screenshots, the users tables in site and forum databases start to diverge after user ID 25(until ID 24 everything was in sync), where the site has user 'test5' and the forum has user 'test7'. Everything has been out of sync after user ID 25:
http://oi64.tinypic.com/2f07fad.jpg http://oi68.tinypic.com/2q9031w.jpg
Site User Table Forum User Table
So what I conclude so far is that something happened at the time when she created the test user 5 and it was only inserted to adoptables site database but not forum database. It can be several reasons, and these are the questions that need to be answered:
1. Did she modify the script in some way that broke forum integration, at about the time account test 5 was created?
2. Was the site down/offline right after she created the account test5, so the forum user aint created properly?
3. Did anyone try to register on the forum, and not on the site? Its necessary to turn off forum registration.
SapphirePhoenix
01-11-2016, 06:50 AM
I turned off forum integration when I reached user TeddyBear. I didn't want to have an error showing and was considering whether I wanted it or not. But now I wanted it again.
Hall of Famer
01-11-2016, 09:26 AM
I see, so you temporarily turned off forum integration after user TeddyBear signed up? And when you registered account test5 you didnt have forum integration back on?
Anyway I did see that you posted this thread back on Dec 18th, and user TeddyBear signed up much later, which was Dec 23-24th. This means that forum integration was working for you, although you got some strange warning messages. These warning messages dont make your site malfunction though, just its a bit annoying I guess.
Now if you want to enable forum integration again, it will be very tricky. Its doable, just manually sync the IDs of your users from adoptables and forum database. However, this wont integrate accounts that are already out of sync, but it will make future registered users in sync from your site and your forum.
SapphirePhoenix
01-11-2016, 05:21 PM
Yes, I noticed, but I don't really mind because the accounts are all pretty much blank. Can anyone help with the errors?
SapphirePhoenix
01-12-2016, 04:52 AM
I googled the error and people said to check if there were any spaces before <?php. There was a space in config_forums.php but that doesn't do anything...
Kyttias
01-12-2016, 05:29 AM
I already explained it can be caused by anything being rendered to the page. With a default install and a forum properly installed, this does not happen. An error about your forum's configuration that you cannot see is being thrown, rendering an error to the page, resulting in a header error. Specifically one being caused when it is unable to set a cookie because cookie information does not exist.
1) Are the files I mentioned earlier all brand new with no changes? Yes/No?
2) Can you log in directly to your forum's admin area? (Note that this is not the same as logging into your site). Are you able to edit the forum's settings? Yes/No?
It's really not clear to me that you've tried anything I've suggested, so I can't help any more than I have. I really need confirmation feedback on all the instructions I've given so I can help pinpoint the problem.
SapphirePhoenix
01-12-2016, 04:56 PM
1-Yes
2-Yes.
Hmm, Kyttias, would you mind if I take a look at your config_forums.php? I think there may be something there.
Kyttias
01-12-2016, 07:38 PM
*shrug* Sure, if you think it'll help.
<?php
//Mysidia Adoptables Site Configuration File
//Forum Integration Info: MyBB
$mybbenabled = 1; // 0 = disabled, 1 = enabled
#
#
#
#
$mybbpath = '/forum';
$mybbprefix = 'mybb_'; // This is the default setting as you install MyBB forum, feel free changing it if you have a different prefix
$mybbremember = -1;
?>
I hid my mysql database info for the purposes of copy-pasting it up here, replacing it with #. (However, these four entries should match what you have in your normal config exactly.)
SapphirePhoenix
01-12-2016, 08:48 PM
Er, do you also mind if I take a look at your functions_forums.php? Sorry about bothering you!
Hall of Famer
01-12-2016, 09:43 PM
Well you shouldn't need to change anything in function_forums.php, it is a library file that does not have any configuration variables for you to set. I think to fix forum integration for you, you will need to change the auto increment ID for users table in both adoptables and forum database. I can do it for you if you don't know how to, then you can test it again and lemme know if it works for new registration.
SapphirePhoenix
01-12-2016, 10:20 PM
Okay! It's worth trying.
SapphirePhoenix
01-16-2016, 05:58 AM
Actually @Kyttias I double checked logging into my forum directly and found out that it doesn't work! I thought I did before...
What's the problem and is there a fix for this?
EDIT:
Changes made were changed back so the problem was there all along.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.