<?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: File change notifications for your WordPress blog on Linux</title>
	<atom:link href="http://www.theblog.ca/file-change-notifications/feed" rel="self" type="application/rss+xml" />
	<link>http://www.theblog.ca/file-change-notifications</link>
	<description>Useful tips on Canada, cell phones, banking, technology, WordPress, PHP and more</description>
	<lastBuildDate>Thu, 11 Mar 2010 19:05:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Eugene</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-11191</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Mon, 29 Jun 2009 04:39:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-11191</guid>
		<description>Hello,

I get the following error messages when the cron runs:

&quot;Cannot bind/listen socket - [2] No such file or directory.
Couldn&#039;t create FastCGI listen socket on port lic_html/test.php&quot;

Test.php is the name of the file which runs this script. I have contacted HostGator&#039;s technical support and they told me that &quot;You cannot create sockets on our servers through php. You would need to find a script which does not use sockets and then try again.&quot;

Am I doing something wrong or are they correct about the script trying to create sockets. If they are correct, could you please post a workaround for this? When it comes to Unix, I am completely cluess, sorry.

Thanks for your help.

&lt;strong&gt;Reply from Peter: Sorry, I&#039;m stumped there.  If anybody has an explanation or solution, please post it as a comment.&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>I get the following error messages when the cron runs:</p>
<p>&quot;Cannot bind/listen socket &#8211; [2] No such file or directory.<br />
Couldn&#039;t create FastCGI listen socket on port lic_html/test.php&quot;</p>
<p>Test.php is the name of the file which runs this script. I have contacted HostGator&#039;s technical support and they told me that &quot;You cannot create sockets on our servers through php. You would need to find a script which does not use sockets and then try again.&quot;</p>
<p>Am I doing something wrong or are they correct about the script trying to create sockets. If they are correct, could you please post a workaround for this? When it comes to Unix, I am completely cluess, sorry.</p>
<p>Thanks for your help.</p>
<p><strong>Reply from Peter: Sorry, I&#8217;m stumped there.  If anybody has an explanation or solution, please post it as a comment.</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-10888</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 16 Apr 2009 19:50:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-10888</guid>
		<description>Hi Peter. Excellent article. So just to make sure I got this straight.

What I do is:

1. Edit the first part of the line 
&lt;code&gt;exec(&#039;find /path/to/your/folder -cmin -62 -print&#039;, $last_changed);&lt;/code&gt;

to &lt;strong&gt;find /&lt;/strong&gt; if my WP install is in my root

2. Enter in my email

3. Save this file as a file name with a php extension and upload it to my server.

4. Set up a cron job to run this script every hour

Is that basically what I need to do?
Thanks

&lt;strong&gt;Reply from Peter: correct, although in the first step, I would put &quot;find . -cmin...&quot; if you are placing the script in the root of your WordPress directory; that or put the absolute path to the WordPress directory. After that, I would test it by running the script directly by printing $email_output to the screen.&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Hi Peter. Excellent article. So just to make sure I got this straight.</p>
<p>What I do is:</p>
<p>1. Edit the first part of the line<br />
&lt;code&gt;exec(&#039;find /path/to/your/folder -cmin -62 -print&#039;, $last_changed);&lt;/code&gt;</p>
<p>to &lt;strong&gt;find /&lt;/strong&gt; if my WP install is in my root</p>
<p>2. Enter in my email</p>
<p>3. Save this file as a file name with a php extension and upload it to my server.</p>
<p>4. Set up a cron job to run this script every hour</p>
<p>Is that basically what I need to do?<br />
Thanks</p>
<p><strong>Reply from Peter: correct, although in the first step, I would put &#8220;find . -cmin&#8230;&#8221; if you are placing the script in the root of your WordPress directory; that or put the absolute path to the WordPress directory. After that, I would test it by running the script directly by printing $email_output to the screen.</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-10660</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Wed, 18 Feb 2009 17:08:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-10660</guid>
		<description>Hi Vadim, please see &lt;a href=&quot;http://www.theblog.ca/file-change-notifications#comment-10146&quot; rel=&quot;nofollow&quot;&gt;this comment&lt;/a&gt; and the couple of comments following that. In short, your options are limited. I invite people to share alternative solutions if they have any!</description>
		<content:encoded><![CDATA[<p>Hi Vadim, please see <a href="http://www.theblog.ca/file-change-notifications#comment-10146" rel="nofollow">this comment</a> and the couple of comments following that. In short, your options are limited. I invite people to share alternative solutions if they have any!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vadim</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-10656</link>
		<dc:creator>Vadim</dc:creator>
		<pubDate>Wed, 18 Feb 2009 09:42:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-10656</guid>
		<description>My hosting doesn&#039;t allow to the exec() command to be executed, what can I do to make it work?
Thanks,
Vadim</description>
		<content:encoded><![CDATA[<p>My hosting doesn&#039;t allow to the exec() command to be executed, what can I do to make it work?<br />
Thanks,<br />
Vadim</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jidanni</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-10587</link>
		<dc:creator>jidanni</dc:creator>
		<pubDate>Wed, 04 Feb 2009 02:42:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-10587</guid>
		<description>One line is all it takes:
$ cat .crontab
11 * * * * find wordpress -type f \( -mmin -62 -o -cmin -62 \)
$ crontab .crontab
If there is no matches, no mail will be sent.</description>
		<content:encoded><![CDATA[<p>One line is all it takes:<br />
$ cat .crontab<br />
11 * * * * find wordpress -type f \( -mmin -62 -o -cmin -62 \)<br />
$ crontab .crontab<br />
If there is no matches, no mail will be sent.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crystal</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-10560</link>
		<dc:creator>crystal</dc:creator>
		<pubDate>Fri, 30 Jan 2009 02:43:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-10560</guid>
		<description>Yes I am on a shared server. Thanks for the reply and the tips. I did talk to them a day or so ago but will be calling them back soon. :)</description>
		<content:encoded><![CDATA[<p>Yes I am on a shared server. Thanks for the reply and the tips. I did talk to them a day or so ago but will be calling them back soon. <img src='http://www.theblog.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-10559</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Thu, 29 Jan 2009 17:54:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-10559</guid>
		<description>Hi crystal, are you on a shared server?  It seems as though the &quot;find&quot; command is not allowed to be run as an executable for the user account that is running the script.  I don&#039;t know the specific steps to take without further research, so you should contact your web host or whoever is managing the server, or paste that error into Google.</description>
		<content:encoded><![CDATA[<p>Hi crystal, are you on a shared server?  It seems as though the &quot;find&quot; command is not allowed to be run as an executable for the user account that is running the script.  I don&#039;t know the specific steps to take without further research, so you should contact your web host or whoever is managing the server, or paste that error into Google.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crystal</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-10555</link>
		<dc:creator>crystal</dc:creator>
		<pubDate>Thu, 29 Jan 2009 08:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-10555</guid>
		<description>uhh lets try that again. 

Thanks with an s.. and I changed all the necessary lines IN the php file.
The cron job is running perfectly, but I get this in the log/results email ( the one from the server)    sh: /usr/bin/find: Permission denied

Sorry for the typo&#039;s.. it&#039;s late.</description>
		<content:encoded><![CDATA[<p>uhh lets try that again. </p>
<p>Thanks with an s.. and I changed all the necessary lines IN the php file.<br />
The cron job is running perfectly, but I get this in the log/results email ( the one from the server)    sh: /usr/bin/find: Permission denied</p>
<p>Sorry for the typo&#039;s.. it&#039;s late.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: crystal</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-10554</link>
		<dc:creator>crystal</dc:creator>
		<pubDate>Thu, 29 Jan 2009 08:03:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-10554</guid>
		<description>Thank, but I can&#039;t get it to work. I changed all the necessary files. I have the Cron Job set up and the job is running fine, but it supplies an email with this   sh: /usr/bin/find: Permission denied

Do you know what&#039;s happening??   Thanks in advance, I can&#039;t WAIT to get it working. :)</description>
		<content:encoded><![CDATA[<p>Thank, but I can&#039;t get it to work. I changed all the necessary files. I have the Cron Job set up and the job is running fine, but it supplies an email with this   sh: /usr/bin/find: Permission denied</p>
<p>Do you know what&#039;s happening??   Thanks in advance, I can&#039;t WAIT to get it working. <img src='http://www.theblog.ca/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-10158</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 10 Nov 2008 17:16:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-10158</guid>
		<description>I would say that it is a security risk, but it can certainly be mitigated.  If someone exploits a vulnerability in one of your scripts (or someone else&#039;s if you&#039;re on a shared hosting environment) and can run the exec command, they can probably do more.  However, that all depends on the privileges that the PHP user is given.  I&#039;m no expert on this though.</description>
		<content:encoded><![CDATA[<p>I would say that it is a security risk, but it can certainly be mitigated.  If someone exploits a vulnerability in one of your scripts (or someone else&#039;s if you&#039;re on a shared hosting environment) and can run the exec command, they can probably do more.  However, that all depends on the privileges that the PHP user is given.  I&#039;m no expert on this though.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
