Please Help!!
Moderator: General Moderators
Please Help!!
Hello,
My programmer is on vacation and this mourning I woke up and our shop is giving this error.
Warning: Cannot send session cookie - headers already sent by (output started at /home/www/veneerz/setup.php:1032) in /home/www/veneerz/shop.php on line 4
Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/veneerz/setup.php:1032) in /home/www/veneerz/shop.php on line 4
Our server recently switched to PHP 4.2.2 and the site was written for an older version 4.0.1 I think. May this be a reason for a conflict?
Please if anyone knows head me in the right direction to where to look for an error. I am not a PHP expert but I am a fast learner and almost sure that can fix this bug if at least know what exactly causes it.
Here are the 4 lines from shop.php:
<?php
include("setup.php");
session_cache_limiter('private');
session_start();
My programmer is on vacation and this mourning I woke up and our shop is giving this error.
Warning: Cannot send session cookie - headers already sent by (output started at /home/www/veneerz/setup.php:1032) in /home/www/veneerz/shop.php on line 4
Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/veneerz/setup.php:1032) in /home/www/veneerz/shop.php on line 4
Our server recently switched to PHP 4.2.2 and the site was written for an older version 4.0.1 I think. May this be a reason for a conflict?
Please if anyone knows head me in the right direction to where to look for an error. I am not a PHP expert but I am a fast learner and almost sure that can fix this bug if at least know what exactly causes it.
Here are the 4 lines from shop.php:
<?php
include("setup.php");
session_cache_limiter('private');
session_start();
session_start(); needs to be at the very top
Code: Select all
<?php
session_start();
include("setup.php");
session_cache_limiter('private');
?>Thank you DSM.
I changed the order. but now a new error comes up:
Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition cart_items of the object you are trying to operate on was loaded _before_ the session was started in /home/www/veneerz/setup.php on line 465

I changed the order. but now a new error comes up:
Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition cart_items of the object you are trying to operate on was loaded _before_ the session was started in /home/www/veneerz/setup.php on line 465
Change the order to
Code: Select all
<?php
include("setup.php");
session_start();
session_cache_limiter('private');
?>When UI chenged the order again, here is how the error come up:
Warning: Cannot send session cookie - headers already sent by (output started at /home/www/veneerz/setup.php:1032) in /home/www/veneerz/shop.php on line 4
Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/veneerz/setup.php:1032) in /home/www/veneerz/shop.php on line 4
I am lost an in the dark. This is really getting depressing. On Monday we most likely will get fired. Please let me know how to fix this bug. Bogdan will only come back on Wednesday, but our boss will be back on Monday and would like to see how all of our sites are doing. There is no way I can contact Bogdan.... his butt is partying in Florida. I hope this tropical storm will rip off the roof of his bungalow while he's sleeping.
The only language I know is ActionScript, for gods sake, I am only a designer!
I will pay for this forum's next 3 month server bill, just please help me fix this before Monday 9am EST. I am really back against the ropes here.
Art
Still brathing for now.
Warning: Cannot send session cookie - headers already sent by (output started at /home/www/veneerz/setup.php:1032) in /home/www/veneerz/shop.php on line 4
Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/veneerz/setup.php:1032) in /home/www/veneerz/shop.php on line 4
I am lost an in the dark. This is really getting depressing. On Monday we most likely will get fired. Please let me know how to fix this bug. Bogdan will only come back on Wednesday, but our boss will be back on Monday and would like to see how all of our sites are doing. There is no way I can contact Bogdan.... his butt is partying in Florida. I hope this tropical storm will rip off the roof of his bungalow while he's sleeping.
The only language I know is ActionScript, for gods sake, I am only a designer!
I will pay for this forum's next 3 month server bill, just please help me fix this before Monday 9am EST. I am really back against the ropes here.
Art
Still brathing for now.
check out the first sticky..
Code: Select all
<?
ob_start();
include("setup.php");
session_start();
session_cache_limiter('private');
ob_end_flush();
?>It worked, it worked!!!!!!!!!!
I love you dusty!!!!
And the rest of you guys, you were really helpful!!!!!
Is there a way to donate to this forum?????
Place like this should really be kept sacred and cared for. I had never seen support like this even from our web hosts!!!!
I really want to do something nice for you guys.
If anyone wants a dash kit, I will get it for them for 30% off our prices that is what our company pays for them.
I love you dusty!!!!
And the rest of you guys, you were really helpful!!!!!
Is there a way to donate to this forum?????
Place like this should really be kept sacred and cared for. I had never seen support like this even from our web hosts!!!!
I really want to do something nice for you guys.
If anyone wants a dash kit, I will get it for them for 30% off our prices that is what our company pays for them.
It starts output buffering so that anything echo'ed is not echo'ed but is saved temporarily until output buffering is stopped. The only concern I have is that there may be some error occuring that was being echo'ed above session start and now this is hidden so something may not be working right without you knowing. On the other hand it could just be a warning or something.
Hey guys,
There is one problem with ob_start ();
It flushes the session if you go to a different page. For example, if someone put an item in the basket and then decides to browse some more before submiting and order and leaves the shop.php page session is flushed and when he/she comes back to check out the item is gone from the basket......
But I guess I can live with this for a couple of days.
There is one problem with ob_start ();
It flushes the session if you go to a different page. For example, if someone put an item in the basket and then decides to browse some more before submiting and order and leaves the shop.php page session is flushed and when he/she comes back to check out the item is gone from the basket......
But I guess I can live with this for a couple of days.