Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SiteMonitor


Jack_mcs

Recommended Posts

That's caused because the file to be quarantined is in a sub-directory and that sub-directory doesn't exist in the quarantine directory. I will need to add code to account for that. In the meantime, you would either need to turn the quarantine option off or create all of the sub-directories in the quarantine directory yourself.

 

Jack

 

Thanks for the info, I will have to look at one of my older hacked backup sites. I do believe someone who put Phishing content in my site created a sub directory. That would be usefull added feature in the future ti quarantine that.

 

Thanks

Link to comment
Share on other sites

Thanks for the info, I will have to look at one of my older hacked backup sites. I do believe someone who put Phishing content in my site created a sub directory. That would be usefull added feature in the future ti quarantine that.

 

Thanks

It doesn't matter if the hacker added a sub-directory. The problem is in the SiteMonitor code. It will quarantine a file if it is in the root but it won't quarantine one that is in some sub-directory, like images. That was an oversight on my part. If a hacker does add a sub-directory, then SiteMonitor should still quarantine it once the new code is added.

 

Jack

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

A new version has been uploaded. It contains the following changes:

 

- Added a check for file open to reduce number of errors displayed.

- Added code so quarantine function works with nested directories

- Fixed problem with dated quarantine files not being named correctly

 

Jack

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

hello , i m trying to use it on my local server.

I installed the last version : SiteMonitor_V_1.5

 

- when i run the admin : eithr Delete Reference File or or Execute Sitemonitor give me a blank page with no errors

- when i run the configuration , the list of folder in the dropdown menu lacks the first caractere for all folders so i can see for sintance in the exclude box:

 

"cgi-bin","admin","tmp","images",":/easyphp/www/ms2fr/shop/images/image/exemple"

instead of

 

"cgi-bin","admin","tmp","images","v:/easyphp/www/ms2fr/shop/images/image/gems"

 

here is my sitemonitor_configure.php

 

<?php
/************** THE OPTIONS AND SETTINGS ****************/
$always_email = 1; //set to 1 to always email the results
$verbose = 1; //set to 1 to see the results displayed on the page (for when running manually)
$logfile = 1; //set to 1 to see to track results in a log file
$logfile_size = 100000; //set the maximum size of the logfile
$quarantine = 0; //set to 1 to move new files found to the quarantine directory

$to = '[email protected]'; //where email is sent to
$from = 'From: [email protected]'; //where email is sent from

$start_dir = 'v:\easyphp\www\ms2fr\shop\'; //your shops root

$excludeList = array("cgi-bin","admin","tmp","images"); //don't check these directories - change to your liking - must be set prior to first run
?>

 

any ideas ?

MS2

Link to comment
Share on other sites

also i tried to run http://localhost/ms2fr/shop/admin/sitemonitor.php directly i got:

 

Parse error: syntax error, unexpected T_STRING in v:\easyphp\www\ms2fr\shop\admin\sitemonitor_configure.php on line 14

 

and gues waht the parse is a comment :

 

line 14 is :

 

$excludeList = array("cgi-bin","admin","tmp","images"); //don[b]'[/b]t check these directories - change to your liking - must be set prior to first run

 

when i remove the comment and run again sitemonitor.php directly i got:

 

Parse error: syntax error, unexpected $end in v:\easyphp\www\ms2fr\shop\admin\sitemonitor_configure.php on line 15

 

:huh:

MS2

Link to comment
Share on other sites

This entry

"cgi-bin","admin","tmp","images",":/easyphp/www/ms2fr/shop/images/image/exemple"

isn't right. It should be

"cgi-bin","admin","tmp","images","images/image/exemple"

I don't know why it is showing up like that though. Try changing that to see if it runs.

 

Jack

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

Try changing

$start_dir = 'v:\easyphp\www\ms2fr\shop\'; //your shops root

to

$start_dir = 'v:/easyphp/www/ms2fr/shop'; //your shops root

 

Jack

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

Jack,

 

when I run the SiteMonitor manually, it's working fine, however on cron suddenly I'm receiving the following error message:

 

PHP Warning:  set_time_limit(): Cannot set time limit in safe mode in /var/www/vhosts/mysite.com/httpdocs/admin/sitemonitor.php on line 10
PHP Warning:  filesize(): SAFE MODE Restriction in effect.  The script whose uid is 10492 is not allowed to access /var/www/vhosts/mysite.com owned by uid 0 in /var/www/vhosts/mysite.com/httpdocs/admin/includes/functions/sitemonitor_functions.php on line 59
PHP Warning:  filesize(): stat failed for sitemonitor_log.txt in /var/www/vhosts/mysite.com/httpdocs/admin/includes/functions/sitemonitor_functions.php on line 59
PHP Warning:  fopen(): SAFE MODE Restriction in effect.  The script whose uid is 10492 is not allowed to access /var/www/vhosts/mysite.com owned by uid 0 in /var/www/vhosts/mysite.com/httpdocs/admin/includes/functions/sitemonitor_functions.php on line 186
PHP Warning:  fopen(sitemonitor_reference.php): failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/admin/includes/functions/sitemonitor_functions.php on line 186
Failed to open file sitemonitor_reference.php

 

I know that it is probably server setting related, however since more people can experience the similar error, is there something that might be changed in SiteMonitor files to prevent such messages?

 

Alex

Absinthe Original Liquor Store

Link to comment
Share on other sites

The function set_time_limit won't work on a server in safe mode so it has to be removed from the code. It is located in the admin/sitemonitor.php file and mentioned in the readme.

 

Jack

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

the solution given to bypass the delete files doesnt work , i got nothing showed aftrer minutes of thinking

isnt it possible to have the deleted files information and still the other taht for the moment are not shown since the report stop when he found deleted files ?

MS2

Link to comment
Share on other sites

Doing that greatly increases the time required to make the comparisons and if the reference file is very large, which most are, it will most likely cause a timeout. I've thought to put in an option to be able to skip recording deleted files since those are not very dangerous, in most cases. That might be a little better solution.

 

Jack

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

After commenting this line out in sitemonitor.php:

//set_time_limit(0);

 

I receive the following error message when executing cron:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/dbase.so' - /usr/lib/php4/dbase.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/dom.so' - /usr/lib/php4/dom.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/gd.so' - /usr/lib/php4/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/imap.so' - /usr/lib/php4/imap.so: undefined symbol: _zval_copy_ctor in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/json.so' - /usr/lib/php4/json.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/ldap.so' - /usr/lib/php4/ldap.so: undefined symbol: _zval_dtor in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/mbstring.so' - /usr/lib/php4/mbstring.so: undefined symbol: _zval_copy_ctor in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/mcrypt.so' - /usr/lib/php4/mcrypt.so: undefined symbol: _zval_copy_ctor in Unknown on line 0
PHP Warning:  PHP Startup: U��WVS��: Unable to initialize module
Module compiled with module API=20020429, debug=0, thread-safety=0
PHP	compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: undefined symbol: zend_hash_add_or_update in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysqli.so' - /usr/lib/php4/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/odbc.so' - /usr/lib/php4/odbc.so: undefined symbol: _zval_copy_ctor in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/pdo.so' - /usr/lib/php4/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/pdo_mysql.so' - /usr/lib/php4/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/pdo_odbc.so' - /usr/lib/php4/pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/pdo_pgsql.so' - /usr/lib/php4/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/pdo_sqlite.so' - /usr/lib/php4/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/pgsql.so' - /usr/lib/php4/pgsql.so: undefined symbol: _zval_dtor in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/snmp.so' - /usr/lib/php4/snmp.so: undefined symbol: _zval_copy_ctor in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/xmlreader.so' - /usr/lib/php4/xmlreader.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/xmlrpc.so' - /usr/lib/php4/xmlrpc.so: undefined symbol: zend_hash_add_or_update in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/xmlwriter.so' - /usr/lib/php4/xmlwriter.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/xsl.so' - /usr/lib/php4/xsl.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php4/zip.so' - /usr/lib/php4/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0
Failed to open file sitemonitor_reference.php

 

Any ideas?

Absinthe Original Liquor Store

Link to comment
Share on other sites

That's a problem with your php installation or something related to it on the server. You will need to ask your host to look at it.

 

Jack

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

  • 2 weeks later...

Hello,

 

I have everything running great from the admin section, and manually. I had to remove the CheckLogFile() to get it to work. Now, when I run a cron job, I get the following error.

 

PHP Warning: fopen(sitemonitor_reference.php): failed to open stream: Permission denied in /var/www/vhosts/*******/httpdocs/admin/includes/functions/sitemonitor_functions.php on line 208

 

Warning: fopen(sitemonitor_reference.php): failed to open stream: Permission denied in /var/www/vhosts/********/httpdocs/admin/includes/functions/sitemonitor_functions.php on line 208 Failed to open file sitemonitor_reference.php

 

The stars above in the path I put in just to remove my site name. The path is correct.

 

Any ideas?

Link to comment
Share on other sites

You can look through this thread for a few ideas on that but I think you will find your host is blocking access. You should ask them about it.

 

Jack

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

  • 4 weeks later...

Okay I must be a boob, as I can not get it to work.

 

I changed username to my actual username read all 10 pages and tried everything posted, but I am still get the following errors:

 

Warning: opendir(/home/MyActual Username/public_html) [function.opendir]: failed to open dir: No such file or directory in /homepages/45/d90400221/htdocs/XXXX/store/admin/includes/functions/sitemonitor_functions.php on line 93

 

Warning: readdir(): supplied argument is not a valid Directory resource in /homepages/45/d90400221/htdocs/XXXX/store/admin/includes/functions/sitemonitor_functions.php on line 95

Reference file creation failed.

 

What did I do wrong?

 

I am using the lastest release of Site Monitor on osC RC2a if that helps

Edited by Eighteen48

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

It's saying home/MyActual Username/public_html isn't valid. Go to admin->tools->Database Backup and the correct path is displayed there. Is it the same (except for the admin part)?

 

Jack

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

It's saying home/MyActual Username/public_html isn't valid. Go to admin->tools->Database Backup and the correct path is displayed there. Is it the same (except for the admin part)?

 

Jack

 

duh, I was using the correct path before, but I left off the training / and then i was it with the admin so thats why I was getting screwed up, and then went back to the other way that screwed me up even more. Its amazing how one little thing can screw everything up.

 

Thanks...

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

  • 2 weeks later...

I installed sitemonitor but not sure if I have it set right. And want to run it as cron.

 

I read the below in tips and tricks:

 

A lesson on how to use CRON . . these instructions work whether you are using osCommerce or another package.

 

You will need to find out the answer to the following question, "Is my PHP installed as CGI or as an Apache module?". To find out do the following: in admin click on tools then server info.

 

Now check for Server API (4th item from the top), if it says "CGI", you have PHP compiled as CGI, if it reads "Apache", you have it running as an Apache module.

 

My server info says, Server API Apache 2.0 Handler

 

I am running xampp on Windows XP Pro. path is C:\xampp\htdocs\catalog and I have the admin directory password protected.

I want to set a cron to run once a day at 3:00 am but dont understand how.

 

In sitemoitor_config I have $start_dir = 'C:/xampp/myusername/htdocs/catalog'; //your shops root

 

when I run it the email I get is:

 

NEW FILES:

No new files found...

 

DELETED FILES:

No deleted files found...

 

SIZE MISMATCH:

No size differences found...

 

TIME MISMATCH:

Time Mismatch on Last Changed on Thursday, 01 Jan 1970 Central Standard Time

 

PERMISSIONS MISMATCH:

No permissions mismatches found...

 

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

Sitemonitor ran on March 31, 2008, 11:49 am

Total mismatches found were 1

Total files being monitored is 1

 

Why is it just watching one file instead of all, and how to set cron? Yes I am lost

 

Thanks in advance,

 

George

Link to comment
Share on other sites

I don't know why it is only looking at one file. Are you sure that C:\xampp\htdocs\catalog has more than one file? What do you have for your excluded files/directories? If this is a local setup, which I assume it is due to XAmpp being used, why is a cron job needed?

 

Jack

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

I don't know why it is only looking at one file. Are you sure that C:\xampp\htdocs\catalog has more than one file? What do you have for your excluded files/directories? If this is a local setup, which I assume it is due to XAmpp being used, why is a cron job needed?

 

Jack

 

Thanks for the fast reply Jack.

 

Yes its on localhost. Catalog has the whole store in it. My excludes are: "cgi-bin","admin","tmp"

 

The cron is so i can test and have it ready when I go live.

 

George

Link to comment
Share on other sites

I don't have an answer for you then. The script will work with a local setup so that isn't the problem. I've never tried to run cron locally so I can't help with that. There isn't any need for it though since the script can be ran manually. All you would be doing by using cron is to verify that cron works on your computer, which wouldn't provide any answers as it may not run on the server, but neither would have anything to do with SiteMonitor. The real problem is that of what is being monitored. I suggest changing the excludes so you are only monitoring one small directory 9create one if necessary) and see if that works.

 

Jack

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...