Jack_mcs Posted September 12, 2006 Author Share Posted September 12, 2006 The original code did check the directories but I changed it for speed. My thinking was that there isn't any reason to check directories since, if someone hacked into your site, it would be a waste of time for them to just change the directory settings. Is there another reason you would want those monitored? Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2006 Share Posted September 22, 2006 In case any body is interested: try the following to get the manual way to run in admin area. 1 In sitemonitor.php find line 29 ish and make sure: define('VERBOSE', 1); 2 Edit admin/includes/boxes/tools.php Add the following line to the end of ' $contents[] = array( ' after last '<a href' '<a href="' . tep_href_link(sitemonitor.php) . '" class="menuBoxContentLink">' . BOX_TOOLS_SITEMONITOR . '</a>'); Remember to replace '</a>'); on previous line with '</a><br>' . or you will get an error 3 Edit admin/includes/languages/english.php Add the following: define('BOX_TOOLS_SITEMONITOR', 'Site Monitor'); Under tools section in admin should be site monitor. This will manually run the check and display the results. Once finished click back button. Chris Quote Link to comment Share on other sites More sharing options...
my3sons Posted October 2, 2006 Share Posted October 2, 2006 chmod your admin directory with 777 but DON'T chmod the files within! just the directory! Is this safe? Without doing this I get an openbase dir error, but I'm a bit concerned about 777ing the admin directory. Thanks... very nice and simple contrib. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 2, 2006 Author Share Posted October 2, 2006 I wouldn't recommend it but your host might require such a setting. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
hankster6911 Posted October 16, 2006 Share Posted October 16, 2006 I can manually run site monitor with great results, I am new to cron jobs but I tried to set it up and this was the result I got. Status: 404 X-Powered-By: PHP/4.4.2 Content-type: text/html No input file specified. This is the command I used php /home/xxxx/public_html/catalog/xxxx/sitemonitor.php Since I am unfamiliar with cronjobs I am not sure this error No input file specified is on my side in the cron job or I need to set something in the php files. Thank you Wendy Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 16, 2006 Author Share Posted October 16, 2006 The syntax for cron jobs vary with hosts. You may have to cd into your admin directory for it to work. Your host should be able to provide you with the proper syntax but you could try cd /home/xxxx/public_html/catalog/xxxx/; php sitemonitor.php Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
digbydo Posted October 28, 2006 Share Posted October 28, 2006 I can manually run site monitor with great results, I am new to cron jobs but I tried to set it up and this was the result I got. Status: 404 X-Powered-By: PHP/4.4.2 Content-type: text/html No input file specified. This is the command I used php /home/xxxx/public_html/catalog/xxxx/sitemonitor.php Since I am unfamiliar with cronjobs I am not sure this error No input file specified is on my side in the cron job or I need to set something in the php files. Thank you Wendy I received a similar error 404 when setting up cron... removed the bit that Jack mentions in the path as USERNAME and it worked perfectly. :thumbsup: Cheers Jack, great contribution! ---------- Dave Quote one-click installation.. Dave's info Link to comment Share on other sites More sharing options...
RCWS Posted October 30, 2006 Share Posted October 30, 2006 This is the results Im getting when I run SiteMonitor manualy......... What am I doing wrong ? Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /homepages/18/d174507728/htdocs/rivercityweb/admin/sitemonitor.php:1) in /homepages/18/d174507728/htdocs/rivercityweb/admin/includes/functions/sessions.php on line 67 No new files found... No deleted files found... No size differences found... No time mismatches found... No permissions mismatches found... Email sent to shop owner. Quote Toby Wilson Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 30, 2006 Author Share Posted October 30, 2006 That is usually caused by a spaced in the file. See this. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 30, 2006 Author Share Posted October 30, 2006 A new version has been uploded. Here are the major changes: - Added error_log to the excluded files code (works now). - Added admin control section. - Added code to allow sub-directories to be excluded. - Added log function (creates a log of all changes if option is set). - Fixed bug in functions file. I didn't provide any update instructions since all of the files were changed. Just follow the install instructions in the readme. You can delete the sitemonitor_functions.php file from the admin directory since that has been moved to the functions directory. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
RCWS Posted October 30, 2006 Share Posted October 30, 2006 awesome! Thanks for the reply! installing it now Quote Toby Wilson Link to comment Share on other sites More sharing options...
JoeWoodworker Posted October 30, 2006 Share Posted October 30, 2006 Jack, This is a superb contribution. Thanks for updating it. Do you think this contribution will work on older versions of OSC? Thanks Joe Quote Evil will always triumph over good... Because good is dumb. - D.H. Link to comment Share on other sites More sharing options...
Jack_mcs Posted October 31, 2006 Author Share Posted October 31, 2006 Yes, it doesn't use change any existing code except for common files like english.php. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted October 31, 2006 Share Posted October 31, 2006 I had to comment out these two lines in sitemonitor_functions.php in order to make the script run without giving me error messages: $dp=opendir($dir); while (false!=($file=readdir($dp)) && $level == $last) If I leave those two lines in, I get these error messages: Warning: opendir(/home/public_html/osCommerce/catalog/): failed to open dir: No such file or directory in /home/[username]/public_html/osCommerce/catalog/[admin]/includes/functions/sitemonitor_functions.php on line 56 Warning: readdir(): supplied argument is not a valid Directory resource in /home/[username]/public_html/osCommerce/catalog/[admin]/includes/functions/sitemonitor_functions.php on line 58 Reference file creation failed. Any suggestions? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 31, 2006 Share Posted October 31, 2006 I had to comment out these two lines in sitemonitor_functions.php in order to make the script run without giving me error messages: $dp=opendir($dir); while (false!=($file=readdir($dp)) && $level == $last) If I leave those two lines in, I get these error messages: Warning: opendir(/home/public_html/osCommerce/catalog/): failed to open dir: No such file or directory in /home/[username]/public_html/osCommerce/catalog/[admin]/includes/functions/sitemonitor_functions.php on line 56 Warning: readdir(): supplied argument is not a valid Directory resource in /home/[username]/public_html/osCommerce/catalog/[admin]/includes/functions/sitemonitor_functions.php on line 58 Reference file creation failed. OK, I think I have it working now. I had to use Control Panel to CHMOD the configuration file to get it to take the changes I made, then everything started to work. Quote Link to comment Share on other sites More sharing options...
ken.yong Posted November 3, 2006 Share Posted November 3, 2006 Hi, Jack, I installed your newest contribution and I have one issue. I don't have a problem in creating the reference file, however, whenever I try to use Execute Sitemonitor, a blank page ultimately appears after about 60 seconds and there is no email sent to my email address. Any help will be appreciated! Ken Quote Link to comment Share on other sites More sharing options...
ken.yong Posted November 3, 2006 Share Posted November 3, 2006 Hi, Jack, Sorry about the previous post. I logged out and logged back on and the problem went away!! Please ignore my previous post. Thanks! Ken Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 3, 2006 Author Share Posted November 3, 2006 There's a timeout limit on servers (60 seconds is quite long). If you reach that limit, that might happen. Try excluding some directories from the search (be sure to regenerate the reference file afterwards). Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
tegralens Posted November 11, 2006 Share Posted November 11, 2006 My cron job is not working here is what i get. I tried both ways to run the job. Status: 302 X-Powered-By: PHP/4.4.1 Set-Cookie: osCAdminID=54a2be68ad897cf711891d1e789d3cec; path=/catalog/; domain=www.mywebsite.com Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-catalog, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Location: https://www.mywebsite.com/catalog/admin/log...1891d1e789d3cec Content-type: text/html <br /> <b>Warning</b>: main(includes/languages/english/): failed to open stream: No such file or directory in <b>/home/xxxx/public_html/catalog/admin/includes/application_top.php</b> on line <b>202</b><br /> <br /> <b>Warning</b>: main(includes/languages/english/): failed to open stream: No such file or directory in <b>/home/xxxx/public_html/catalog/admin/includes/application_top.php</b> on line <b>202</b><br /> <br /> <b>Warning</b>: main(): Failed opening 'includes/languages/english/' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/xxxx/public_html/catalog/admin/includes/application_top.php</b> on line <b>202</b><br /> Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 11, 2006 Author Share Posted November 11, 2006 The standard cron syntax won't work for all servers. You will need to contact your host to get the proper syntax. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
tegralens Posted November 12, 2006 Share Posted November 12, 2006 The standard cron syntax won't work for all servers. You will need to contact your host to get the proper syntax. Jack I sent them an email and will let you know what happens. Thanks Quote Link to comment Share on other sites More sharing options...
tegralens Posted November 13, 2006 Share Posted November 13, 2006 My cron job is not working here is what i get. I tried both ways to run the job. Status: 302 X-Powered-By: PHP/4.4.1 Set-Cookie: osCAdminID=54a2be68ad897cf711891d1e789d3cec; path=/catalog/; domain=www.mywebsite.com Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-catalog, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache Location: https://www.mywebsite.com/catalog/admin/log...1891d1e789d3cec Content-type: text/html <br /> <b>Warning</b>: main(includes/languages/english/): failed to open stream: No such file or directory in <b>/home/xxxx/public_html/catalog/admin/includes/application_top.php</b> on line <b>202</b><br /> <br /> <b>Warning</b>: main(includes/languages/english/): failed to open stream: No such file or directory in <b>/home/xxxx/public_html/catalog/admin/includes/application_top.php</b> on line <b>202</b><br /> <br /> <b>Warning</b>: main(): Failed opening 'includes/languages/english/' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/xxxx/public_html/catalog/admin/includes/application_top.php</b> on line <b>202</b><br /> My Hosting said that syntax I put in is correct. This is what is in line 202 in the application_top.php include(DIR_WS_LANGUAGES . $language . '/' . $current_page); Any ideas Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted November 13, 2006 Author Share Posted November 13, 2006 Assuming you can run the script manually, the problem is with cron. Although convincing your host of that may not be so easy. Try this command cd /home/USERNAME/public_html/admin; /usr/local/bin/php /home/USERNAME/public_html/admin/sitemonitor.php You will need to change USERNAME as well as correct the paths if they are not correct. If that doesn't work, go back to your host and explain that the script can be ran manually so it has to be cron related. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
tegralens Posted November 13, 2006 Share Posted November 13, 2006 Assuming you can run the script manually, the problem is with cron. Although convincing your host of that may not be so easy. Try this commandcd /home/USERNAME/public_html/admin; /usr/local/bin/php /home/USERNAME/public_html/admin/sitemonitor.php You will need to change USERNAME as well as correct the paths if they are not correct. If that doesn't work, go back to your host and explain that the script can be ran manually so it has to be cron related. Jack Will tray and let you know thanks for a quick response. Quote Link to comment Share on other sites More sharing options...
tegralens Posted November 14, 2006 Share Posted November 14, 2006 Will tray and let you know thanks for a quick response. I also tried that but get the same error. This is what support told me Hello: The errors you are seeing are just warnings so running it manually may be suppressing the warnings. If you have the PHP reporting mode set so that it reports Warnings also, you may receive the warnings as well. Any Ideas? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.