Jump to content



Photo
* * * * * 3 votes

SiteMonitor


  • Please log in to reply
2155 replies to this topic

#2061   modem2.0

modem2.0
  • Members
  • 70 posts
  • Real Name:Modem 2.0

Posted 12 July 2012 - 09:02

Hi Jack,

I noticed that on the browser you can open the site monitor text files (sitemonitor_configure_0.txt, sitemonitor_db_reference.txt, etc), and you can also show the text logs from the directory sitemonitor_logs. Shouldn't these files be protected by .htaccess?

Regards

#2062 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,413 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 12 July 2012 - 12:56

I am getting this message:

Warning: fopen(/typo24.gr/catalog/admin/sitemonitor_configure_0.txt) [function.fopen]: failed to open stream: No such file or directory What has this meaning?

Did you upload all of the files in the package to the correct location on your server? Did you go to the configure section of SiteMonitor and click update to save teh settings?

#2063 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,413 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 12 July 2012 - 12:57

Hi Jack,

I noticed that on the browser you can open the site monitor text files (sitemonitor_configure_0.txt, sitemonitor_db_reference.txt, etc), and you can also show the text logs from the directory sitemonitor_logs. Shouldn't these files be protected by .htaccess?

Regards

They are in your admin, or should be, which is already protected, or should be.

#2064   modem2.0

modem2.0
  • Members
  • 70 posts
  • Real Name:Modem 2.0

Posted 12 July 2012 - 13:17

They are in your admin, or should be, which is already protected, or should be.

Mine is not protected by .htpassdw, otherwise I can not configure cron tab (I use a web cron tab as my provider does not allow me to have crontab jobs).
I believe this will happen to lot's of people.

#2065 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,413 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 12 July 2012 - 13:37

Mine is not protected by .htpassdw, otherwise I can not configure cron tab (I use a web cron tab as my provider does not allow me to have crontab jobs).
I believe this will happen to lot's of people.

No, that is not very common. I suggest you find a host that allows using oscommerce properly since it isn't a question of if your site will be hacked, just when it will be.

#2066   altoid

altoid
  • Community Sponsor
  • 993 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Hollidaysburg, Pennsylvania

Posted 13 July 2012 - 01:27

- In the sitemonitor_functions.php file, find mktime and change it to @mktime.


Jack, the change to @mktime took care of that warning generated when running php v 5.3.

Another thing I notice when running the same process in php v 5.3.13, I am getting this

No new files found...
No deleted files found...
No size differences found...
Time Mismatch on myshopsadmin/session_mm_cgi-fcgi503.sem Last Changed on Friday, 13 Jul 2012 01:19:34 GMT
No permissions mismatches found...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sitemonitor (0) ran on July 12, 2012, 9:19 pm
Total mismatches found were 1
Total files being monitored is 2537
Email sent to shop owner.


When I delete the reference file, this file appears every time, with an updated time mismatch.

This only occurs with php 5.3; toggling back to 5.2, this output does not occur.

Thanks
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.

#2067 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,413 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 13 July 2012 - 03:30

I haven't seen a failure like that before so I don't have an answer for it. But you might want to look at the entry for that file in the reference file. Maybe something is causing it to be recorded incorrectly which in turns causes the script to fail.

#2068   altoid

altoid
  • Community Sponsor
  • 993 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Hollidaysburg, Pennsylvania

Posted 13 July 2012 - 21:24

I haven't seen a failure like that before so I don't have an answer for it. But you might want to look at the entry for that file in the reference file. Maybe something is causing it to be recorded incorrectly which in turns causes the script to fail.


Here's what's in the reference file:

/home/myname/public_html/myshopsadmin/session_mm_cgi-fcgi503.sem,0,1342142476,600

What is that file anyway, I don't see it browsing the shop via my ftp client or the cPanel file manager?
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.

#2069 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,413 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 13 July 2012 - 23:52

Here's what's in the reference file:

/home/myname/public_html/myshopsadmin/session_mm_cgi-fcgi503.sem,0,1342142476,600

What is that file anyway, I don't see it browsing the shop via my ftp client or the cPanel file manager?

According to http://filext @ com/file-extension/SEM, it is a file used by a design company. If you don't need it for your site, it should be deleted. If possible, out of curiosity, you could copy/rename some common file, like privacy.php, to privacy.sem to see if it is the filetype that is causing a failure.

#2070   altoid

altoid
  • Community Sponsor
  • 993 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Hollidaysburg, Pennsylvania

Posted 14 July 2012 - 00:46

According to http://filext @ com/file-extension/SEM, it is a file used by a design company. If you don't need it for your site, it should be deleted. If possible, out of curiosity, you could copy/rename some common file, like privacy.php, to privacy.sem to see if it is the filetype that is causing a failure.


I'll check into this with my host. I've not used a design company but I wouldn't be surprised this file is there because of some of the design support they offer. Or something like that. I'll get back with what I find out and see if what you recommended takes care of this.

Thanks
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.

#2071   altoid

altoid
  • Community Sponsor
  • 993 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Hollidaysburg, Pennsylvania

Posted 14 July 2012 - 01:33

I'll check into this with my host. I've not used a design company but I wouldn't be surprised this file is there because of some of the design support they offer. Or something like that. I'll get back with what I find out and see if what you recommended takes care of this.

Thanks


well that went more quickly than i expected...here's what the host support guy says about that file...


The file is a session file created by the FastCGI software.
on our VPS accounts we recommend FastCGi, coupled with APC. APC is a caching/snapshot software and FastCGI is a faster handler of CGI/Perl files.
They may update continually, delete and recreate (creating snapshots of the website).
I have confirmed that they are a part of APC's snapshot/caching functions.
APC and FastCGI integrate with PHP to cache the site and improve performance.


So the support guy recommends not doing anything with it as per above. Which I guess is the best thing to do.

Interesting that running Site Monitor on 5.3 picks this up but doesn't when running 5.2

Would it be worth considering code in Site Monitor to ignore this file? Right now the only way I think I could avoid it is to exclude all my "admin" folders and files consider this is showing to reside right under the admin side of things.
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.

#2072 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,413 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 14 July 2012 - 03:49

well that went more quickly than i expected...here's what the host support guy says about that file...




So the support guy recommends not doing anything with it as per above. Which I guess is the best thing to do.

Interesting that running Site Monitor on 5.3 picks this up but doesn't when running 5.2

Would it be worth considering code in Site Monitor to ignore this file? Right now the only way I think I could avoid it is to exclude all my "admin" folders and files consider this is showing to reside right under the admin side of things.

Yes, it doesn't sound like it is anything to worry about so you might want to exclude it. There is code in the functions file where you can add it to the list to exclude.

#2073   altoid

altoid
  • Community Sponsor
  • 993 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Hollidaysburg, Pennsylvania

Posted 14 July 2012 - 10:59

Yes, it doesn't sound like it is anything to worry about so you might want to exclude it. There is code in the functions file where you can add it to the list to exclude.

thanks, I'll take a look
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.

#2074   modem2.0

modem2.0
  • Members
  • 70 posts
  • Real Name:Modem 2.0

Posted 22 July 2012 - 11:10

Hi Jack,

I can't setup the server cron job.
I followed your instructions, if I use the method
php /home/username/public_html/catalog/admin/sitemonitor.php X
the instance provided in x is ignored and instance 0 is always run.

If I use the 2nd method,
php /home/username/public_html/catalog/admin/sitemonitor.php?instance=X
I get an error saying
Status: 404 Not Found
X-Powered-By: PHP/5.3.13
Content-type: text/html
No input file specified.

Is there another way to run it? Or am I doing something wrong?

#2075 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,413 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 22 July 2012 - 13:15

I can't setup the server cron job.
I followed your instructions, if I use the method
[/CODE]

Is there another way to run it? Or am I doing something wrong?

Cron syntax can vary with the host so you need to ask yours to find out what will work on their server.

#2076   GwilliamP

GwilliamP
  • Members
  • 157 posts
  • Real Name:Paul
  • Gender:Male
  • Location:North Devon - UK

Posted 29 July 2012 - 22:02

Hi, A CRON related request but I am not sure if it belongs here or on a completely different forum about server management.

I have successfully installed/configured this on 2 domains on the same hosting account. I have set up 2 CRON jobs that run once a day.

One of my stores now has such a huge number of images that I am encountering time-outs. I have tested running two configs. One for the main osC excluding images, the other for images only. Works like a charm.

Now my problem - I am limited to 2 CRON jobs only. Splitting one domain as above means I want to run three CRON jobs. I am thinking of putting the commands into a script file and just running the script as a single CRON job.
/home/www/domain1.com/shop/admin/sitemonitor.php 0
/home/www/domain2.com/shop/admin/sitemonitor.php 0
/home/www/domain2.com/shop/admin/sitemonitor.php 1

I have 2 questions;
  • Is this viable?
  • Is there a way of adding a delay between the execution of each line?
If not appropriate here, could you recommend a suitable forum?

P.S. I can't thank you enough for the peace of mind this brings me each morning. Occasionally the lesser important domain gets a .php file dumped in the images folder but that is protected by a run block in .htaccess so I just delete it. This contribution alone has reduced my stress/worry level no end.

#2077 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,413 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 30 July 2012 - 00:07

Now my problem - I am limited to 2 CRON jobs only. Splitting one domain as above means I want to run three CRON jobs. I am thinking of putting the commands into a script file and just running the script as a single CRON job.

I have 2 questions;

  • Is this viable?
  • Is there a way of adding a delay between the execution of each line?
P.S. I can't thank you enough for the peace of mind this brings me each morning. Occasionally the lesser important domain gets a .php file dumped in the images folder but that is protected by a run block in .htaccess so I just delete it. This contribution alone has reduced my stress/worry level no end.

I'm pleased to here it has helped you and I appreciate you mentioning it.

As far as cron, you can't run a script of cron jobs from a control panel. At least, I've never seen a way. I seem to recall reading something about to that by using the shell to connect to crontab, but i don't know where I saw it. I'm sure, if it is possible, it is on the web somewhere. But you may want to ask your host first.

#2078   GwilliamP

GwilliamP
  • Members
  • 157 posts
  • Real Name:Paul
  • Gender:Male
  • Location:North Devon - UK

Posted 31 July 2012 - 09:40

Why is it that the simple things in life often turn out to be complicated?

Taking your advice above I decided to write a simple .php file for CRON to run. The file, in theory, runs each config in turn.
<?php
/*
  $Id: sitemonitor-CRON.php,v 1.0 31-07-2112 by Paul
  Purpose - Run runSitemonitor function twice, once for each config, with delay between
*/
  require('includes/functions/sitemonitor_functions.php');
  echo "Setting variables for config 0";
  $instance = '0';
  $logFile = 'sitemonitor_log' . '_' . $instance . '.txt';
  $referenceFile = 'sitemonitor_reference' . '_' . $instance . '.txt';
  echo "RUNNING config 0";
  runSitemonitor($referenceFile, $logFile, $verbose);
  echo "Sleep";
  sleep(60);
  echo "Setting variables for config 1";
  $instance = '1';
  $logFile = 'sitemonitor_log' . '_' . $instance . '.txt';
  $referenceFile = 'sitemonitor_reference' . '_' . $instance . '.txt';
  echo "RUNNING config 1";
  runSitemonitor($referenceFile, $logFile, $verbose);
  echo "FINISHED";
?>
The echo statements are purely for debugging.

After uploading I entered the URL in the browser expecting to see the echo lines appear one at a time. The page blanked and eventually came back with

Setting variables for config 0RUNNING config 0SleepSetting variables for config 1RUNNING config 1FINISHED

I checked the logs but nothing was updated. I did not get either of the expected emails.

Am I missing something obvious?

As this is a bit off topic I do not mind if you do not wish to deal with this.

#2079   Sumisu

Sumisu
  • Members
  • 34 posts
  • Real Name:Martin
  • Gender:Male

Posted 04 September 2012 - 17:47

Hi

I'm having a problem :/

whenever I make ANY change to anything in the config or admin, Like change a value or click update, or click any button from the admin page, I get the following:

Forbidden

You do not have permission to access this document.


Then, I think it crashes the server, because I cant access any page on the site (admin or catalog).. I cant even access my server via FTP.

Any ideas?

#2080 ONLINE   Jack_mcs

Jack_mcs
  • Members
  • 26,413 posts
  • Real Name:Jack York
  • Gender:Male
  • Location:Michigan

Posted 04 September 2012 - 22:54

Why is it that the simple things in life often turn out to be complicated?

Taking your advice above I decided to write a simple .php file for CRON to run. The file, in theory, runs each config in turn.

After uploading I entered the URL in the browser expecting to see the echo lines appear one at a time. The page blanked and eventually came back with

I checked the logs but nothing was updated. I did not get either of the expected emails.

Am I missing something obvious?

Looks like you're missing the rerequire('sitemonitor_configure... statement.