General Chat
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsGeneralGeneral Chat

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old June 12th, 2003, 09:47 AM
Marius2000 Marius2000 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Adelaide, Australia
Posts: 3 Marius2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Have a Cookie Problem - Heres a Hint!

OK heres a lesson that I've learn't
(I searched many forums for help and found nothing so Im sharing what I learn't)
I've researched this out and tested it - here are my results that may help someone in the future.

I couldn't get cookies to work for the life of me (even with ltw_calendar) so I asked my host if they supported them - standard reply was "YES you have buggy code".

Here is what I learned
Cookies will not work if this command is turned off in the php.ini file "output_buffering = " by default this has a value of 4096.
You might ask how I found this, I had a hunch my host hadn't fully tested the cookies (especially on php) so I started to do more research. I found a command called ini_get(""), so I made a script that retrieved all my hosts ini settings, then did that on my test server and compared them, the setting above was different, after testing I found that if this is left blank cookies will not work, neither will other headers.
So a big lesson I have learn't is make sure your testing environment will be the same as that as your host - check their settings if something works at home but not on the hosts site. If you want a copy of the simple script let me know.

All the best
This a great site...

Reply With Quote
  #2  
Old June 14th, 2003, 03:30 AM
zombie zombie is offline
Codewalkers Intermediate (1500 - 1999 posts)
 
Join Date: Apr 2007
Location: serbia
Posts: 1,876 zombie User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 4
RE: Have a Cookie Problem - Heres a Hint!

first thing, you are wrong.


second, you could find all that much faster, just by using phpinfo() function.


and last, you could find out all that much better, just by reading the f* manual...

http://php.net/setcookie
http://php.net/header
...


(it is stated very clear that you have to use cookies and headers before you output anything to the browser...)

Reply With Quote
  #3  
Old June 14th, 2003, 05:25 AM
Marius2000 Marius2000 is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Adelaide, Australia
Posts: 3 Marius2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Have a Cookie Problem - Heres a Hint!

mmmm Thanks for your so kind reply...

the phpinfo() function would have helped lots but I guess there are so many functions that knowing all of them for a newbie is hard.. (thats for the hint! - makes checking those server settings much easier)

And I am not wrong - When output buffering is disabled cookies do not work.

"You can do this by calling ob_start() and ob_end_flush() in your script, or setting the output_buffering configuration directive on in your php.ini or server configuration files. "

For a newbie who downloads any script and finds out that cookies aren't working, to work out how to use the ob_start() and ob_end_flush() commands when all the searches for cookies return "just do a setcookie()" is very difficult, especially when all you are trying to do is understand why the darn cookies aren't working on some servers.

You are such a nice administrator I think I won't post here any more especially when you treat newbies with such callace. You wonder why newbies are warey about posting when administrators (who obviously know everything) reply to their posts in such a way.


Reply With Quote
Reply

Viewing: Codewalkers ForumsGeneralGeneral Chat > Have a Cookie Problem - Heres a Hint!


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




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

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




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek