<?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>Sun, 19 May 2013 11:01:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Stace Johnson</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-21931</link>
		<dc:creator>Stace Johnson</dc:creator>
		<pubDate>Thu, 11 Apr 2013 16:18:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-21931</guid>
		<description>John S., I tried your modified code, but I&#039;m getting a parse error on that line:

Parse error: syntax error, unexpected T_STRING in /home/USER/public_html/update_check.php on line 22

Not sure what the issue could be, unless it has something to do with encoding.  I&#039;m on a Windows box, but the server is running some flavor of Linux.</description>
		<content:encoded><![CDATA[<p>John S., I tried your modified code, but I&#8217;m getting a parse error on that line:</p>
<p>Parse error: syntax error, unexpected T_STRING in /home/USER/public_html/update_check.php on line 22</p>
<p>Not sure what the issue could be, unless it has something to do with encoding.  I&#8217;m on a Windows box, but the server is running some flavor of Linux.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John S</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-21609</link>
		<dc:creator>John S</dc:creator>
		<pubDate>Sun, 03 Mar 2013 13:31:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-21609</guid>
		<description>Just to add my own little tweak here - the line below does the following:
- Excludes a bunch of directories (5 in this example, -o basically means &quot;OR&quot;)
- Looks for modified files in the last 24 hours (parameter -mtime)
- Outputs full path, date, and details of modified files

exec(&#039;find /home/USER/public_html -type d \( -name &quot;cache&quot; -o -name &quot;images&quot; -o -name &quot;testsite&quot; -o -name &quot;blog&quot; -o -name &quot;temp&quot; \) -prune -o -type f -mtime 0 -exec ls -l {} \;&#039;, $last_changed);</description>
		<content:encoded><![CDATA[<p>Just to add my own little tweak here &#8211; the line below does the following:<br />
- Excludes a bunch of directories (5 in this example, -o basically means &quot;OR&quot;)<br />
- Looks for modified files in the last 24 hours (parameter -mtime)<br />
- Outputs full path, date, and details of modified files</p>
<p>exec(&#8216;find /home/USER/public_html -type d \( -name &quot;cache&quot; -o -name &quot;images&quot; -o -name &quot;testsite&quot; -o -name &quot;blog&quot; -o -name &quot;temp&quot; \) -prune -o -type f -mtime 0 -exec ls -l {} \;&#8217;, $last_changed);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-18628</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Tue, 20 Mar 2012 12:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-18628</guid>
		<description>This is exactly what I was looking for! Works perfect, thx a bunch for this!! ^_^</description>
		<content:encoded><![CDATA[<p>This is exactly what I was looking for! Works perfect, thx a bunch for this!! ^_^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michelle</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-16000</link>
		<dc:creator>Michelle</dc:creator>
		<pubDate>Sun, 12 Jun 2011 04:15:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-16000</guid>
		<description>Well I&#039;m back - my script ran like a charm for years and now with PHP 5.3, I get bumpkiss.  Does anybody have ideas for how to make this script compliant with PHP 5.3?

&lt;strong&gt;Reply from Peter: There&#039;s nothing in the script that should conflict with PHP 5.3.  However, along with the upgrade to 5.3, your web host might have disabled access to the &quot;exec&quot; PHP command.&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Well I&#8217;m back &#8211; my script ran like a charm for years and now with PHP 5.3, I get bumpkiss.  Does anybody have ideas for how to make this script compliant with PHP 5.3?</p>
<p><strong>Reply from Peter: There&#8217;s nothing in the script that should conflict with PHP 5.3.  However, along with the upgrade to 5.3, your web host might have disabled access to the &#8220;exec&#8221; PHP command.</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mykhailo M</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-15699</link>
		<dc:creator>Mykhailo M</dc:creator>
		<pubDate>Mon, 28 Mar 2011 15:57:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-15699</guid>
		<description>Thanks Peter, Could you please clarify the installation of your code, after saving it in let say example.txt (WordPad) file how can we set up a cron job on your server?

Where should we look in order to do it?
And as I understand the file &quot;example.txt&quot; should be in our Word Press root directory.

Many Thanks

&lt;strong&gt;Reply from Peter: The example code is in PHP, so you would name it something like &quot;file_modifications_check.php&quot;. You can place it anywhere on your server, as long as the cron job runs it, and you have an absolute path to your WordPress root in the very first &quot;exec&quot; code call (look for /path/to/your/folder). As for setting up the cron job, it really depends on your server. The post includes some links to general cron information.  If your host has a control panel, you can probably set up cron jobs through that.  If you have access to the command line, you can bring up the crontab for that user with &quot;crontab -e&quot;. Good luck!&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Thanks Peter, Could you please clarify the installation of your code, after saving it in let say example.txt (WordPad) file how can we set up a cron job on your server?</p>
<p>Where should we look in order to do it?<br />
And as I understand the file &quot;example.txt&quot; should be in our Word Press root directory.</p>
<p>Many Thanks</p>
<p><strong>Reply from Peter: The example code is in PHP, so you would name it something like &#8220;file_modifications_check.php&#8221;. You can place it anywhere on your server, as long as the cron job runs it, and you have an absolute path to your WordPress root in the very first &#8220;exec&#8221; code call (look for /path/to/your/folder). As for setting up the cron job, it really depends on your server. The post includes some links to general cron information.  If your host has a control panel, you can probably set up cron jobs through that.  If you have access to the command line, you can bring up the crontab for that user with &#8220;crontab -e&#8221;. Good luck!</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mykhailo M</title>
		<link>http://www.theblog.ca/file-change-notifications/comment-page-1#comment-15698</link>
		<dc:creator>Mykhailo M</dc:creator>
		<pubDate>Mon, 28 Mar 2011 12:59:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=198#comment-15698</guid>
		<description>Hi, I have noticed today someone had added three extra .php files to my Word press root directory, obviously someone was able to pass through my Plug-in &quot;Secure WordPress 2.0.0&quot; and my complicated Password. Really strange for me to expect that to happen, any ideas where the &quot;Back DOOR&quot; may exist?

Regarding your plug-in, if someone would add an extra file or folder can your plug-in also send an e-mail notification or would you know which one can do it?

Many Thanks for helping

PS. these hackers have nothing else better to do than bother lives of other people who have enough of their own problems to take care of.

&lt;strong&gt;Reply from Peter: Yes, that is what my plugin is designed to do -- notify you of file changes such as new files. However, I don&#039;t know what the cause could have been.  On an ongoing basis, there are security holes discovered with WordPress, so it&#039;s important to keep your install up to date.  The breach could have also been outside of WordPress, by gaining direct server access or access through another site on the server.&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Hi, I have noticed today someone had added three extra .php files to my Word press root directory, obviously someone was able to pass through my Plug-in &quot;Secure WordPress 2.0.0&quot; and my complicated Password. Really strange for me to expect that to happen, any ideas where the &quot;Back DOOR&quot; may exist?</p>
<p>Regarding your plug-in, if someone would add an extra file or folder can your plug-in also send an e-mail notification or would you know which one can do it?</p>
<p>Many Thanks for helping</p>
<p>PS. these hackers have nothing else better to do than bother lives of other people who have enough of their own problems to take care of.</p>
<p><strong>Reply from Peter: Yes, that is what my plugin is designed to do &#8212; notify you of file changes such as new files. However, I don&#8217;t know what the cause could have been.  On an ongoing basis, there are security holes discovered with WordPress, so it&#8217;s important to keep your install up to date.  The breach could have also been outside of WordPress, by gaining direct server access or access through another site on the server.</strong></p>
]]></content:encoded>
	</item>
	<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&#8217;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&#8217;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(&#8216;find /path/to/your/folder -cmin -62 -print&#8217;, $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&#8217;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>
</channel>
</rss>
