Jump to content
Jack_mcs

SiteMonitor

Recommended Posts

If you couldn't write to the configure file from within the script, then I doubt it will work properly when ran since it has to create and write to other files.

Share this post


Link to post
Share on other sites

I am having problem with site monitor not sending me emails. Any ideas where to look?

 

I am not sure if this has anything to do with the emails, but I had problem setting up sitemonitor to work because the configure file could not be written to. I added the settings manually and now it works. I added a new file to test and it was found during the scan. But the results fo the scan were not sent to the email address.

Share this post


Link to post
Share on other sites

I have a new problem now. Cron jobs dont seem to work.

I have set godaddy to email me with warning messages regarding the cron jobs. This is what I get:

 

/bin/sh: php: command not found

 

Is this a problem with the hosting?

Heres the code for the cron job I'm using (with a few things changed for protection)

 

php /home/content/00/0000000/html/catalog/admin/sitemonitor.php 0

 

I also tried

 

php /home/content/00/0000000/html/catalog/admin/sitemonitor.php?instance=0

Edited by karoloydi

Share this post


Link to post
Share on other sites

ok found the solution.

If anyone else with godaddy account has the same problem add this before the cron job:

 

/web/cgi-bin/php5

 

So the full code should be:

 

/web/cgi-bin/php5 [color=#000000]php [/color][color=#666600]/[/color][color=#000000]home[/color][color=#666600]/[/color][color=#000000]content[/color][color=#666600]/[/color][color=#006666]00[/color][color=#666600]/[/color][color=#006666]0000000[/color][color=#666600]/[/color][color=#000000]html[/color][color=#666600]/[/color][color=#000000]catalog[/color][color=#666600]/[/color][color=#000000]admin[/color][color=#666600]/[/color][color=#000000]sitemonitor[/color][color=#666600].[/color][color=#000000]php [/color][color=#006666]0[/color]

Share this post


Link to post
Share on other sites

OK. Last request for assistance:

 

In the site monitor hacker test the email sender appears as my admin username. I don't want to have that for practical and also security reasons in case my email gets hacked.

Any way to change that to "site monitor"?

 

Also, when I add a hacker test finding in the exclude list, will that only add the line of code found? Or will it add the entire file?

 

Thanks

Share this post


Link to post
Share on other sites

I think the hacker test uses the email address in the settings of SiteMonitor but I haven't looked at it in a while so I may be wrong. Do you have the email address set to where you want it to go? Regarding the exclude list in the hacker test, it excludes the whole file.

Share this post


Link to post
Share on other sites

Thanks for your reply. It would be nice if you could exclude only some lines of code.Cause with all the warnings that there are there it will be easy to miss if there's a real warning. And I dont wanna exclude whole files.

 

The email sent for the normal site monitor file has the same address as the one I have put in the settings. It appears as sitemonitor@@MySitesOnline.com via p0nlhftpg000.shr.prod.phx3.secureserver.net

 

But the email for the hacked file is: username <username@p0nlhftpg000.shr.prod.phx3.secureserver.net>

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

It will work on any oscommerce-based shop but you will have to adjust the installation to deal with the menu system oscmax uses.

Share this post


Link to post
Share on other sites

It will work on any oscommerce-based shop but you will have to adjust the installation to deal with the menu system oscmax uses.

Thank you very much. Is there any guidance on installation adjustments necessary?

Share this post


Link to post
Share on other sites

Thank you very much. Is there any guidance on installation adjustments necessary?

I forgot to say that I'd tried to follow the instructions on osCmax forum for setting up Sitemonitor (2.9) but it seems to be no longer relevant for Sitemonitor 3.2

Share this post


Link to post
Share on other sites

No there's no instructions for that since it was written for the stock oscommerce shop. And It is against forum rules to provide support for other shops. So you will either need to seek help in that forum or pay someone to make the changes for you.

Share this post


Link to post
Share on other sites

Hi I am trying to set up SiteMonitor on a fresh 2.3.3.4 website. I get to step 6 and run the third option and I get the following message:

 

Warning: opendir(/home/username/public_html,/home/username/public_html): The system cannot find the path specified. (code: 3) in C:\xampp\htdocs\kc14\KCAPaneL\includes\functions\sitemonitor_functions.php on line 364

 

Warning: opendir(/home/username/public_html): failed to open dir: No such file or directory in C:\xampp\admin\includes\functions\sitemonitor_functions.php on line 364

No new files found...

Found a deleted file named

No size differences found...

No time mismatches found...

No permissions mismatches found...

 

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

Sitemonitor (0) ran on December 11, 2013, 11:48 am

Total mismatches found were 1

Total files being monitored is 0

Email sent to shop owner.

Reference file deleted due to reset setting.

 

Warning: opendir(/home/username/public_html,/home/username/public_html): The system cannot find the path specified. (code: 3) in C:\xampp\admin\includes\functions\sitemonitor_functions.php on line 364

 

Warning: opendir(/home/username/public_html): failed to open dir: No such file or directory in C:\xampp\admin\includes\functions\sitemonitor_functions.php on line 364

Reference file creation failed!

 

I also found that step 4 is unnecessary as the code has changed to include everything under admin/includes/boxes/

 

Please could anyone shed some light?

 

Many thanks in advance.


Debbie Harrison

 

Share this post


Link to post
Share on other sites

It appears you don't have the configure section setup correctly or there is a problem with your sites configure file. The error is saying it can't find /home/username/public_html,/home/username/public_html/ and shows you are running this on a Windows computer. Do you really have such a path on your computer? Even if you do, the comman in that path is invalid.

Share this post


Link to post
Share on other sites

Ok so one assumes that I need to add the settings under admn/includes/sitemonitor_functions.php? This is defnitely not mentioned in the readme file.

 

Also it makes no odds doing this. I still get the same message. So it can't be that. :sweating:

Edited by dvharrison

Debbie Harrison

 

Share this post


Link to post
Share on other sites

I update the configure page and then get a pink banner with just a warning icon. I don't think the sitemonitor_configure_0 file is being updated.


Debbie Harrison

 

Share this post


Link to post
Share on other sites

Ok Manual seems to work ok. But config file had to be setup manually.

Edited by dvharrison

Debbie Harrison

 

Share this post


Link to post
Share on other sites

Hi. I have installed last version in oscommerce 2.3.3.4. Configure was ok but when I go to Sitemonitor Admin I get this:

 

Warning: fopen(sitemonitor_db_reference.txt) [function.fopen]: failed to open stream: Permiso denegado in /home/content/g/a/s/gasan/html/tienda/adminromkar/includes/functions/sitemonitor_functions.php on line 844

Failed to open file sitemonitor_db_reference.txt

Warning: fclose(): supplied argument is not a valid stream resource in /home/content/g/a/s/gasan/html/tienda/adminromkar/includes/functions/sitemonitor_functions.php on line 848

 

Warning: unlink(sitemonitor_db_reference.txt) [function.unlink]: No existe el fichero o el directorio in /home/content/g/a/s/gasan/html/tienda/adminromkar/includes/functions/sitemonitor_functions.php on line 134

 

Also I get at the top:

 

WARNING: Database reference creation failed.

 

Any help, please?

Edited by gasan

Share this post


Link to post
Share on other sites

Solved! I have created a text file named sitemonitor_db_reference.txt and place it in admin of oscommerce with permission 704.

 

Now I am getting a new error when run Sitemonitor:

 

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in /home/content/g/a/s/gasan/html/tienda/adminromkar/includes/functions/sitemonitor_functions.php on line 189

 

Any help?

Share this post


Link to post
Share on other sites

That is something specific to your shop since the addon works fine in all versions of oscommerce. The failure is occurring where the reference file is read in and handled and is saying there is something in the reference file that it can't understand. I can't say what that is since I can't see that file but you can try a few things. First, delete the sitemonitor_reference_0.txt file and try running SiteMonitor again. Be sure you are clicking on the top first update button and then the second as opposed to just clicking on the second. If it still fails, then you will need to edit the reference file, delete about half of it and try clicking on the second update button. If it fails, reduce it more. If it doesn't, the problem is in the part you deleted.

Share this post


Link to post
Share on other sites

Great contribution! Thanks Jack! :)

Does it work on 2.2 MS2a?

Also, in this post: http://forums.oscommerce.com/topic/221438-sitemonitor/page-108#entry1684558, you mentioned an upcoming version which will allow excluding some lines of code.

Is it coming soon?

Share this post


Link to post
Share on other sites

@dr_lucas You're welcome and thanks. :) Yes, it works on any version of oscommerce. No, I haven't worked on the changes mentioned in that post.

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

×