Jump to content
Jack_mcs

SiteMonitor

Recommended Posts

I've got now this error:

Warning: opendir() [function.opendir]: Unable to access home/public/sites/ in /public/sites/www.deriemenshop.nl/inlog/includes/functions/sitemonitor_functions.php on line 419

What do you have in catalog/includes/configure.php on this line? :

define('DIR_FS_CATALOG', '/home/username/public_html/catalog/');


---------------

regards

sijo

---------------

 

Contrib: JMrating10 - Rate your products / osCommerce VTS - Virus & Threat Scanner

 

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

Share this post


Link to post
Share on other sites

I've installed the contribution on one of my sites and overall I think it's pretty slick. However, I do have one issue. I've noticed the log file and the reference file in several places now on my server. It appears those files are generated based on where the command is run from or something. In my case, I found copies in the catalog directory, the admin directory, and the directory where my cron script is located. Having those files in the catalog directory is a problem because it exposes the full directory structure and script names of my entire site in a public way. I'm not sure what I did to get the files to show up there, but the script should be modified so that the files are always stored in the admin directory where they can be protected. Also, the reference file is a php file, but if you load it in your browser, it displays the contents of the file. It may as well be a text file if you're going to do it that way... The contents of that file should probably be contained inside php tags so that the information is there, but not accessible directly from the browser.

 

It is possible I've configured my site incorrectly, so maybe this is mute point, but if not, it would be nice to figure out how to solve these issues, as the contribution could potentially make the site less secure.

Share this post


Link to post
Share on other sites

I've installed the contribution on one of my sites and overall I think it's pretty slick. However, I do have one issue. I've noticed the log file and the reference file in several places now on my server. It appears those files are generated based on where the command is run from or something. In my case, I found copies in the catalog directory, the admin directory, and the directory where my cron script is located. Having those files in the catalog directory is a problem because it exposes the full directory structure and script names of my entire site in a public way. I'm not sure what I did to get the files to show up there, but the script should be modified so that the files are always stored in the admin directory where they can be protected. Also, the reference file is a php file, but if you load it in your browser, it displays the contents of the file. It may as well be a text file if you're going to do it that way... The contents of that file should probably be contained inside php tags so that the information is there, but not accessible directly from the browser.

The output from the script is stored in the directory it is ran in, which should be admin. If you are running it from somewhere else, you will need to change the code to deal with that.

Share this post


Link to post
Share on other sites

What do you have in catalog/includes/configure.php on this line? :

define('DIR_FS_CATALOG', '/home/username/public_html/catalog/');

 

Thank you Sijo! It worked for one site, but the other I get this message!

 

Warning: opendir() [function.opendir]: open_basedir restriction in effect. File(/home/username/public_html/) is not within the allowed path(s): (/var/www/vhosts/site.nl/httpdocs:/tmp) in /var/www/vhosts/site.nl/httpdocs/catalog/inlog/includes/functions/sitemonitor_functions.php on line 419

 

Warning: opendir(/home/username/public_html/) [function.opendir]: failed to open dir: Operation not permitted in /var/www/vhosts/site.nl/httpdocs/catalog/inlog/includes/functions/sitemonitor_functions.php on line 419

 

Warning: chmod() [function.chmod]: Operation not permitted in /var/www/vhosts/site.nl/httpdocs/catalog/inlog/includes/functions/sitemonitor_functions.php on line 545

Cannot change the mode of file (/var/www/vhosts/site.nl/httpdocs/catalog/inlog/sitemonitor_configure.php)

Share this post


Link to post
Share on other sites

Thank you Sijo! It worked for one site, but the other I get this message!

 

You have to check that you have the right path in the script for this site too.

Make a file called test.php and put in this code:

<?php
echo $_SERVER['SCRIPT_FILENAME']
?>

FTP this file to your site root and execute it in your browser, e.g. :

www.yoursite.com/test.php

It will show you the path of your site..


---------------

regards

sijo

---------------

 

Contrib: JMrating10 - Rate your products / osCommerce VTS - Virus & Threat Scanner

 

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

Share this post


Link to post
Share on other sites

You have to check that you have the right path in the script for this site too.

Make a file called test.php and put in this code:

<?php
echo $_SERVER['SCRIPT_FILENAME']
?>

FTP this file to your site root and execute it in your browser, e.g. :

www.yoursite.com/test.php

It will show you the path of your site..

 

Thanks, I had the right path of my site.

 

When I open my admin I see this screen:

errorsitemonitor.png

All the fields under the red square are already filled in. Then I change it to the correct path, like you explained.

Then I get the error like my previous post.

The things I don't get are the red cirkels. Why am I logged in with c? I didn't make that login/admin?

What am I doing wrong?

Edited by abe1983

Share this post


Link to post
Share on other sites

The things I don't get are the red cirkels. Why am I logged in with c? I didn't make that login/admin?

What am I doing wrong?

 

I managed to make myself logget in as 'c' - Why?

I changed some letters in the "Start Directory" (path) configuration for Sitemonitor.

That is, you dont have the right path on that line..


---------------

regards

sijo

---------------

 

Contrib: JMrating10 - Rate your products / osCommerce VTS - Virus & Threat Scanner

 

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

Share this post


Link to post
Share on other sites

I managed to make myself logget in as 'c' - Why?

I changed some letters in the "Start Directory" (path) configuration for Sitemonitor.

That is, you dont have the right path on that line..

 

Hmm, this is strange. I am logged in as 'c' every time I log in to Configuration.

I dont know if this has been the case the whole time since I never paid attention to that..

But Sitemonitor is working ok..


---------------

regards

sijo

---------------

 

Contrib: JMrating10 - Rate your products / osCommerce VTS - Virus & Threat Scanner

 

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

Share this post


Link to post
Share on other sites

I have a problem with sitemonitor after renaming the admin directory and editing the config file as follows:-

 

define('DIR_WS_ADMIN', '/renamed_admin_directory/');

define('DIR_FS_ADMIN', '/your/path/to/directory/renamed_admin_directory/');

 

Now the Configuration Control panel does not read the data from sitemonitor_configure that was previously stored there. Or from the original file after reloading all sitemonitor files

 

Additionally when I push the 4th button in sitemonitor is gives and error message

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

 

I assume that somehow the sitemonitor files are not taking the address of the admin directory from the above two places in the renamed_admin/includes/configure.php file

 

can anyone suggest

Share this post


Link to post
Share on other sites

I have a problem with sitemonitor after renaming the admin directory and editing the config file as follows:-

 

define('DIR_WS_ADMIN', '/renamed_admin_directory/');

 

Have you set this to:

define('DIR_WS_ADMIN', '/catalog/NewAdmin/');


---------------

regards

sijo

---------------

 

Contrib: JMrating10 - Rate your products / osCommerce VTS - Virus & Threat Scanner

 

(osCommerce VTS now also checks for leading and trailing whitespace and also have a grep function)

Share this post


Link to post
Share on other sites

i have installed the newest version and everything works except the cron

i get Failed to open file sitemonitor_reference.php

also i had to change the value of log file to 0 to get the get error from filesize('sitemonitor_log.txt') stopped

any idea? i would really appreciate it

Edited by tedbooks

Share this post


Link to post
Share on other sites

i have installed the newest version and everything works except the cron

i get Failed to open file sitemonitor_reference.php

also i had to change the value of log file to 0 to get the get error from filesize('sitemonitor_log.txt') stopped

any idea? i would really appreciate it

i hate to reply to myself but i think after hours of playing with it i finally figured it out.

i had to change the paths in the sitemonitor_functions.php to full path and now it is working.

Edited by tedbooks

Share this post


Link to post
Share on other sites

Thanks for this contribution. It seems really nice. However I'm getting an error. I'm missing certain files causing issues with the installation.

 

Warning: require(includes/languages/english/version_checker.php) [function.require]: failed to open stream: No such file or directory in site.com/catalog/admin/sitemonitor_admin.php on line 19

 

Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/version_checker.php' (include_path='.:/usr/local/lib/php-5.2.12/lib/php') in site.com/catalog/admin/sitemonitor_admin.php on line 19

Share this post


Link to post
Share on other sites

Thanks for this contribution. It seems really nice. However I'm getting an error. I'm missing certain files causing issues with the installation.

 

Warning: require(includes/languages/english/version_checker.php) [function.require]: failed to open stream: No such file or directory in site.com/catalog/admin/sitemonitor_admin.php on line 19

 

Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/version_checker.php' (include_path='.:/usr/local/lib/php-5.2.12/lib/php') in site.com/catalog/admin/sitemonitor_admin.php on line 19

All of my, relatively recent, contributions use my Version Checker contribution. It allows you to quickly check for the latest version. To install it, you just download that contribution, extract the files from the included catalog directory and upload them to your server. But it is not required if you don't want to do that. SiteMonitor will run fine without it.

Edited by Jack_mcs

Share this post


Link to post
Share on other sites

All of my, relatively recent, contributions use my Version Checker contribution. It allows you to quickly check for the latest version. To install it, you just download that contribution, extract the files from the included catalog directory and upload them to your server. But it is not required if you don't want to do that. SiteMonitor will run fine without it.

 

Thanks for that. Just one thing, it says I'm banned. How do I unban myself?

 

Forbidden

You don't have permission to access /ca/admin/index.php on this server.

Edited by PowerHowzer

Share this post


Link to post
Share on other sites

Thanks for that. Just one thing, it says I'm banned. How do I unban myself?

 

Forbidden

You don't have permission to access /ca/admin/index.php on this server.

I don't understand what "it says" means but it isn't anything related to SiteMonitor (I don't think). You will need to post that question in the appropriate forum, or with your host if that is where the problem is at.

Share this post


Link to post
Share on other sites

i have an issue with my csv files from easypopulate. they show time mismatch

Time Mismatch on temp/5-esteralla.csv Last Changed on  Thursday, 01 Jan 1970 00:00:00 GMT

i have almost solved all my issues with this great contribution and would appreciate any help to solve this issue.

Share this post


Link to post
Share on other sites

i have an issue with my csv files from easypopulate. they show time mismatch

Time Mismatch on temp/5-esteralla.csv Last Changed on  Thursday, 01 Jan 1970 00:00:00 GMT

i have almost solved all my issues with this great contribution and would appreciate any help to solve this issue.

Did the time actually change? You could exclude that file by adding it to the list in the includes/functions/sitemonitor.php file.

Share this post


Link to post
Share on other sites

Did the time actually change? You could exclude that file by adding it to the list in the includes/functions/sitemonitor.php file.

thank you jack

i am not sure if it is acting correctly or not.

when i click the first update i get

Delete Reference File
Delete the reference file and create a new one. 	
58 mismatches were found. Run the script manually or see the email for the actual mismatches.

and when i immediatly click the second update. i get

Run Sitemonitor. Reference file is not deleted.     
58 mismatches were found. Run the script manually or see the email for the actual mismatches.

and i get the time mismatch email messages.

i just want to make sure it is working correctly

notice the date of the timestamp. 01 01 1970 00:00:00

Time Mismatch on temp/5-esteralla.csv Last Changed on  Thursday, 01 Jan 1970 00:00:00 GMT

it seems that the time is not being set. it looks as it is time 0

Share this post


Link to post
Share on other sites

i am not sure if it is acting correctly or not.

when i click the first update i get

Delete Reference File
Delete the reference file and create a new one. 	
58 mismatches were found. Run the script manually or see the email for the actual mismatches.

No, that's not correct. When you run it the first time, there shouldn't be any mismatches found. Try deleting the admin/sitemonitor_reference.php file and click on the top delete button again to see if it runs without mismatches showing up.

Share this post


Link to post
Share on other sites

Hello everyone,

 

I'm really sorry if this is already discussed in some of the 60-odd pages in this thread, but I really can't find the solution.

 

My issue is that when I click on the Configure button, I simply get taken to a blank page, I have now added the

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

 

That produces:

 

----

 

path /home/sites/mysite.com/public_html/admin/sitemonitor_configure.php

/

 

---------

 

Also, (and this may be unrelated), when I recieve the email, I get a list of all the files on my server (I assume, I haven't counted), and at the bottom, it says:

DELETED FILES:

Found a deleted file named

 

SIZE MISMATCH:

Size differences not checked due to deleted file(s)

 

TIME MISMATCH:

Time differences not checked due to deleted file(s)

 

PERMISSIONS MISMATCH:

Permissions not checked due to deleted file(s)

 

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

Sitemonitor ran on September 28, 2010, 1:58 pm

Total mismatches found were 3325

Total files being monitored is 1

 

------------

 

Any reason it doesn't tell me which file is deleted, and how can I stop it displaying the entire list of files?

 

Thanks alot in advance for any help!

Edited by Rubin Remus

Share this post


Link to post
Share on other sites

My issue is that when I click on the Configure button, I simply get taken to a blank page, I have now added the

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

 

Any reason it doesn't tell me which file is deleted, and how can I stop it displaying the entire list of files?

It might be timing out on you when you go to the configure file due to it trying to read in a large number of files and the limits of your server. Try editing the admin/sitemonitor_configure.php file and adding the images and includes directories to the exclude list. If the configure section in admin then loads, you can adjust the excluded directories until it works.

 

If the script doesn't complete correctly, you can't count on its results so get the configure problem fixed first.

Share this post


Link to post
Share on other sites

Jack, here's an update on my attempt to update my SiteMonitor.

 

I have two shops, I just moved one of them to a different host. On that new host, updating from 2.4 to 2.6 was a snap. Absolutely no problem.

So to test, I tried again to update from 2.4 on the previous host and the same error, unknown user, occurs.

 

Given my limited background with the technical side of what's going on with web hosts, here's my preliminary observations.

 

There's something in the web host that effects the upgrade of SiteMonitor. Some host setting/configuration or whatever.

 

One observable to me is that the start directory on the host that won't allow me to upgrade is much longer than that on my new host.

 

Problem host start directory: /home/users/web/a1232/myuserid/public_html/

 

New host start directory: /home/myuserid/public_html/

 

Anyway, I thought I'd toss this out there in case it helps anyone.

 

Thanks

Edited by altoid

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.

Share this post


Link to post
Share on other sites

Jack, here's an update on my attempt to update my SiteMonitor.

My guess is that it has to do with permissions or some other server setting that is preventing the script from working correctly. If both hosts use a php.ini file, try comparing the two to see what differences there might be.

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

×