<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Running A PHP Script In The Background</title>
	<atom:link href="http://iarematt.com/running-a-php-script-in-the-background/feed/" rel="self" type="application/rss+xml" />
	<link>http://iarematt.com/running-a-php-script-in-the-background/</link>
	<description>technology &#38; software development blog by matt geri</description>
	<lastBuildDate>Fri, 18 Jun 2010 15:56:04 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Matt</title>
		<link>http://iarematt.com/running-a-php-script-in-the-background/comment-page-1/#comment-83</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Wed, 14 Jan 2009 20:42:54 +0000</pubDate>
		<guid isPermaLink="false">http://iarematt.com/?p=99#comment-83</guid>
		<description>Hey Steven,

Thanks for the advice. I am definitely leaning towards the fsockopen method. It seems the more reliable method.</description>
		<content:encoded><![CDATA[<p>Hey Steven,</p>
<p>Thanks for the advice. I am definitely leaning towards the fsockopen method. It seems the more reliable method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven</title>
		<link>http://iarematt.com/running-a-php-script-in-the-background/comment-page-1/#comment-81</link>
		<dc:creator>Steven</dc:creator>
		<pubDate>Wed, 14 Jan 2009 13:56:04 +0000</pubDate>
		<guid isPermaLink="false">http://iarematt.com/?p=99#comment-81</guid>
		<description>I had the problem on hetzner servers that I couldn&#039;t flush any data. Something to do with their implementation of php-cgi. So running something client side (through a browser) wouldn&#039;t work - it ran longer than 10min. Anyways, the only alternative I found was opening a url with fsockopen, and in the script being called, use the ignore_user_abort function. Works like a charm, just make sure it doesn&#039;t hit the memory limit. Otherwise it the process gets killed and you&#039;re sitting wondering what happened.</description>
		<content:encoded><![CDATA[<p>I had the problem on hetzner servers that I couldn&#8217;t flush any data. Something to do with their implementation of php-cgi. So running something client side (through a browser) wouldn&#8217;t work &#8211; it ran longer than 10min. Anyways, the only alternative I found was opening a url with fsockopen, and in the script being called, use the ignore_user_abort function. Works like a charm, just make sure it doesn&#8217;t hit the memory limit. Otherwise it the process gets killed and you&#8217;re sitting wondering what happened.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://iarematt.com/running-a-php-script-in-the-background/comment-page-1/#comment-80</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Wed, 14 Jan 2009 07:59:41 +0000</pubDate>
		<guid isPermaLink="false">http://iarematt.com/?p=99#comment-80</guid>
		<description>There are a few ways to make sure the script doesn&#039;t time out. On PHP.net a couple people have shared their scripts for doing so: http://lu.php.net/manual/en/function.set-time-limit.php

I am currently building in logging to make sure I know exactly where in the process the script currently is. I will then use AJAX to display a notice in the WordPress admin area. It will also log exactly which plugins upgraded and which didnt :)</description>
		<content:encoded><![CDATA[<p>There are a few ways to make sure the script doesn&#8217;t time out. On PHP.net a couple people have shared their scripts for doing so: <a href="http://lu.php.net/manual/en/function.set-time-limit.php" rel="nofollow">http://lu.php.net/manual/en/function.set-time-limit.php</a></p>
<p>I am currently building in logging to make sure I know exactly where in the process the script currently is. I will then use AJAX to display a notice in the WordPress admin area. It will also log exactly which plugins upgraded and which didnt <img src='http://iarematt.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://iarematt.com/running-a-php-script-in-the-background/comment-page-1/#comment-79</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Wed, 14 Jan 2009 06:52:58 +0000</pubDate>
		<guid isPermaLink="false">http://iarematt.com/?p=99#comment-79</guid>
		<description>Just hope you have a web server that 
a) allows you to fork or whatever to allow things to run in the background and 
b) doesn&#039;t kill scripts that take too long to run in the background.
c) be able to monitor the results of the scripts so you know what works and what failed.

Given how restrictive most web hosting companies are you need to develop the plugin so that it can run at any cheap resource-Nazi shared hosting provider.</description>
		<content:encoded><![CDATA[<p>Just hope you have a web server that<br />
a) allows you to fork or whatever to allow things to run in the background and<br />
b) doesn&#8217;t kill scripts that take too long to run in the background.<br />
c) be able to monitor the results of the scripts so you know what works and what failed.</p>
<p>Given how restrictive most web hosting companies are you need to develop the plugin so that it can run at any cheap resource-Nazi shared hosting provider.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
