<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 3: Extra newlines breaks cookies</title><link href="https://sourceforge.net/p/microcode/bugs/3/" rel="alternate"/><link href="https://sourceforge.net/p/microcode/bugs/3/feed.atom" rel="self"/><id>https://sourceforge.net/p/microcode/bugs/3/</id><updated>2002-07-24T23:02:08Z</updated><subtitle>Recent changes to 3: Extra newlines breaks cookies</subtitle><entry><title>Extra newlines breaks cookies</title><link href="https://sourceforge.net/p/microcode/bugs/3/" rel="alternate"/><published>2002-07-24T23:02:08Z</published><updated>2002-07-24T23:02:08Z</updated><author><name>Leif Neland</name><uri>https://sourceforge.net/u/leifneland/</uri></author><id>https://sourceforge.netacb3704596c9e5b105281d263a6d3391601efeeb</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;It appears extra newlines is added for each included &lt;br /&gt;
encrypted file.&lt;/p&gt;
&lt;p&gt;This breaks the header() function, so cookies and &lt;br /&gt;
redirects can't be sent.&lt;/p&gt;
&lt;p&gt;Warning: Cannot add header information - headers &lt;br /&gt;
already sent by (output started at &lt;br /&gt;
common/dbconnect.inc.php(1) : &lt;/p&gt;
&lt;p&gt;All my php files contain only &amp;amp;lt;?&lt;br /&gt;
databay_microcode_include(&amp;amp;quot;filename.k&amp;amp;quot;); ?&amp;amp;gt;&lt;/p&gt;
&lt;p&gt;filename.k then has the encrypted php.&lt;/p&gt;
&lt;p&gt;All my original php-files starts by including &lt;br /&gt;
common/dbconnect.inc.php&lt;/p&gt;
&lt;p&gt;Somewhere near the end of &lt;br /&gt;
PHP_FUNCTION(databay_microcode_include)&lt;/p&gt;
&lt;p&gt;is this:&lt;/p&gt;
&lt;p&gt;erealloc(buffer,output_count+2);&lt;/p&gt;
&lt;p&gt;buffer[output_count]='\n';&lt;br /&gt;
buffer[output_count+1]='\0';&lt;/p&gt;
&lt;p&gt;I suspected this \n is the one produced, but when I &lt;br /&gt;
replaced the \n with \0, I got &amp;amp;quot;Parse error: unexpected &lt;br /&gt;
character $&amp;amp;quot;&lt;/p&gt;
&lt;p&gt;Is it possible to avoid this extra newline?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>