General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 24th, 2003, 09:07 AM
AK564677 AK564677 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: uk
Posts: 5 AK564677 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
shopping cart problems . BIG problems

Ive been running the shopping cart without problems on my own machine. but here's the problem i installed the same PHP,Apache and MYsql onto my "laptop" (same operating system) and copied the same database and php files over but now when i click the 'add item' button i get 4 errors which are:

Warning: cannot send session cookie - headers sent by (output started at c:\public_html\aa\cart.php:5 in c:\public_html\aa\db.php on line 41

Warning: cannot send cache limiter - headers sent by (output started at c:\public_html\aa\cart.php:5 in c:\public_html\aa\db.php on line 41

Warning: cannot send header information - headers sent by (output started at c:\public_html\aa\cart.php:5 in c:\public_html\aa\db.php on line 42

Warning: cannot send header information - headers sent by (output started at c:\public_html\aa\cart.php:5 in c:\public_html\aa\db.php on line 42

but in the database entires do get created in the cart table but if i hit the keep shopping button , and add another item it creates a new enty and the old enty isnt shown on screen but is still in the cart table.

i have no idea what is going on ANYONE got any ideas

Reply With Quote
  #2  
Old April 24th, 2003, 10:46 AM
NYColt NYColt is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 4 NYColt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I had a similiar problem and I needed to eliminate all text and comments above session start()

Reply With Quote
  #3  
Old April 29th, 2003, 10:58 AM
AK564677 AK564677 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: uk
Posts: 5 AK564677 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
thanks for the help

but your solution didnt work but it gave me an idea with a bit of code playing i removed the following code

session_start();
setcookie("cartId", session_id(), time() + ((3600 * 24) * 30));
return session_id();

this seems to have worked with no other problem

Byt thanks for replying to my oridginal problem , nice to know there are some people who like to help

Reply With Quote
  #4  
Old April 29th, 2003, 03:32 PM
Taelo Taelo is offline
5B's
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: PC, FL
Posts: 366 Taelo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 30 m 59 sec
Reputation Power: 16
Re: thanks for the help

Quote:
Originally posted by AK564677
thanks for replying to my oridginal problem , nice to know there are some people who like to help


dude,...chill out,....not everyone reads these boards 24/7. People help when they can.
__________________
-- Jason

Reply With Quote
  #5  
Old June 4th, 2003, 04:18 AM
decob decob is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 1 decob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: thanks for the help

Quote:
Originally posted by AK564677
but your solution didnt work but it gave me an idea with a bit of code playing i removed the following code

session_start();
setcookie("cartId", session_id(), time() + ((3600 * 24) * 30));
return session_id();

this seems to have worked with no other problem


emm surely the code needs those lines to create the session_id that is used in the cart db for user purchases.

The problem is similar to something i had before, basically i was sending header info (<html><head></head>...) etc info before i was including the db.php file with the getCartId() function.

Reply With Quote
  #6  
Old March 12th, 2004, 11:20 AM
ajrulez ajrulez is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 5 ajrulez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I shouldn't probably butt in when there are so many experts here, but from whatver little experience I have with PHP programming,
seesion ids get screwed up in presence of html tags. Probably that could be a reason

Reply With Quote
  #7  
Old March 12th, 2004, 04:31 PM
Spongy's Avatar
Spongy Spongy is offline
Alternately High
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Hilversum, Netherlands
Posts: 223 Spongy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 h 56 m 41 sec
Reputation Power: 15
Send a message via MSN to Spongy
wrong...
You have to call session_start() before any output is created...
But it's kinda useless to react to a thread of a year old....
__________________
Work to live, don't live to work

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > shopping cart problems . BIG problems


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap