MyBB Community Forums

Full Version: Cannot modify header information - headers already sent
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi. I recently(ish) changed my domain name and transferred all files from my old site to the new one and edited the config file to change the domain details. I got a few errors here and there, and I wasn't sure why so I decided to update the forum software. But I can't, when I try to login to start the update progress I get lots of errors and I'm unable to get any further:


Warning: Cannot modify header information - headers already sent by (output started at /home/mon94key/public_html/forum/inc/settings.php:1) in /home/mon94key/public_html/forum/inc/functions.php on line 1622

Warning: Cannot modify header information - headers already sent by (output started at /home/mon94key/public_html/forum/inc/settings.php:1) in /home/mon94key/public_html/forum/inc/functions.php on line 1622

Warning: Cannot modify header information - headers already sent by (output started at /home/mon94key/public_html/forum/inc/settings.php:1) in /home/mon94key/public_html/forum/inc/functions.php on line 1622

Warning: Cannot modify header information - headers already sent by (output started at /home/mon94key/public_html/forum/inc/settings.php:1) in /home/mon94key/public_html/forum/inc/functions.php on line 1622

Warning: Cannot modify header information - headers already sent by (output started at /home/mon94key/public_html/forum/inc/settings.php:1) in /home/mon94key/public_html/forum/inc/functions.php on line 1622

Warning: Cannot modify header information - headers already sent by (output started at /home/mon94key/public_html/forum/inc/settings.php:1) in /home/mon94key/public_html/forum/install/upgrade.php on line 228

---

Do you think you could help me please? Thank you all very much.
Did you edit settings.php in Notepad? Open it up in an editor such as Notepad++ and make sure there are no white spaces/blank lines before <?php.
Can't you change the domain details from the AdminCP?
Are your folders correctly chmodded? Especially the settings file. Is should be at least at 666, at 777 if you want to be super-sure its writeable.
(2011-02-13, 02:16 AM)Joshua Mayer Wrote: [ -> ]Did you edit settings.php in Notepad? Open it up in an editor such as Notepad++ and make sure there are no white spaces/blank lines before <?php.

There were none. I thought that might have been the problem before, so I took the settings.php file from the fully-working test site and copied it to the main site and changed the domain details, and that still didn't work...

(2011-02-13, 02:53 AM)fizz Wrote: [ -> ]Can't you change the domain details from the AdminCP?

I couldn't, no. The cookie paths were still set to the old domain so I couldn't change anything via the Admin CP.

(2011-02-13, 03:30 AM)Leefish Wrote: [ -> ]Are your folders correctly chmodded? Especially the settings file. Is should be at least at 666, at 777 if you want to be super-sure its writeable.

It was a 666. No change after changing to 777.
(2011-02-13, 03:33 AM)Faint Brushfire Wrote: [ -> ]
(2011-02-13, 02:53 AM)fizz Wrote: [ -> ]Can't you change the domain details from the AdminCP?

I couldn't, no. The cookie paths were still set to the old domain so I couldn't change anything via the Admin CP.

But..in the AdminCP under General Settings you can change the cookie domain and path?
(2011-02-13, 03:37 AM)fizz Wrote: [ -> ]
(2011-02-13, 03:33 AM)Faint Brushfire Wrote: [ -> ]
(2011-02-13, 02:53 AM)fizz Wrote: [ -> ]Can't you change the domain details from the AdminCP?

I couldn't, no. The cookie paths were still set to the old domain so I couldn't change anything via the Admin CP.

But..in the AdminCP under General Settings you can change the cookie domain and path?

You can't do that when it's storing the cookies in the wrong place/non-existing domain. It'll just send you bag to the log in screen every time you perform an action.
Ah lame. Yeah check for whitespace at the beginning or end of the file (before/after the <?php ?> tags), sometimes that'll cause PHP to throw an error
In theory, you can open your settings file and change the data in there - and in the db direct. Sort of cut out the ACP. Its a bit dodgy though....
Just delete ./inc/settings.php, it'll regenerate itself. If you still need to edit the cookie settings, you're going to have to edit them in the database, because you won't be able to edit them in the ACP if you're about to upgrade. Edit them in the settings table, then delete settings.php, and it'll be regenerated with the new settings. And, for future reference, don't use notepad to edit files, use wordpad or something else.
Pages: 1 2