ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-general
php-general
Re: [PHP] Re: (SOLVED) Varying session behavior between 2 nearly identical Apache/PHP setups
by Jochem Maas other posts by this author
Dec 13 2006 10:12AM messages near this date
[PHP] Re: (SOLVED) Varying session behavior between 2 nearly identical Apache/PHP setups | [PHP] problem with ob_start() and header() in osCommerce cart
nice of you to write up the solution...

Matthew North wrote:
>  Thanks to all who responded.  Your responses reconfirmed that there
>  must be some configuration difference between the two so I grudgingly
>  re-examined everything, and esp. phpinfo() output.
>  
>  Turns out the test machine had a default (at build time) of
>  'output_buffering = 0'.  Although the two machines shared exact
>  php.ini, the test machine was effectively doing no output buffering
>  while the development system was.  Explicitly changing this setting to
>  4096 'solved' the problem.
>  
>  However, this wasn't the whole story.  Turning on output buffering
>  could only solve the problem if we were doing some out-of-band output
>  before the session headers were sent that was now being buffered.
>  Sure enough I found some code that was outputting some response text
>  before session_start() was called.  On the test machine this output
>  was being buffered until after session_start(), so no apparent problem
>  existed.
>  
>  I think the lesson here is, if you're missing headers in your output,
>  assume first that it's because you've started body output before the
>  headers in question were sent.  If I'd made that assumption earlier I
>  probably would have saved hours on this bug!  (otoh, doesn't that
>  situation normally result in a PHP warning?  where'd that go?  oh
>  well...).

most likely ini setting display_errors is OFF - chances
are the PHP errors/warnings/etc are being logged to the apache error log.

>  
>  - Matt
>  

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Matthew North
Jochem Maas

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved