Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SiteMonitor


Jack_mcs

Recommended Posts

Notice: Undefined variable: currentVersion in /home/user/public_html/catalog/AdminPanel/sitemonitor_admin.php on line 234

 

any ideas. im running v2.3

Try placing this line

$currentVersion = '';

after

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

Installing the Version Checker contribution should fix it too.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack,

 

I have installed the 2.3 version and now receive this error when trying to configure it in admin:

 

Cannot change the mode of file (/home/xxxxxx/www/admin/sitemonitor_configure_0.php)

 

The screen refreshes, but the changes are not saved and I can not click the ADMIN link to try to run it so I assume it did not save the configuration.

 

Any suggestions ?

 

 

Chris

Link to comment
Share on other sites

Great working addon, easy to install!

however I also had this problem:

 

Notice: Undefined variable: currentVersion in /home/user/public_html/catalog/AdminPanel/sitemonitor_admin.php on line 234

 

So I did what you said, and then I got this error in the left table:

 

Notice: Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' in /customers/cosplaydreams.nl/cosplaydreams.nl/httpd.www/catalog/admin/includes/functions/html_output.php on line 23 Notice: Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' in /customers/cosplaydreams.nl/cosplaydreams.nl/httpd.www/catalog/admin/includes/functions/html_output.php on line 23

 

any ideas?

 

Thanks

Link to comment
Share on other sites

I have installed the 2.3 version and now receive this error when trying to configure it in admin:

 

Cannot change the mode of file (/home/xxxxxx/www/admin/sitemonitor_configure_0.php)

 

The screen refreshes, but the changes are not saved and I can not click the ADMIN link to try to run it so I assume it did not save the configuration.

The code is detecting that the sitemonitor_configure_0.php is not writeable and is trying to change the permissions to make it writeable but your server is not allowing that change. You can change the permissions manually (666 or above) and it might work but I suspect you'll run into problems when the reference file has to be created or the log file changed. You may need to ask your host to change the user setting so that those changes can be made.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Notice: Undefined variable: currentVersion in /home/user/public_html/catalog/AdminPanel/sitemonitor_admin.php on line 234

 

So I did what you said, and then I got this error in the left table:

 

Notice: Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' in /customers/cosplaydreams.nl/cosplaydreams.nl/httpd.www/catalog/admin/includes/functions/html_output.php on line 23 Notice: Use of undefined constant ENABLE_SSL - assumed 'ENABLE_SSL' in /customers/cosplaydreams.nl/cosplaydreams.nl/httpd.www/catalog/admin/includes/functions/html_output.php on line 23

See the change for that mentioned previously.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack,

 

Thanks for the quick response. I tried changing sitemonitor_configure_0.php to 666, 755, 775 without success, when I changed it to 777 it worked. I know, 777 is BAD but it won't let me go any lower. I am also getting this warning now:

 

WARNING: Your images directory contains .php files but it should not.

 

 

I triple checked the /images and admin/images (just in case) and there are NO .php files, however there are an assortment of other files such as .gif, .jpg, .png, .tif

 

Do you have a solution for the sitemonitor_configure_0.php write problem ? I can not leave the permissions at 777.

 

 

 

Chris

Link to comment
Share on other sites

Hi Jack,

 

Thanks for the quick response. I tried changing sitemonitor_configure_0.php to 666, 755, 775 without success, when I changed it to 777 it worked. I know, 777 is BAD but it won't let me go any lower. I am also getting this warning now:

 

WARNING: Your images directory contains .php files but it should not.

 

 

I triple checked the /images and admin/images (just in case) and there are NO .php files, however there are an assortment of other files such as .gif, .jpg, .png, .tif

 

Do you have a solution for the sitemonitor_configure_0.php write problem ? I can not leave the permissions at 777.

For the permissions problem, you can try deleting this code from sitemonitor_function.php. It might not be needed if your files are really writeable. if they are not, then the code will fail while trying to write to the file.

    if ($fileFound && !is_writable($filename)) {
       if (!chmod($filename, 0666)) {
           echo "Cannot change the mode of file ($filename)";
           return false;
       }
   }

 

For the images problem, find this line

  /********************** END CHECK THE USERNAME *********************/

and add this after it

  ?> <pre> <?php
print_r(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'));
?> </pre> <?php

echo 'cnt = '.count(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'));

Then try refreshing the page. You should not get any files listed and the cnt should be 0. If you have a file listed, then that is the problem. If there are no files listed and the cnt is greater than 0, then it must be something related to your servers version of the glob function. In that case, what is the version? Is this a Windows server?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Jack, when i run the sitemonitor it keeps telling me i have mismatches is this normal? cause everytime it sees this it will send me an email.... :(

 

Found a new file named AdminPanel/sitemonitor_reference_0.php

No deleted files found...

Difference found: New-> AdminPanel/sitemonitor_log_0.txt 111260 Original-> 111004

Difference found: New-> AdminPanel/sitemonitor_log_011_01_2011.txt 111260 Original-> 111004

Time Mismatch on AdminPanel/sitemonitor_log_0.txt Last Changed on Tuesday, 11 Jan 2011 23:59:06 GMT

Time Mismatch on AdminPanel/sitemonitor_log_011_01_2011.txt Last Changed on Wednesday, 12 Jan 2011 00:02:43 GMT

Link to comment
Share on other sites

Jack, when i run the sitemonitor it keeps telling me i have mismatches is this normal? cause everytime it sees this it will send me an email.... :(

 

Found a new file named AdminPanel/sitemonitor_reference_0.php

No deleted files found...

Difference found: New-> AdminPanel/sitemonitor_log_0.txt 111260 Original-> 111004

Difference found: New-> AdminPanel/sitemonitor_log_011_01_2011.txt 111260 Original-> 111004

Time Mismatch on AdminPanel/sitemonitor_log_0.txt Last Changed on Tuesday, 11 Jan 2011 23:59:06 GMT

Time Mismatch on AdminPanel/sitemonitor_log_011_01_2011.txt Last Changed on Wednesday, 12 Jan 2011 00:02:43 GMT

No, it's not normal. In previous versions, those files were excluded from checking since they are part of the contribution. That code is still in place to do that but I forgot to convert it to work with the new multi-instance ooption. To get around it until I can fix that, find this code in admin/includes/functions/sitemonitor_functions.php

                        (strcmp($file, "sitemonitor.php") == 0) ||                 //exclude all sitemonitor files by name so that files named like sitemonitor_hack.php are not ignored
                       (strcmp($file, "sitemonitor_admin.php") == 0) ||
                       (strcmp($file, "sitemonitor_configure.php") == 0) ||
                       (strcmp($file, "sitemonitor_configure_setup.php") == 0) ||
                       (strcmp($file, "sitemonitor_functions.php") == 0) ||
                       (strcmp($file, "sitemonitor_log.txt") == 0) ||
                       (strcmp($file, "sitemonitor_reference_1.php") == 0) ||

and change the names to include _0, like

                        (strcmp($file, "sitemonitor.php") == 0) ||                 //exclude all sitemonitor files by name so that files named like sitemonitor_hack.php are not ignored
                       (strcmp($file, "sitemonitor_admin.php") == 0) ||
                       (strcmp($file, "sitemonitor_configure_0.php") == 0) ||
                       (strcmp($file, "sitemonitor_configure_setup.php") == 0) ||
                       (strcmp($file, "sitemonitor_functions.php") == 0) ||
                       (strcmp($file, "sitemonitor_log_0.txt") == 0) ||
                       (strcmp($file, "sitemonitor_reference_0.php") == 0) ||

If you use more than once instance, you will need to duplciate the lines and change the number.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

No, it's not normal. In previous versions, those files were excluded from checking since they are part of the contribution. That code is still in place to do that but I forgot to convert it to work with the new multi-instance ooption. To get around it until I can fix that, find this code in admin/includes/functions/sitemonitor_functions.php

                        (strcmp($file, "sitemonitor.php") == 0) ||             	//exclude all sitemonitor files by name so that files named like sitemonitor_hack.php are not ignored
                       (strcmp($file, "sitemonitor_admin.php") == 0) ||
                       (strcmp($file, "sitemonitor_configure.php") == 0) ||
                       (strcmp($file, "sitemonitor_configure_setup.php") == 0) ||
                       (strcmp($file, "sitemonitor_functions.php") == 0) ||
                       (strcmp($file, "sitemonitor_log.txt") == 0) ||
                       (strcmp($file, "sitemonitor_reference_1.php") == 0) ||

and change the names to include _0, like

                        (strcmp($file, "sitemonitor.php") == 0) ||             	//exclude all sitemonitor files by name so that files named like sitemonitor_hack.php are not ignored
                       (strcmp($file, "sitemonitor_admin.php") == 0) ||
                       (strcmp($file, "sitemonitor_configure_0.php") == 0) ||
                       (strcmp($file, "sitemonitor_configure_setup.php") == 0) ||
                       (strcmp($file, "sitemonitor_functions.php") == 0) ||
                       (strcmp($file, "sitemonitor_log_0.txt") == 0) ||
                       (strcmp($file, "sitemonitor_reference_0.php") == 0) ||

If you use more than once instance, you will need to duplciate the lines and change the number.

 

Yes that worked perfectly for the listed files, however its still picking up time stamp mismatches on the sitemonitor_log_011_01_2011.txt.

If I add this file to the list it looks like it will work for today, but not tomarrow when the file changes name when script is ran again.

is there a way to add wildcards in the file? like sitemonitor_log_***_**_20**.txt will this work?

Link to comment
Share on other sites

For the images problem, find this line

 

/********************** END CHECK THE USERNAME *********************/

 

and add this after it

 

?> <pre> <?php

print_r(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'));

?> </pre> <?php

 

echo 'cnt = '.count(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'));

 

Then try refreshing the page. You should not get any files listed and the cnt should be 0. If you have a file listed, then that is the problem. If there are no files listed and the cnt is greater than 0, then it must be something related to your servers version of the glob function. In that case, what is the version? Is this a Windows server?

 

Ok, it came back as cnt = 1 with no files listed. I am not sure where I would find the glob version for this the server info:

 

Server OS: Linux Database: MySQL 5.0.77-log

Server Date: 2011-01-11 23:12:30 -0800 PST Database Date: 2011-01-11 23:12:30

Server Up Time:

HTTP Server: Apache

PHP Version: 5.2.10 (Zend: 2.2.0)

 

 

Any further suggestions would be appreciated.

 

 

Chris

Link to comment
Share on other sites

Yes that worked perfectly for the listed files, however its still picking up time stamp mismatches on the sitemonitor_log_011_01_2011.txt.

If I add this file to the list it looks like it will work for today, but not tomarrow when the file changes name when script is ran again.

is there a way to add wildcards in the file? like sitemonitor_log_***_**_20**.txt will this work?

You could change the line

  (strcmp($file, "sitemonitor_log_0.txt") == 0) || 

to something like

  (strpos($file, "sitemonitor_log_") !== FALSE && strpos($file, ".txt") !== FALSE) || 

That allows a little room for the hackers to upload a file with a similar name but I doubt they would bother. They would first have to be able to insert files into admin and then have a way to access the file since it would just be a .txt file. If they can do that, they would do more than just change a sitemonitor file, which may not be present in the first place. I'll think more on it but I think the above is the way to go.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Ok, it came back as cnt = 1 with no files listed. I am not sure where I would find the glob version for this the server info:

 

Any further suggestions would be appreciated.

There is a not in the glob manual that says some systems can't distinguish the return as empty so in sitemonitor_admin.php, try changing

  if (count(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'))) {

to

  if (tep_not_null(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'))) {

If that doesn't work, you could test if the count is correct is you add a .php file to the images directory (should be 2 in your case) and if it is, change the code to

  if (count(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php')) > 1) {

That's not a good solution since it will fail the next time the file is replaced but it is a temporary fix.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I am very excited to use this contrib! Thanks for all you do!

 

I have just installed SiteMonitor 2.8 on my OSC RC2. I know it's brand new and just came out 4 days ago, so maybe that's my problem.

 

I installed/updated files according to the readme instructions without any trouble. But when I come to Configuration I have a glitch.

I can't seem to keep my Start Directory intact. It keeps chopping off the last letter.

 

when I put in /home/users/web/b2716/moo.xxxxxxxxx/apt// I then update the page and I get this error:

 

Warning: opendir(/home/users/web/b2716/moo.xxxxxxxxx/ap/) [function.opendir]: failed to open dir: No such file or directory in /hermes/web06/b2716/moo.xxxxxxxxx/apt/admin/includes/functions/sitemonitor_functions.php on line 425

 

See how it chops off the t in opendir? it should be apt/ not ap/

 

And yes, I have checked and rechecked to make sure that the file is indeed there.!

 

And it has to be that as the Start Directory, because if I put anything else in there I get a popup saying

 

Setup Error!!! The start directory:

 

me/users/web/b2716/moo.xxxxxxxx/apt//

 

does not match the shops directory:

 

/home/users/web/b2716/moo.xxxxxxxxx/apt//

 

I am just stuck.... at first I thought it was just too long so I look throught the code and found that the maxlength is 250. So I just dont know what to do!

 

Thanks for your help!!

Jen

Link to comment
Share on other sites

Hi trying to install SiteMonitor

 

I am using oscommerce-2.3.1, but when I use your 2.3 version, I have no Site Monitor area in admin

 

The readme explains Add the following to admin/includes/column_left.php

If your shop is AFTER version 2.3, add this before the first ?>

include(DIR_WS_BOXES . 'sitemonitor.php');

 

there is only one ?> and I add it before that but nothing shows in admin with sitemonitor folder 2.3

 

but when I install your version for oscommerce_MS2_or_RC2 I get that admin area with all configurations

When I run, Manually Check for Hacked Files

 

I receive

Warning: array_flip() [function.array-flip]: Can only flip STRING and INTEGER values! in...

 

also I get that image warning as mentioned earlier

WARNING: Your images directory contains .php files but it should not.//top of page pink warning

 

I have checked all images folder's and there are no php files in them

I read your earlier reply to do this

 

 ?> <pre> <?php
print_r(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'));
?> </pre> <?php

echo 'cnt = '.count(glob(DIR_FS_CATALOG . DIR_WS_IMAGES . '*.php'));

 

But won't this exclude checking for real php files as well that could really be in there one day?

 

any help would be great I'm stumped

Thanks

PF

Link to comment
Share on other sites

I am very excited to use this contrib! Thanks for all you do!

 

I have just installed SiteMonitor 2.8 on my OSC RC2. I know it's brand new and just came out 4 days ago, so maybe that's my problem.

 

I installed/updated files according to the readme instructions without any trouble. But when I come to Configuration I have a glitch.

I can't seem to keep my Start Directory intact. It keeps chopping off the last letter.

 

when I put in /home/users/web/b2716/moo.xxxxxxxxx/apt// I then update the page and I get this error:

The double slashes are causing a problem. I don't know why you would intentionally add an extra slash but you shouldn't.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi trying to install SiteMonitor

 

I am using oscommerce-2.3.1, but when I use your 2.3 version, I have no Site Monitor area in admin

 

The readme explains Add the following to admin/includes/column_left.php

If your shop is AFTER version 2.3, add this before the first ?>

include(DIR_WS_BOXES . 'sitemonitor.php');

 

there is only one ?> and I add it before that but nothing shows in admin with sitemonitor folder 2.3

Then you have a corrupted or altered column_left.php file. I just looked at the one included in the oscommerce package and there are four of them.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Hi Jack,

 

I'm running Version 1.7 and my Cron results differ from the results I receive when I manually run the script. Any reason why this would be occurring?

No idea. I don't have a shop setup with such an old version in it so I've no way to test it.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Then you have a corrupted or altered column_left.php file. I just looked at the one included in the oscommerce package and there are four of them.

 

Hi, thanks, that was odd

went and downloaded again compared mine from a few days ago

and the new one and that was the only difference between the zips

 

any input on the few other questions in that post?

and this error during cron and when I run manually as well

Warning</b>: array_flip() [<a href='function.array-flip'>function.array-flip</a>]: The argument should be an array in.../sitemonitor_hacker_cron.php

 

and that image folder error I get about php files being inside, I did a ext search and none came up

 

Thanks

PF

Link to comment
Share on other sites

any input on the few other questions in that post?

and this error during cron and when I run manually as well

Warning</b>: array_flip() [<a href='function.array-flip'>function.array-flip</a>]: The argument should be an array in.../sitemonitor_hacker_cron.php

Please provide file names and line numbers when asking about a problem.

and that image folder error I get about php files being inside, I did a ext search and none came up

You could try the code change already mentioned.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Great addon first of all.

 

However after this latest update, I got a strange behavior. I've set the To and From email correctly in the configuration file. But when the site monitor is run, the email will go to the correct To address, but it's coming From a different address. It is coming from an email address that I use for Another Domain. How strange.

 

Any idea how this is happening? Thanks so much!!

Link to comment
Share on other sites

Great addon first of all.

 

However after this latest update, I got a strange behavior. I've set the To and From email correctly in the configuration file. But when the site monitor is run, the email will go to the correct To address, but it's coming From a different address. It is coming from an email address that I use for Another Domain. How strange.

 

Any idea how this is happening? Thanks so much!!

Nothing was changed regarding the emails. Whatever email address is set in the setting is the one that is used. All I can suggest is that you be sure you are looking at the correct instance. That is, if you have two instances setup and they have different email addresses, you may be running the wrong one.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The double slashes are causing a problem. I don't know why you would intentionally add an extra slash but you shouldn't.

 

I know it's odd, but we are hosting another site on ours and that is how our provider set it up.

 

Is there something I can try to tell it not to delete it?

 

Thanks for your help on a great contrib!

Jen

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...