"Then it is dark; a night where kings in golden suits ride elephants over the mountains." - John Cheever
Sunday, February 17, 2019
Tuesday, August 26, 2014
Tuesday, August 28, 2012
PHP: fcgid and flush()
(Hi guys, long time no speak. This post is really just so I have a note of this myself and hopefully useful for anyone else googling the same issue...)
We had an issue with some PHP scripts timing out so tried to get the script to return some empty text just to keep the connection alive. What a pain! Finally I figured out the three things that were required:
1.
2.
3. And this was the real pain, because I spent ages testing with a file that was never going to work!!
You need to send at least 1024 bytes (1K) before you can flush(). This is the code for my *working* test file:
(blogger doesn't like me putting the opening and closing php tags around that code, but they should be there)
If it's working correctly, you should see the first line, then three seconds later the second line. If it's not working correctly, it will wait for three seconds and load both lines at the same time.
Hope this helps someone!
We had an issue with some PHP scripts timing out so tried to get the script to return some empty text just to keep the connection alive. What a pain! Finally I figured out the three things that were required:
1.
FcgidOutputBufferSize 0in your fcgid config file (/etc/apache2/conf.d/fcgid.conf in my case, on Ubuntu 10.04)
2.
output_buffering = Offin your PHP config file (/etc/php5/cgi/php.ini in my case, on Ubuntu 10.04)
3. And this was the real pain, because I spent ages testing with a file that was never going to work!!
You need to send at least 1024 bytes (1K) before you can flush(). This is the code for my *working* test file:
echo str_repeat(" ", 1024);
echo "Test1";
flush();
sleep(3);
echo str_repeat(" ", 1024);
echo "Test2";
(blogger doesn't like me putting the opening and closing php tags around that code, but they should be there)
If it's working correctly, you should see the first line, then three seconds later the second line. If it's not working correctly, it will wait for three seconds and load both lines at the same time.
Hope this helps someone!
Monday, March 28, 2011
Wednesday, March 16, 2011
Monday, November 22, 2010
Friday, October 29, 2010
Monday, October 18, 2010
Otters return to almost every corner of Britain
Typically inaccurate reporting from the Daily Mail. I can see loads of corners from my seat at the dining room table and not a single otter.
Thursday, October 07, 2010
Friday, September 24, 2010
Thursday, September 16, 2010
Monday, September 06, 2010
OpenDNS - Internet Navigation And Security
As my 7 year old daughter now googles things I thought it was time to get some parental controls installed for my home network's internet connection. After a bit of researching OpenDNS seems to be an excellent (and free) solution. Much better than paying for iffy software that would then have to be installed on all the PCs in the house.
Saturday, August 28, 2010
Friday, August 27, 2010
Brian Keenan / Jah Wobble
Claire and I went to readings / Q&A sessions with first Brian Keenan and then Jah Wobble at the Book Festival yesterday. Both of them pretty amazing individuals.
Thursday, August 26, 2010
Moray Place BBQ
![]() |
| From Moray Place BBQ |
Seumas your attendance is definitely required at the next one. Plenty of money left in the adwords kitty...
Thursday, August 19, 2010
Wednesday, August 18, 2010
Monday, August 16, 2010
Cycle ride home as tracked by Google Latitude
My cycle ride home (KML data exported from Google Latitude running on my Nokia E72 and imported into Google Maps).
View Cycle ride home 20100816 in a larger map
View Cycle ride home 20100816 in a larger map
Labels:
Google Latitude
Google Latitude location history
I thought you might be able to do this - track Google latitude location history. Interesting and slightly unnerving, have just turned mine on.
Labels:
"Google Latitude" location
Tuesday, August 10, 2010
Subscribe to:
Posts (Atom)




