Re: session_start problems with FireFox on Mac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Europus schreef:
Jochem Maas wrote:

?>
<whitespace character>
...
to avoid this in future never add the closing php bracket to the end of
the php file (unless you explicitly want to output something after the
code in question - which is almost never the case), it is not required.

e.g.
--------- >8 info.php ----------------
<?php

phpinfo();
--------- >8 info.php ----------------

I didn't know that. Does the underlying engine in PHP provide the
otherwise missing tag?

the tag is not missing as such - the tag denotes the end of string that
php parses - it's quite logical to assume that the end of a file means the same
thing (especially when you consider that any file you include/require
must specify '<?php' to 'awaken' the php parser)

Does the described problem only happen with
FF on Mac or does it affect other browsers on other OSes?

I have never seen this problem effect just one browser on on platform -
afaic it's a general problem that effects all browsers - you can't send
out HTTP headers after HTTP content ... now it maybe that some browsers
these days see fit to ignore white space before the headers (or maybe
just ignore a "\n") but I doubt it ... honestly I can't see how php
would even send the headers after the "\n" had been output ... either
you error logging level is too low, your not reading the error log or you
have error suppression on the header() function (.e.g @header()). all
of these would give you the incorrect notion that the header function
was working, all of these are bad practice.

you also mentioned you changed the code when trying to test it on another
machine - don't do that, test one thing at a time.

anyway problem solved, preventative knowledge aquired, onto the next hurdle :-)


Ulex


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux