[FX.php List] Sudden errors in a shopping cart
Bob Patin
bob at patin.com
Fri Jan 27 15:03:20 MST 2006
On Jan 21, 2006, at 7:58 AM, Laura Long wrote:
> Here is some info I found, don't know if you will find this helpful or
> not...
>
> "Headers already sent" is a generic whine produced by PHP to indicate
> that:
>
> 1. you are doing something that needs to send headers to the browsers
> 2. headers have already been sent
Well, that one comes and goes... the one that is persistent is
"Warning: Cannot use a scalar value as an array in ../view_cart.php
on line 43"
I've found other sites that seem to have had this error at one time
(Google shows them), but in most cases, they apparently fixed the error.
Has anyone else had this one? How did you solve it?
>
> You need to do the session variable stuff before PHP has sent anything
> to the user.
I did; all the session stuff is at the very top of the page. I also
did as you suggested and re-examined my include files; the thing is,
these errors are showing up not just at the top of the page, but also
in the middle of a page where the page should be showing a list of
items in their shopping cart (so it's a piece of looping code using
"foreach").
Thanks,
Bob
>
>
> I'm seeing a strange error in a cart that I'm using, which was
> previously working perfectly.
>
> Here are the errors I see:
>
> <b>Warning</b>: session_start(): Cannot send session cache limiter -
> headers already sent (output started at /Library/WebServer/Documents/
> newmagic/cart/checkout2.php:1) in <b>/Library/WebServer/Documents/
> newmagic/cart/checkout2.php</b> on line <b>1</b><br />
> <br />
> <b>Warning</b>: Cannot use a scalar value as an array in <b>/Library/
> WebServer/Documents/newmagic/cart/checkout2.php</b> on line <b>16</
> b><br />
>
> I have other PHP-based sites working just fine; however, this one is
> now showing these errors...
>
> I tried echoing the error code, but it shows a zero.
>
> I'd appreciate any help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20060127/94a1d1c5/attachment.html
More information about the FX.php_List
mailing list