Forums / Addon Payment Modules / Warning: Cannot modify header information - headers already sent by (using Worldpay)

Warning: Cannot modify header information - headers already sent by (using Worldpay)

Locked
Results 1 to 20 of 20
This thread is locked. New replies are disabled.
01 Nov 2007, 16:21
#1
dfltech avatar

dfltech

New Zenner

Join Date:
Nov 2007
Posts:
4
Plugin Contributions:
0

Warning: Cannot modify header information - headers already sent by (using Worldpay)

Hi,

Home :: WorldPay

Warning: Cannot modify header information - headers already sent by (output started at /home/golfgym/public_html/store/includes/templates/template_default/common/html_header.php:22) in /home/golfgym/public_html/store/includes/functions/functions_general.php on line 44


Above is the warning message I am getting, does anyone have any idea on this ??

Please help, this is creating problems for us...

the above is the error when the payment is processed:
https://select.worldpay.com/aequitas/card

is this to to do something with the redirect back to the website ?

html_header.php line 22 has the below code:

<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>


functions_general.php line 44 contains:
header('Location: ' . $url);



Any help is appreciated..

Thank you
01 Nov 2007, 19:22
#2
dfltech avatar

dfltech

New Zenner

Join Date:
Nov 2007
Posts:
4
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

Hi,

This is really a urgent issue, please help...

Moderators, members, administartors help.................
01 Nov 2007, 20:36
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

dfltech:


Warning: Cannot modify header information - headers already sent by (output started at /home/golfgym/public_html/store/includes/templates/template_default/common/html_header.php:22)


Typing "headers already sent" into the search field in the FAQ area brings up a couple articles. The first one is this:
https://www.zen-cart.com/tutorials/index.php?article=87
02 Nov 2007, 11:18
#4
dfltech avatar

dfltech

New Zenner

Join Date:
Nov 2007
Posts:
4
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

Thanks for that, but i have tired to get a fresh file by downloading the zen cart and then uploading that file, but still the same error.... :(

any other thoughts on this ????

Thank you
03 Nov 2007, 14:23
#5
dfltech avatar

dfltech

New Zenner

Join Date:
Nov 2007
Posts:
4
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

I am sorry to say, but the error seems to be beyond the support of the zen cart vendor itself.....
03 Nov 2007, 14:30
#6
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Posts:
4,572
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

If you're not happy with the script you can always ask for your money back. :wink2:

Otherwise, were edits done to the files in question? That specific error msg. is common when syntax has been incorrectly changed. This can include spaces after the ?> at the page bottom.
03 Nov 2007, 16:53
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

It would seem that you have something running in a template file which is trying to do a redirect *after* the page has started drawing ... hence the "headers already sent" message appearing when the redirect header-change function gets called.

You made mention of "Worldpay". What happens if you turn off the worldpay module and enable the Check/MoneyOrder module instead? Does the error go away? If so, then logic would suggest that the problem is somewhere in the Worldpay module you're using.
04 Nov 2007, 00:47
#8
linivan avatar

linivan

New Zenner

Join Date:
Oct 2007
Posts:
1
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

DrByte:

It would seem that you have something running in a template file which is trying to do a redirect *after* the page has started drawing ... hence the "headers already sent" message appearing when the redirect header-change function gets called.

You made mention of "Worldpay". What happens if you turn off the worldpay module and enable the Check/MoneyOrder module instead? Does the error go away? If so, then logic would suggest that the problem is somewhere in the Worldpay module you're using.


Hi all

I have the same problem.
I believe nothing to do with the additional space problem.
If I don't select worldpay and use paypal or COD, then everythinng works fine.
05 Nov 2007, 12:29
#9
beatnik avatar

beatnik

New Zenner

Join Date:
Aug 2006
Posts:
53
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

Website Rob:

If you're not happy with the script you can always ask for your money back. :wink2:

Otherwise, were edits done to the files in question? That specific error msg. is common when syntax has been incorrectly changed. This can include spaces after the ?> at the page bottom.


That worked for me... Thanks
28 May 2008, 17:39
#10
digimac avatar

digimac

New Zenner

Join Date:
Oct 2007
Posts:
8
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

Hi Guys,

Hope you can help.
I have the same issue as described in one of the above posts:
Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/includes/templates/ZC03C00094/common/html_header.php:22) in /home/*****/public_html/includes/functions/functions_general.php on line 44

I have tried everything suggested in this post and others and am still getting this error.

The error is appearing when Worldpay calls back to the Zen Cart site so the order doesn't complete as the callback is incomplete.

I have tried reinstalling worldpay, changing templates, all the suggestions that have been made in this thread so far and still no luck.

The site is Zen Cart version 1.3.7 and the server is running PHP 5.2.5
Any help with this issue would be much appreaciated.

Cheers
Brian
29 May 2008, 13:00
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

So, what exactly did you do about the error happening in your html_header.php file? (as per the FAQ I mentioned in my earlier post in this thread)

And who built your template? Maybe they can be of some assistance in fixing the problem?
30 May 2008, 10:55
#12
digimac avatar

digimac

New Zenner

Join Date:
Oct 2007
Posts:
8
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

Hi Dr Byte,

Thanks for the response.
I have had a look at the files in question and checked for any spaces at the end of php tags, removed any that I found, tried using the classic template instead of the one being used on the site and still got the same error message.
I reinstalled worldpay using the most recent download available just in case something in there wasn't working correctly.

Im basically at a total loss as to what to try next

Cheers
Brian
30 May 2008, 13:45
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

If you've tried switching to "classic" template, did the error message change at all?
Because ... the message you quoted was specific to your ZC03C00094 template:

digimac:


Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/includes/templates/ZC03C00094/common/html_header.php:22)
30 May 2008, 14:22
#14
digimac avatar

digimac

New Zenner

Join Date:
Oct 2007
Posts:
8
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

This is the warning I get using the classic template

Warning: Cannot modify header information - headers already sent by (output started at /home/*****/public_html/includes/templates/template_default/common/html_header.php:22) in /home/*****/public_html/includes/functions/functions_general.php on line 43

Thanks again for the help
Brian
30 May 2008, 15:11
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

Okay, must be something unique to your payment module.

A regular Zen Cart page starts drawing its page content via html_header.php.
The only reason to get a "headers already sent" error in that case is if you're using addon code that attempts to redirect to another page after already drawing part of the current page ... which must be what your payment module is trying to do somehow.
30 May 2008, 16:14
#16
digimac avatar

digimac

New Zenner

Join Date:
Oct 2007
Posts:
8
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

I replaced the install of worldpay with the one available in the downloads section of Zen Cart and still get the same error when I am transfered back to the Zen cart site from worldpay.

I have not modified the worldpay module code in anyway. Is there any other files that are called in the callback process that might be causing this error?

Cheers
Brian
30 May 2008, 17:18
#17
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

Someone familiar with the worldpay module would be better suited than me to answer those questions. I've never used it.
30 May 2008, 17:25
#18
misty avatar

misty

Inactive

Join Date:
Apr 2004
Posts:
5,752
Plugin Contributions:
1

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

Developer of World Pay mod's support thread can be found at
http://www.zen-cart.com/forum/showthread.php?t=39106
HTH
04 Jun 2008, 17:57
#19
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Posts:
86
Plugin Contributions:
1

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

got mine working again from blank page errors, i installed debug_error_logging_utility_1-0.zip , this helped me narrow it down to a file named english.php in my /www/includes/languages/ and another copy in my custom folder. they both had rogue white space at the end.. changing template to default b4 fixing corrected error, removing white space did to bet i can keep using my custom template.
28 Jan 2010, 04:48
#20
spazem avatar

spazem

New Zenner

Join Date:
Dec 2009
Posts:
9
Plugin Contributions:
0

Re: Warning: Cannot modify header information - headers already sent by (using Worldpay)

thankyou for this help in this thread. The debugger utility saved me. I have been racking my brain for hours on a fix. It was the space at the end of my english.php

when someone has a chance can you please goto our site and just add something to your cart to check that its not a white screen. more testing doesn;t help.

www.registersonline.com.au

i am very knew at this and doing this for my work. its a steep learning curve but all the forums help saves the day again

very happy :):)