Jump to content
Jack_mcs

SiteMonitor

Recommended Posts

Additional info: I have already set the maximum execution time of php scripts to 55 seconds (more is not possible due to my provider).

Memory size was 20 MB, I upped it to 30 MB with no success for the sitemonitor.

The error message appears, when running Sitemonitor in my admin backend.

You need to cut down what's being monitored to see if there is a problem with a specific area. If you are monitoring some directory that has a 1,000 MB files, it will probably timeout no matter what you do. So exclude all directories and see what happens. Then exclude all directories except includes, and so on.

Share this post


Link to post
Share on other sites

Jack,

I already excluded:

- admin

- images

- thumbnails (from my thumbnailer)

 

So the only files being monitored, are in the root-dir of osC and the includes-dir.

Share this post


Link to post
Share on other sites

Jack,

I already excluded:

- admin

- images

- thumbnails (from my thumbnailer)

 

So the only files being monitored, are in the root-dir of osC and the includes-dir.

Then you haven't excluded all directories.

Share this post


Link to post
Share on other sites

Now I have excluded all subdirs, so Sitemonitor should only monitor the root files.

 

But I'm getting the same error message.

Edited by Andreas2003

Share this post


Link to post
Share on other sites

 

My cronjob is not running successfully as well. The execution command is here:

/home/httpd/cgi-bin/php4 /usr/www/users/shop/admin/sitemonitor.php

 

I don't see this as a good cron job. Try changing it to this...

 

php /usr/www/users/shop/admin/sitemonitor.php


Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Share this post


Link to post
Share on other sites

Now I have excluded all subdirs, so Sitemonitor should only monitor the root files.

 

But I'm getting the same error message.

Then there is probably something in your files that is causing it to fail. Even the most highly altered site won't have more than a hundred files or so in the root so there's no way for the script to time out on that small number of files. You should look more closely at the files in the root and get rid of any that don't belong there. I suppose there could be something wrong with SiteMonitors code that is causing it to fail but I haven't had any problems with it on the sites I've installed it into so I don't think that is the case.

Share this post


Link to post
Share on other sites

When I run Site Monitor locally it stops here:

 

Found a new file named admin/sitemonitor_log_24_05_2010.txt

No deleted files found...

 

Also, if I click on "Update" for "Delete Reference File", a blank page returns. What permissions should be set for Site Monitor to function?

Edited by Witblitz

Share this post


Link to post
Share on other sites

When I run Site Monitor locally it stops here:

 

Also, if I click on "Update" for "Delete Reference File", a blank page returns. What permissions should be set for Site Monitor to function?

Permission settings aren't needed for most servers but others have posted here saying they had such problems. But the problem you are having seems to be different. If it were a permissions problem, I would expect the script to fail completely but it seems to be partially running. Since the output is not complete, there should be a server error so I would look in the error_log file first. If you can't find one, you will need to ask your host to take a look.

Share this post


Link to post
Share on other sites

Hi Jack

 

I just installed SiteMonitor today, followed the instructions, right up until

"--------------------------------------------------------------------------

Step 5: Go to admin->Sitemonitor->Configure, setup the various settings and

click Update."

 

 

No directories appear in the drop down, and whenever I put anything in the exclusion box, it simply shows it as a red bar error message above the main part of the page.

 

I'm filling in the following settings:

 

Always email (tick)

verbose (tick)

both email addresses

start directory - now, I'm not sure exactly what is needed here. I've tried "\", "c:\domains\ariadnetheweaver.org\wwwroot\" (obviously without the "")

 

The exclude selector box only comes up with "make selection" and no selections are offered. I have tried '\admin', "\admin", and various exceptions in the box, and with no luck.

 

I get the following error message:

Warning: opendir(\) [function.opendir.php]: failed to open dir: No such file or directory in C:\Domains\ariadnetheweaver.org\wwwroot\admin\includes\functions\sitemonitor_functions.php on line 418

 

**amended to say the above message disappears when I choose "c:/domains/ariadnetheweaver.org/wwwroot/" (I always get the damn / and \ the wrong way around.

 

However, it still wants me to put an exclude file in the box, and whatever I put in, it doesn't like, with / or \ or without either...

**

 

 

Any ideas? I'd appreciate some help as I'm trying to make my site as secure as possible, following a recent hack.

 

>-- when I go to "admin" section, obviously it hasn't liked something, as the warning message above reappears when I click the top update button (delete reference file). I'm assuming this is because of the error in the configuration meaning that it hasn't saved my settings, as when I go to setup again, they have vanished.

Edited by Ariadnetheweaver

Share this post


Link to post
Share on other sites

start directory - now, I'm not sure exactly what is needed here. I've tried "\", "c:\domains\ariadnetheweaver.org\wwwroot\" (obviously without the "")

 

I get the following error message:

Warning: opendir(\) [function.opendir.php]: failed to open dir: No such file or directory in C:\Domains\ariadnetheweaver.org\wwwroot\admin\includes\functions\sitemonitor_functions.php on line 418

The problem is with the start directory entry. You shouldn't have to edit that if your shops configure file is setup correctly since it is read from there. The error is saying it can't find the needed file, probably because the path is incorrect. Go to admin->modules and the correct path will be displayed there. Be sure the one you enter for SiteMonitor matches that, except for the modules part of the path, of course.

Share this post


Link to post
Share on other sites

What permissions need to be changed to install this program? I do not see a reference in the readme or elsewhere...

 

 

Thanks!

Share this post


Link to post
Share on other sites

What permissions need to be changed to install this program? I do not see a reference in the readme or elsewhere...

 

I should have mentioned that I get kicked back into Admin/forbidden.php with this error message:

 

"Access Denied

No Right Permission Access

Please contact your Web Administrator to request

more access or if you found any problem."

 

Thanks,

Share this post


Link to post
Share on other sites

The problem is with the start directory entry. You shouldn't have to edit that if your shops configure file is setup correctly since it is read from there. The error is saying it can't find the needed file, probably because the path is incorrect. Go to admin->modules and the correct path will be displayed there. Be sure the one you enter for SiteMonitor matches that, except for the modules part of the path, of course.

 

 

Hi Jack

 

The shops configure file is fine. I've checked the path in admin>-modules, and it is

 

/domains/ariadnetheweaver.org/wwwroot/includes (and then /modules)

 

so, I've used the same path in the sitemonitor "start directory" box. The problem is that the drop down box is not populated at all - assume because it needs to be saved before seeing where the path is. But I can't save it until I enter something in the field. Feels like a catch 22 to me, but I'm sure I'm missing something obvious, can't see where it is.

 

 

Well, I sorted it. I filled the settings in manually in the sitemonitor configure file and simply uploaded the changes. Put exactly the same things in, and it worked. I got around it, but the addon did not work quite the way it was supposed to.

 

It's installed now, anyway :)

 

~~~

or so I thought.

 

ran the "delete reference file" top button.

message: sitemonitor_reference.php has been deleted!

First time ran. Reference file was created and saved

 

excellent.

 

ran the second button (Execute)

No mismatches found

 

great :)

 

third button

worked perfectly

 

fourth button

!!! Could not open the Configure file !!!

No hacked files were found.

I'm assuming it failed because I didn't set up cron/curl (whatever that is)..

 

 

However on running the top button again, it said

"First time ran. Reference file was created and saved"

 

um, not the first time...

 

looks like I'm close, anyway. Even when I open the configure screen again, everything is blank, no matter what I fill in, it resets itself.

Edited by Ariadnetheweaver

Share this post


Link to post
Share on other sites

fourth button

!!! Could not open the Configure file !!!

No hacked files were found.

I'm assuming it failed because I didn't set up cron/curl (whatever that is)..

Curl is optional. There should not be entries for these unless you use that option.

 

However on running the top button again, it said

"First time ran. Reference file was created and saved"

 

um, not the first time...

First time means a new run, not first time ever.

looks like I'm close, anyway. Even when I open the configure screen again, everything is blank, no matter what I fill in, it resets itself.

Then something is wrong with your path. In admin/sitemonitor_configure_setup.php, find

require('includes/functions/sitemonitor_functions.php');

And add this below it

echo 'path '.DIR_FS_ADMIN . FILENAME_SITEMONITOR_CONFIGURE.'<br>'.DIR_FS_DOCUMENT_ROOT;

What is displayed when you visit the configure page?

Share this post


Link to post
Share on other sites

path /domains/ariadnetheweaver.org/wwwroot/sitemonitor_configure.php

/domains/ariadnetheweaver.org/wwwroot/

 

 

 

(I really appreciate your help)

 

 

aahh, is /admin the bit I'm missing?

Edited by Ariadnetheweaver

Share this post


Link to post
Share on other sites

path /domains/ariadnetheweaver.org/wwwroot/sitemonitor_configure.php

 

aahh, is /admin the bit I'm missing?

Yes, admin is missing in the first path. SiteMonitor should be installed in admin, by the way, in case you installed it in the shop side.

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

ah, tracked down the issue. I hadn't manually put the actual path in the DIR_FS_DOCUMENT_ROOT in the configure file, as everything else had worked with just the default variable that was there.

 

Thanks, seems to work now :)

 

I admire your patience in dealing with idiots like me :)

Edited by Ariadnetheweaver

Share this post


Link to post
Share on other sites

Thanks, seems to work now :)

 

I admire your patience in dealing with idiots like me :)

You're welcome. But, as far as patience, I make worse mistakes on a daily basis so I'm just too busy yelling at myself to take time to be upset with anyone else. :)

Share this post


Link to post
Share on other sites

Jack,

 

I've loaded your latest version - no update, I've simply deleted all old files related to the SiteMonitor.

 

Problem #1 - it still monitors excluded directories:

Found a deleted file named cache/also_purchased-english.cache57
Found a deleted file named cache/also_purchased-german.cache58

 

Problem #2 - after I clicked bottom button (Manually Check for Hacked Files):

Warning: Invalid argument supplied for foreach() in /hosting/www/mystore.com/www/admin/includes/functions/sitemonitor_functions.php on line 604...[/codeNot sure if you know but Delete 

 

Not sure if you know, but "Delete Reference file" can only be set to 1-9 days. 10 gets deleted, 11 and higher changes to the second digit (12 becomes 2, 14 becomes 4, etc.).

 

I'm happy to give you ftp if you wish, just let me know.

Edited by mr_absinthe

Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

What permissions need to be changed to install this program? I do not see a reference in the readme or elsewhere...

 

I should have mentioned that I get kicked back into Admin/forbidden.php with this error message:

 

"Access Denied

No Right Permission Access

Please contact your Web Administrator to request

more access or if you found any problem."

 

Thanks,

 

I've had the same issue. I've played with changing various file permissions and have not been able to resolve it. Does anyone have any suggestions? I'd really like to use this contribution.

Share this post


Link to post
Share on other sites

Not sure if you know, but "Delete Reference file" can only be set to 1-9 days. 10 gets deleted, 11 and higher changes to the second digit (12 becomes 2, 14 becomes 4, etc.).

Yes, I did know. The size of that field was set to 1 character. The purpose of that is to clear the reference file after so many days. It is only needed if your reference file gets a lot of entries, like if you are uploading files. So I figured anyone needing it would be setting it to less that three. If someone is willing to have an email full of messages after 9 days, they probably don't care about that setting anyway. At least, that was my thinking. It can be increased in the code if you like though.

I'm happy to give you ftp if you wish, just let me know.

Please send them to me and I will take a look. I'm not sure when it will be but I will try to get to it before next week.

Share this post


Link to post
Share on other sites

A new version has been uploaded with these changes:

 

- Fixed path problem - should correct the issue with not seeing the correct locations.

- Fixed file scan problem that caused a failure on some servers.

Share this post


Link to post
Share on other sites

Please send them to me and I will take a look. I'm not sure when it will be but I will try to get to it before next week.

Done, I've not uploaded the v 2.4 yet, I'll leave that up to you <_<


Absinthe Original Liquor Store

Share this post


Link to post
Share on other sites

I've had the same issue. I've played with changing various file permissions and have not been able to resolve it. Does anyone have any suggestions? I'd really like to use this contribution.

 

You need to set the file access permissions in admin to Site Monitor. Once I did that, it worked fine.

Share this post


Link to post
Share on other sites

Hello Jack,

I'm sorry because I wouldn't disturb you. Can you help me to solve this simple and stupid problem, please? I read and followed this thread, I'm sure that I'm in a water glass but I'm not able to solve my problem because I don't see where I'm making the mistake(s).

I have the same problem of "Ariadnetheweaver"

I installed your contribute and when I run Sitemonitor on the left applications menu, it returns an error:

"Warning: opendir(http) [function.opendir]: failed to open dir: No such file or directory in /web/htdocs/domain_name/home/catalog/admin/includes/functions/sitemonitor_functions.php on line 420"

I followed your suggestion modifying sitemonitor_functions.php in function folder to see what is the value of $dir and it return always "http" even if I change the value of Start Directory in many kinds of values. For example I tried: keeping blank, http, http://domain_name, http://domain_name/, http://domain_name/catalog, http://domain_name/catalog/, etc

The domain_name value is my domain name of course...

I'm testing this contrib on a productive shop, even if it is in standalone status.

Thanks to all.

Michele

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

×