Hey folks, <div><br></div><div>Just an update on the project that I was working on. </div><div><br></div><div><a href="http://www.astonesthrowaway.co.uk">www.astonesthrowaway.co.uk</a> is live, check it out. The beacon is having some servicing at the moment so isn&#39;t active but the question I need help on is in the PHP webcam script that I was working on a month ago. </div>
<div><br></div><div>the updated code can be found here: <a href="http://pastebin.com/xsd9tKU6">http://pastebin.com/xsd9tKU6</a></div><div><br></div><div>To my alarm I was looking at the site from a web kiosk at the BBC and the home page was throwing a 404. Now I realise this might be a simple case of the site not being on their allowed list, but oddly I could still get still to the backend and preview the site through an Iframe just fine from the same computer. Could my script be causing this error? The script generates the image for the background of the page so I directed the browser to the script itself and the browser balked, citing an illegal execution - I assume this to be the echo on line 38, which dumps the jpg data to the browser (with appropriate headers).</div>
<meta charset="utf-8"><div><br></div><div>Will a few folks running windows take a look at this for me? I&#39;ve previewed this in IE6,7,8 in an emulator and didn&#39;t run into this behaviour. Whats alarming is that the site is totally inaccessible to anyone working under these restrictions - very bad news.</div>
<div><br></div><div>Anybody have any bright ideas? </div><div><br></div><div>Many thanks,</div><div>Ben Rush</div><div><br></div><div><br></div><div><br></div><div><br></div><div>On 4 April 2010 14:41, Ben Rush <span dir="ltr">&lt;<a href="mailto:orionrush@gmail.com">orionrush@gmail.com</a>&gt;</span> wrote:</div>
<div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Holly cow - IT LIVES!  <div><br></div><div>I had no idea - I just thought I&#39;d keep the error reporting to see what went wrong. Didn&#39;t clock that it this in itself would generate headers, but it makes total sense. Thanks so much Mark &amp; Gordon for looking at this - beer&#39;s on me when we meet. <div>

<div><br></div><div>Cheers all for the air-time, - Merry Easter!</div><div>Ben R. </div><div><div></div><div class="h5"><div><br></div><div><div class="gmail_quote">On 4 April 2010 00:45, Mark Bryars <span dir="ltr">&lt;<a href="mailto:electronclub@darkskiez.co.uk" target="_blank">electronclub@darkskiez.co.uk</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You probably don&#39;t have errors suppressed, and the fopen to test if the<br>
camera is there is failing and printing an error, which generates<br>
output, which means you cant send any headers.<br>
<br>
prefix the fopen with an @ sign<br>
<div><br>
if (@fopen($img_remote, &quot;r&quot;)== true )<br>
<br>
<br>
</div>Regards,<br>
<font color="#888888"> Mark<br>
</font><div><div></div><div><br>
Ben Rush wrote:<br>
&gt; Gordon,<br>
&gt;<br>
&gt; Thanks for taking a look at this - I got the sense that an something<br>
&gt; was firing off before it should. I&#39;ve yet to break away from family<br>
&gt; obligations this weekend, but I have managed to post the code to paste<br>
&gt; bin: <a href="http://pastebin.com/rrC86Zdj" target="_blank">http://pastebin.com/rrC86Zdj</a><br>
&gt;<br>
&gt; happy Easter everyone - cracking day out today, spent it fishing for<br>
&gt; sculpture bits out of the graving docs in Govan -- good times!<br>
&gt;<br>
&gt; Ben<br>
&gt;<br>
&gt;<br>
&gt; On 3 April 2010 20:43, Gordon JC Pearce &lt;<a href="mailto:gordonjcp@gjcp.net" target="_blank">gordonjcp@gjcp.net</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; On Sat, 2010-04-03 at 00:15 +0100, Ben Rush wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; Hello folks,<br>
&gt;&gt;&gt; Im going to preface this by stating I&#39;m a self described noob, so if<br>
&gt;&gt;&gt; this seems elementary - I stand by my assertion.<br>
&gt;&gt;&gt; I have come to a block and Im not sure how to deal with it, and any<br>
&gt;&gt;&gt; thought would be amazing.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Im working on a fetch image script for a webcam and everything seemed<br>
&gt;&gt;&gt; hunky-dorry.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I later decided to add an if/else on the off chance the camera wasn&#39;t<br>
&gt;&gt;&gt; available. This is where things got confusing.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; If the camera fails I get a &quot;Warning: Cannot modify header<br>
&gt;&gt;&gt; information&quot;. The thing is I cant figure out were the header info is<br>
&gt;&gt;&gt; being declared, as the warning seem to indicate that the declaration<br>
&gt;&gt;&gt; comes from in the &#39;if&#39; statement itself. Wait didn&#39;t that just fail?!?<br>
&gt;&gt;&gt;<br>
&gt;&gt; Something is outputting stuff to the server before you get a chance to<br>
&gt;&gt; send the header() part.<br>
&gt;&gt;<br>
&gt;&gt; A quick demonstration - type &quot;telnet <a href="http://www.electronclub.org" target="_blank">www.electronclub.org</a> 80&quot;<br>
&gt;&gt; Once you get the &quot;Escape character is &#39;^]&#39;.&quot; message type<br>
&gt;&gt; &quot;GET / HTTP/1.0&quot; then &lt;RETURN&gt; &lt;RETURN&gt;<br>
&gt;&gt;<br>
&gt;&gt; You&#39;ll see the server&#39;s response - &quot;HTTP/1.1 200 OK&quot; and a bunch of<br>
&gt;&gt; things like &quot;Date:&quot; and &quot;Length:&quot; and importantly &quot;Content-Type:&quot;.<br>
&gt;&gt; These are the headers.  There&#39;s a blank line before the actual content<br>
&gt;&gt; *and this is very important*.<br>
&gt;&gt; Once you send that blank line, you cannot send any more headers.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;&gt; Moving the &#39;header(&#39;content-type: image/jpg&#39;);&#39; higher up in the<br>
&gt;&gt;&gt; script doesn&#39;t seem to fix it. Moving it before the if statement all<br>
&gt;&gt;&gt; together gives a broken image link - the echo of file contents don&#39;t<br>
&gt;&gt;&gt; seem to make to the browser.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I also checked to see if there was any empty space before or after my<br>
&gt;&gt;&gt; &lt;? ?&gt; - no empty echoes there either. .<br>
&gt;&gt;&gt;<br>
&gt;&gt; Can you put the script up in something like pastebin, with line numbers?<br>
&gt;&gt; That would make it a wee bit easier to trace.<br>
&gt;&gt;<br>
&gt;&gt; Gordon MM0YEQ<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; members mailing list<br>
&gt;&gt; <a href="mailto:members@electronclub.org" target="_blank">members@electronclub.org</a><br>
&gt;&gt; <a href="http://lists.electronclub.org/cgi-bin/mailman/listinfo/members" target="_blank">http://lists.electronclub.org/cgi-bin/mailman/listinfo/members</a><br>
&gt;&gt;<br>
&gt;&gt; Instructions for changing your mailing list settings:<br>
&gt;&gt; <a href="http://lists.electronclub.org/emailhowto.html" target="_blank">http://lists.electronclub.org/emailhowto.html</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; members mailing list<br>
&gt; <a href="mailto:members@electronclub.org" target="_blank">members@electronclub.org</a><br>
&gt; <a href="http://lists.electronclub.org/cgi-bin/mailman/listinfo/members" target="_blank">http://lists.electronclub.org/cgi-bin/mailman/listinfo/members</a><br>
&gt;<br>
&gt; Instructions for changing your mailing list settings:<br>
&gt; <a href="http://lists.electronclub.org/emailhowto.html" target="_blank">http://lists.electronclub.org/emailhowto.html</a><br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
members mailing list<br>
<a href="mailto:members@electronclub.org" target="_blank">members@electronclub.org</a><br>
<a href="http://lists.electronclub.org/cgi-bin/mailman/listinfo/members" target="_blank">http://lists.electronclub.org/cgi-bin/mailman/listinfo/members</a><br>
<br>
Instructions for changing your mailing list settings:<br>
<a href="http://lists.electronclub.org/emailhowto.html" target="_blank">http://lists.electronclub.org/emailhowto.html</a></div></div></blockquote></div>
</div></div></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><a href="mailto:orionrush@gmail.com">orionrush@gmail.com</a><br>M +44 7964 565 153<br><a href="http://make-us-believe.blogspot.com">make-us-believe.blogspot.com</a><br><a href="http://www.flickr.com/orionrush">www.flickr.com/orionrush</a><br>
<a href="http://www.gsamfa.com/2009/benjamin_rush.php">www.gsamfa.com/2009/benjamin_rush.php</a><br><a href="http://www.linkedin.com/in/orionrush">www.linkedin.com/in/orionrush</a><br>central station <a href="http://tiny.cc/orionrush">http://tiny.cc/orionrush</a><br>

</div>