Jump to content
Jack_mcs

SiteMonitor

Recommended Posts

I hadn't checked it before under php 4 but you are correct. The php parser can't get past the php 5 code. You'll need to re-upload the same files you replaced with this version with those from the previous until I change the code for this option.

 

Jack

OK, will do. The site is upgrading to php5 on Monday.


The Coopco Underwear Shop

 

If you live to be 100 years of age, that means you have lived for 36,525 days. Don't waste another, there aren't many left.

Share this post


Link to post
Share on other sites

Thank you. Thank you Thank you. You are the man.

 

 

No new files found...

No deleted files found...

No size differences found...

No time mismatches found...

No permissions mismatches found...

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sitemonitor ran on September 26, 2009, 7:07 am

Total mismatches found were 0

Total files being monitored is 427

 

Big difference. Can I assume everything is o.k. now?

 

Thanks.

Share this post


Link to post
Share on other sites
OK, will do. The site is upgrading to php5 on Monday.

I will probably rewrite it to be php 4 compatible anyway since there are others that are still using it.

 

Jack

Share this post


Link to post
Share on other sites
Thank you. Thank you Thank you. You are the man.

 

 

No new files found...

No deleted files found...

No size differences found...

No time mismatches found...

No permissions mismatches found...

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Sitemonitor ran on September 26, 2009, 7:07 am

Total mismatches found were 0

Total files being monitored is 427

 

Big difference. Can I assume everything is o.k. now?

 

Thanks.

Yes, that is how a good run should look.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack,

 

I followed these instructions to upgrade and all I get is a blank page.

 

Instructions for upgrading SiteMonitor V_1.7 to V_1.8

 

1) Upload the following files to the same location on your server:

 

admin/sitemonitor_admin.php

admin/sitemonitor_configure_setup.php

admin/includes/functions/sitemonitor_functions.php

admin/includes/languages/english/sitemonitor_admin.php

 

I have replaced the files from 1.7 and alls well, ideas?

 

Thanks

Share this post


Link to post
Share on other sites

A new version has been uploaded. It, hopefully, fixes the hacker checking code for all servers.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack,

 

I was using version 1.4.

I installed v1.9 from scratch (deleted all v1.4 files and installed v1.9).

 

When I went to configure in admin (sitemonitor_configure_setup.php) it gave me this error which I don't know how to correct:

 

Fatal error: Cannot redeclare microtime_float() (previously declared in /home/username/public_html/admin/includes/auto_backup_db.php:45) in /home/username/public_html/admin/includes/functions/sitemonitor_functions.php on line 396

 

If you could help I'd be very grateful. Thank you.


~ Don't mistake my kindness for weakness ~

Share this post


Link to post
Share on other sites
Hi Jack,

 

I was using version 1.4.

I installed v1.9 from scratch (deleted all v1.4 files and installed v1.9).

 

When I went to configure in admin (sitemonitor_configure_setup.php) it gave me this error which I don't know how to correct:

 

Fatal error: Cannot redeclare microtime_float() (previously declared in /home/username/public_html/admin/includes/auto_backup_db.php:45) in /home/username/public_html/admin/includes/functions/sitemonitor_functions.php on line 396

 

If you could help I'd be very grateful. Thank you.

It means the function created in SiteMonitor has been created by some other contribution (auto_backup). The function in SiteMonitor is not used it can be removed to solve the problem. In admin/includes/sitemonitor_functions, find this code

function microtime_float() //just used for testing
}

and change it to

function Disable_microtime_float() //just used for testing
}

 

Jack

Share this post


Link to post
Share on other sites

in sitemonitor_configure.php

 

$to = 'some_address@your_domain.com'; //where email is sent to

$from = 'From: some_address@your_domain.com'; //where email is sent from

 

$start_dir = '/home/username/public_html'; //your shops root

$admin_dir = 'http://www.yourdomain.com/admin'; //your shops admin

$admin_username = 'username'; //your admin username

$admin_password = 'password'; //your admin password

 

i dont understand why we dont use the variables of the configure.php + request the database value of store owner email , is it a question of security ?


MS2

Share this post


Link to post
Share on other sites

The code is in there for that and works, or at least uesd to. I haven't looked at it in a while.

 

Jack

Share this post


Link to post
Share on other sites

Thanks for your help Jack.

 

If I understand it correctly, the "check for hacked file" option lists files with codes similar to those used by hackers? so the files listed haven't necessarily been hacked?


~ Don't mistake my kindness for weakness ~

Share this post


Link to post
Share on other sites

Yes, that's correct. I thought about making the search more confined but doing that may miss some actual hacks.

 

Jack

Share this post


Link to post
Share on other sites

Makes sense. Thanks again for all the great contributions you code! :) :)


~ Don't mistake my kindness for weakness ~

Share this post


Link to post
Share on other sites

I have just intsalled the files and updated the files needed but i still get a blank page whan i click on the site monitor button.

 

Please help

Share this post


Link to post
Share on other sites

Hello Jack,

 

Thank you for the great contribution! Very easy to install!

 

Im sure you dont want to get bogged down with these type of questions but I dont know what 'hacker code' looks like and was wondering if its typical to see the paypal module in the results? Also, have you heard of nusoap.php? I dont see that file on the on the RC2a clean download.

 

Kind regards,

CW


I am a Jedi, like my father before me!

Share this post


Link to post
Share on other sites

There are many threads here about sites being hacked. They all list the code the hacker used. So do a search for such threads and read through them to get an idea of what to look for. Here is a recent thread that deals with one particular hack but there are others. Prior to the file manager problem, it was not typical for the paypal module to be hacked, in my experience. But that file has allowed the hackers to change all of the files in the shop so it is completly possible. Another way to be sure is to download a copy of your shop to your computer and compare with a known good set of files, which you should always have, using a compare program like WinMerge.

 

Nusoap isn't part of oscommerce, nor part of this contribution. You will need to ask such questions in the general support forum.

 

Jack

Edited by Jack_mcs

Share this post


Link to post
Share on other sites
What's "site monitor button?"

 

Jack

In the admin side of my website. on the menu on the left i now have an option for Site Monitor and when i click it i get a blank page

 

 

dj

Share this post


Link to post
Share on other sites
In the admin side of my website. on the menu on the left i now have an option for Site Monitor and when i click it i get a blank page

Go to the bottom of this page and type in blank page in the search box and read the posts regarding the same thing.

 

Jack

Share this post


Link to post
Share on other sites

Just a quick change to imrpove the hacker checking code. Open admin/includes/functions/sitemonitor_functions.php and find this line, (line 69)

  $hackerCodeArray[] = "<iframe";

Add this line right after it

  $hackerCodeArray[] = "gzdecode";

 

Jack

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

Jack

 

Im still getting exhausted memory errors even after upgrading to the latest release

 

this last attempt was stopped on a 60kb text file

 

Im running PHP 5.2.10 with suhosin and suPHP on apache 2.2 with a memory limit of 128Mb, which should well and truly handle this process

 

any ideas?

Share this post


Link to post
Share on other sites

Yes, I would think that setup should work. In admin/includes/functions/sitemonitor_functions.php, find 2000000 and change it to something smaller, say 1000000, and see if that works. If not, keep cutting it down until it runs. I still thinik it is some file on the server so cutting that size down and using the previous code to show the files may lead to the problem.

 

Jack

Share this post


Link to post
Share on other sites

Jack I tried installing SiteMonitor...the lastest version and while the install seems pretty simple, when I go to Admin/SiteMonitor and click on the configure link I get an HTTP 500 error page. The page seems to be in the right location so I'm wondering it there is a syntax error or something in the sitemonitor_configure_setup.php page itself?

 

If I messed with that page I'd think it was something I did but your installs are so easy I can't think of anything that I might have done to cause the error. Any idea?

 

Dan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×