Jump to content



Photo
* * * * * 3 votes

SiteMonitor


  • Please log in to reply
2155 replies to this topic

#2041 ONLINE   Jack_mcs

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

Posted 18 April 2012 - 23:42

the error i got

[img]http://hendersonsflowers.co.uk/admin/images/icons/error.gif[/img] Your username is invalid. Please change it and try again.: System -> /home/hende/public_html/ - SiteMonitor -> /home/hende/public_html/

That only occurs on old versions. You should update to the latest version.

#2042   Dum Dum

Dum Dum
  • Members
  • 21 posts
  • Real Name:Clive Storey

Posted 30 April 2012 - 08:50

Hi

I appear to have successfully set this up the only error message I am getting is

Failed to open file sitemonitor_db_reference.txt.

I have not got this file I assume it is written by the programme.

the error log for the site gives

[Mon Apr 30 09:25:58 2012] [error] [client XXX.XX.X.XX] PHP Warning: unlink(sitemonitor_reference_0.txt): Permission denied in /var/www/html/xxxxxxxxxxxxxxxxxx.co.uk/catalog/xxxxxxx*admin/sitemonitor_admin.php on line 101, referer: http://xxxxxxxxxxx/c...nitor_admin.php
[Mon Apr 30 09:25:58 2012] [error] [client XXX.XX.X.XX] PHP Warning: opendir(/var/www/html/xxxxxxxxxxxxxxxxxx.co.uk/catalog/xxxxxxx/images/cursors): failed to open dir: Permission denied in /var/www/html/xxxxxxxxxxxxx.co.uk/catalog/xxxxxxxxxx*admin/includes/functions/sitemonitor_functions.php on line 343, referer: http://xxxxxxxxxx/ca...nitor_admin.php

the image file is set to read and write can you say what other files/directories have to have their permissions changed as I do not wish to change permissions on unnessary files/directories?.

Thanks

#2043 ONLINE   Jack_mcs

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

Posted 30 April 2012 - 13:25

Hi

I appear to have successfully set this up the only error message I am getting is

Failed to open file sitemonitor_db_reference.txt.

I have not got this file I assume it is written by the programme.

the error log for the site gives

[Mon Apr 30 09:25:58 2012] [error] [client XXX.XX.X.XX] PHP Warning: unlink(sitemonitor_reference_0.txt): Permission denied in /var/www/html/xxxxxxxxxxxxxxxxxx.co.uk/catalog/xxxxxxx*admin/sitemonitor_admin.php on line 101, referer: http://xxxxxxxxxxx/c...nitor_admin.php
[Mon Apr 30 09:25:58 2012] [error] [client XXX.XX.X.XX] PHP Warning: opendir(/var/www/html/xxxxxxxxxxxxxxxxxx.co.uk/catalog/xxxxxxx/images/cursors): failed to open dir: Permission denied in /var/www/html/xxxxxxxxxxxxx.co.uk/catalog/xxxxxxxxxx*admin/includes/functions/sitemonitor_functions.php on line 343, referer: http://xxxxxxxxxx/ca...nitor_admin.php

the image file is set to read and write can you say what other files/directories have to have their permissions changed as I do not wish to change permissions on unnessary files/directories?.

Thanks

The code is trying to create that file but is not able to. You need to show the error to your host. They'll probably need to change the ownereship of the admin directory.

#2044   drmaz

drmaz
  • Members
  • 19 posts
  • Real Name:Stan
  • Gender:Male

Posted 21 June 2012 - 04:06

Hi I just installed SiteMonitor and it works great. I just have one small problem when I got into the admin section of my site and click on SiteMonitor tab I get this in red at the top of the page "[img]http://www.theaquariumstore.com.au/admin/images/icons/error.gif[/img] WARNING: Your admin name is admin. That should be changed. " how do I fit this?

Cheers
Stan

#2045 ONLINE   14steve14

14steve14
  • Members
  • 3,506 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 21 June 2012 - 10:04

Hi I just installed SiteMonitor and it works great. I just have one small problem when I got into the admin section of my site and click on SiteMonitor tab I get this in red at the top of the page "[img]http://www.theaquariumstore.com.au/admin/images/icons/error.gif[/img] WARNING: Your admin name is admin. That should be changed. " how do I fit this?

Cheers
Stan


Change the name of the adnim folder to something that is not easy to guess, using your hosts cpanel or equivalent. Once the file has been changed open both of your includes/configure files and alter the references to admin to your new folder name. It really is that simple. You may have to alter the file permissions before you can alter the configure files, just rememder to change them back to what they originally were.
REMEMBER BACKUP, BACKUP AND BACKUP

Don't take life too seriously. no one gets out alive anyway

#2046   drmaz

drmaz
  • Members
  • 19 posts
  • Real Name:Stan
  • Gender:Male

Posted 21 June 2012 - 14:42

Change the name of the adnim folder to something that is not easy to guess, using your hosts cpanel or equivalent. Once the file has been changed open both of your includes/configure files and alter the references to admin to your new folder name. It really is that simple. You may have to alter the file permissions before you can alter the configure files, just rememder to change them back to what they originally were.



All fixed up thank you so much I feel my site is a little safer now. /biggrin.png' class='bbc_emoticon' alt=':D' />

#2047   drmaz

drmaz
  • Members
  • 19 posts
  • Real Name:Stan
  • Gender:Male

Posted 21 June 2012 - 22:51

HI I just tried to Delete Reference File Delete the reference file and create a new one. But when I clicked on the update button I get this error
Fatal error: Maximum execution time of 30 seconds exceeded in home/theaquar/public_html/tasa/includes/functions/sitemonitor_functions.php on line 635
So I had a look at line 635 and it is like this; $parts = explode(",", $path); is there a problem here if so what is the fix for it. I have also change the admin file name resently, not sure if the would have made a difference or not. Thanks for all you help
Cheers
Stan

#2048 ONLINE   Jack_mcs

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

Posted 22 June 2012 - 00:05

HI I just tried to Delete Reference File Delete the reference file and create a new one. But when I clicked on the update button I get this error
Fatal error: Maximum execution time of 30 seconds exceeded

When you use the first update button to delete the referene file, the code reads it in first. If the file is large enough that can cause the timeout. In that case, you will need to delete the sitemonitor_reference_X.txt file manually, where X is the instance number.

#2049   chthoo

chthoo
  • Members
  • 1 posts
  • Real Name:CHEHUI

Posted 30 June 2012 - 19:42

HI,

I just installed Sitemonite For RC2,

getting this message when trying update the configure file for the first time.

Failed to open file /home/myshop/public_html/admin/sitemonitor_configure_0.txt


file permission is 666


any idea where is the error?


Thanks...

#2050 ONLINE   Jack_mcs

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

Posted 01 July 2012 - 00:04

HI,

I just installed Sitemonite For RC2,

getting this message when trying update the configure file for the first time.

Failed to open file /home/myshop/public_html/admin/sitemonitor_configure_0.txt


file permission is 666


any idea where is the error?

Be sure that that is the correct path to the file, which should be present. You can verify that by looking at the path in the admin->Modules->Payment 9below the modules).

#2051 ONLINE   Jack_mcs

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

Posted 02 July 2012 - 03:10

A new version has been uploaded with the following changes:

- Added a link to quickly delete the reference an db reference files.
- Added code to check for the existence of an .htaccess file in the includes directory.
- Explanded startup file checking code to check for six types instead of two in the images directory.
- Changed hacker test to skip certain legitimate cases where eval is part of the name. Removes a lot false results from the test.
- Changed initial file checking for the images directory so empty entries are ignored.
- Corrected mistake in 2.9 -> 3.0 update instructions found by user razeryokes.
- Corrected messageStack code in sitemonitor_admin.php.
- Fixed log code. It wasn't truncating logs correctly.

#2052   badlhby

badlhby
  • Members
  • 16 posts
  • Real Name:Bob Lusch
  • Gender:Male
  • Location:Northern Ohio, USA

Posted 02 July 2012 - 15:19

I just installed the latest version 3.2 on an RC2A instance. The Delete Reference File worked without error. The Execute Sitemonitor had 2 differences which are expected. But when I run the Manually Execute Sitemonitor, the following error occurs:

Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: No such file or directory in /home/content/l/e/l/xxxxxxx/html/xxxxx/includes/functions/sitemonitor_functions.php on line 364

Not sure why it's not picking up the correct start directory? When I go back into Configure everything appears to be correct. When I open the sitemonitor_configure_0.txt file it still contains the defaults. Where is the configuration information stored?

#2053   badlhby

badlhby
  • Members
  • 16 posts
  • Real Name:Bob Lusch
  • Gender:Male
  • Location:Northern Ohio, USA

Posted 02 July 2012 - 15:37

Never mind... it appears that I had FILENAME_SITEMONITOR_CONFIGURE set to .PHP instead of .TXT. Everything is working fine. Nice product /smile.png' class='bbc_emoticon' alt=':)' />

#2054   modem2.0

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

Posted 09 July 2012 - 14:41

Hi Jack,

I'm using your great contrib, but unfortunatelly my provider has disabled mail function for security reasons. Is there a way to use other mail contribs? I'm using PHPMailer Class in the store...

Thanks

#2055 ONLINE   Jack_mcs

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

Posted 09 July 2012 - 15:50

I'm using your great contrib, but unfortunatelly my provider has disabled mail function for security reasons. Is there a way to use other mail contribs? I'm using PHPMailer Class in the store...

Yes, but it isn't something I offer support for. But one would normally only have to include the class file, create an instance of the class and change the tep_mail line in the code to get it to work, assuming the email class you have installed is working correctly. If email is disables then the change must have been made to your checkout_process.php file or your customers would not receive emails. So you can check there to see how it is done.

--> Stepping up on soapbox
In my opinion, it is nonsense for a host to do that. I suspect what happened was that they were getting bombarded with emails sent from hackers using the tell a friend and other form pages and instead of having the sites on the server fix the problem, they just turned it off. I'm always of the opinion that if you have to change your sites basic functions to work with a particular host, then you should switch hosts.
--> Rant completed /smile.png' class='bbc_emoticon' alt=':)' />

#2056   modem2.0

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

Posted 10 July 2012 - 10:06

Thanks Jack,
I'll have a look...

I'm just a bit confused about the change to do in tep_mail line, because I can't find any tep_mail being used in your contribution. There is although a mail line around line 1169 in the file sitemonitor_functions.php:
    if ($ttlErrors || $always_email) {
	    mail($to, 'Site Monitor Results', $msg, $from);
	    if ($verbose)
		    echo 'Email sent to shop owner.' .'<br>';
    }

Unless you are talking about other tep_mail line...

#2057   modem2.0

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

Posted 10 July 2012 - 11:45

Hi again Jack,

I managed to use PHPmailer class to send the emails.
For other people using the same contrib (http://addons.oscommerce.com/info/7226), here is what I changed on admin/includes/functions/sitemonitor_functions.php:
Find:
	if ($ttlErrors || $always_email) {
			mail($to, 'Site Monitor Results', $msg, $from);
			if ($verbose)
					echo 'Email sent to shop owner.' .'<br>';
	}
Replace by:
	if ($ttlErrors || $always_email) {
		  // include server parameters
		  require('includes/configure.php');
		  $server=DB_SERVER;			  # host name of server running MySQL
		  $user=DB_SERVER_USERNAME;	   # existing login username for mysql
		  $password=DB_SERVER_PASSWORD; # login password for mysql username
		  $dbname=DB_DATABASE;			# name of existing database to use
		  // Connect to database and get all config values.
		  $config_values="";
		  $dbconn=@mysql_connect($server,$user,$password) or http_headers('','Error,Database Connection');
		  @mysql_select_db($dbname,$dbconn) or http_headers('','Error,Database Connection');
		  $sql="select configuration_key as cfgKey, configuration_value as cfgValue from configuration where configuration_group_id='12' or configuration_group_id='1'";
		  $result=@mysql_query($sql,$dbconn) or http_headers('','Error,Database Connection');
		  while ($row = @mysql_fetch_array($result)) {
			if ($row['cfgKey'] != "LAST_HASH") $config_values.=$row['cfgKey'].'='.$row['cfgValue'];  // To be fed to hashing function.
			  define($row['cfgKey'], $row['cfgValue']);
		  }
		if(EMAIL_USE_PHPMAILER == 'true')
		{
		  require(DIR_WS_FUNCTIONS . 'general.php');
		  require_once(DIR_WS_CLASSES . 'phpmailer/class.phpmailer.php');
		  tep_mail($to, $to, 'Site Monitor Results' . ' - ' . STORE_NAME, $msg, $from, $from);
		}
		else {
		  mail($to, 'Site Monitor Results', $msg, $from);
		}
		if ($verbose)
			echo 'Email sent to shop owner.' .'<br>';
	}


I had also the change the $from string in the sitemonitor_configure_0.txt (as for other instances if they exist) from:
$from = 'From: some_address@your_domain.com'; //where email is sent from
to:
$from = 'some_address@your_domain.com'; //where email is sent from
as I got an error saying:
Invalid address: From: some_address@your_domain.com
Of course I changed some_address@your_domain.com to my real email address...
This last change can also be performed on sitemonitor_functions.php for any new configuration files to be created using the right string.

Enjoy!

#2058   altoid

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

Posted 12 July 2012 - 00:03

Jack, in a 2.3.1 shop in Sitemonitor V3.2>Admin>Manually Execute Sitemonitor, after clicking the update button I get this:


Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in /home/myname/public_html/myshopsadmin/includes/functions/sitemonitor_functions.php on line 296


This only occur with php 5.3.13; when I toggle the shop over to php version 5.2 the warning is not there.

I have this:

// set default store time zone

ini_set('date.timezone', 'America/New_York');


in the shops application_top.php file.

Any ideas on this?

Thanks

Edited by altoid, 12 July 2012 - 00:14.

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.

#2059 ONLINE   Jack_mcs

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

Posted 12 July 2012 - 02:00

Jack, in a 2.3.1 shop in Sitemonitor V3.2>Admin>Manually Execute Sitemonitor, after clicking the update button I get this:

This only occur with php 5.3.13; when I toggle the shop over to php version 5.2 the warning is not there.
I have this:

in the shops application_top.php file.

As far as I know, it should only show such a failure if the date is not present, which is should never be in this case, or if a certain argument is used in that function, which it isn't, so I don't know why it is showing the error. You can try two tihngs to remove it though:

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

- Add this to the top of the function that call is in or at the top of the sitemonitor_admin.php file (after the includes application_top line
date_default_timezone_set("America/New_York");


#2060   maltafalk

maltafalk
  • Members
  • 1 posts
  • Real Name:Lokman

Posted 12 July 2012 - 07:49

I install the contr. as far as i can ( I am really not good in this kind of things)
And I can not bring it to run.

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 in /usr/www/users/myserver/mysite/catalog/admin/includes/functions/sitemonitor_functions.php on line 779
Failed to open file /mysite/catalog/admin/sitemonitor_configure_0.txt
Warning: fclose() expects parameter 1 to be resource, boolean given in /usr/www/users/myserver/mysite/catalog/admin/includes/functions/sitemonitor_functions.php on line 783

What has this meaning?