Jump to content
Jack_mcs

SiteMonitor

Recommended Posts

Yes, you need to be logged in to admin to perform any function in it. You could try removing require('includes/application_top.php'); from the sitemonitor.php file. It is no longer needed and should not have been left in there.

 

Jack

Share this post


Link to post
Share on other sites
Yes, you need to be logged in to admin to perform any function in it. You could try removing require('includes/application_top.php'); from the sitemonitor.php file. It is no longer needed and should not have been left in there.

 

Jack

Ok Removing that looks like it's working now, Thanks but I get the Maximum execution time of 30 seconds exceeded in /home/username/public_html/catalog/admin/includes/functions/sitemonitor_functions.php on line 154

 

Is there a way in increase the Timeout?

Never mind I see on page 2 you spoke about the Timeout Thanks for your help.

Edited by tegralens

Share this post


Link to post
Share on other sites
Yes, you need to be logged in to admin to perform any function in it. You could try removing require('includes/application_top.php'); from the sitemonitor.php file. It is no longer needed and should not have been left in there.

 

Jack

Is there a way to add this to somewhere for the Time Out issue.

Support told me that the Time Out can Be changed Per Script see their comment Below

 

Yes, it can be changed per script:

 

set_time_limit(seconds) - Resets the counter to 0 and then sets the max time limit to seconds.

or

init_set('max_execution_time', seconds) - simply sets the maximum execution time.

 

You may also want to use

sleep(seconds) - to yield time to other scripts so that you don't use too many resources at one time.

Share this post


Link to post
Share on other sites

You can try placing

set_time_limit(0);

anywhere in the code. Probably in sitemonitor.php before the runSiteMonitor line. It won't work on all servers but if your host said it would on theirs, it is worth trying.

 

Jack

Share this post


Link to post
Share on other sites
OK, I think I have it working now. I had to use Control Panel to CHMOD the configuration file to get it to take the changes I made, then everything started to work.

 

Hi,

 

Could you elaborate on this? I am getting an error message after trying your previous modification. Before that, these are the problems I had:

 

If I clicked on Delete Reference File from the admin area, I'd get this message:

 

Warning: opendir() [function.opendir]: open_basedir restriction in effect. File(/home/username/public_html) is not within the allowed path(s): (/home/username/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/admin/includes/functions/sitemonitor_functions.php on line 56

 

Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: Operation not permitted in /home/username/public_html/admin/includes/functions/sitemonitor_functions.php on line 56

 

Warning: readdir(): supplied argument is not a valid Directory resource in /home/username/public_html/admin/includes/functions/sitemonitor_functions.php on line 58

Reference file creation failed.

 

When I tried to set up the Configuration in the admin area, I'd get this error:

 

 

Warning: chmod() [function.chmod]: Operation not permitted in /home/username/public_html/admin/includes/functions/sitemonitor_functions.php on line 195

Cannot change the mode of file (/home/username/public_html/admin/sitemonitor_configure.php)

 

Any ideas/suggestions about what I am doing wrong here?

 

Thanks!

 

jailaxmi


I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Share this post


Link to post
Share on other sites

I just uploaded a new version. It just removes the loading of application_top.php and also fixes the code that removal will cause. To update, just replace the sitemonitor.php and includes/functions/sitemonitor.php file.

 

I also added the set_time_limit call but that will need to be removed for any site on a server runing in safe mode.

 

Jack

Share this post


Link to post
Share on other sites
I just uploaded a new version. It just removes the loading of application_top.php and also fixes the code that removal will cause. To update, just replace the sitemonitor.php and includes/functions/sitemonitor.php file.

 

I also added the set_time_limit call but that will need to be removed for any site on a server runing in safe mode.

 

Jack

Thanks. I uploaded the new version and when I tried to set up the configuration I got this error:

Warning: chmod() [function.chmod]: Operation not permitted in /home/username/public_html/admin/includes/functions/sitemonitor_functions.php on line 196

Cannot change the mode of file (/home/username/public_html/admin/sitemonitor_configure.php)

 

And again, when deleting the reference file I get:

 

Warning: opendir() [function.opendir]: open_basedir restriction in effect. File(/home/username/public_html) is not within the allowed path(s): (/home/username/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/username/public_html/admin/includes/functions/sitemonitor_functions.php on line 56

 

Warning: opendir(/home/username/public_html) [function.opendir]: failed to open dir: Operation not permitted in /home/username/public_html/admin/includes/functions/sitemonitor_functions.php on line 56

 

Warning: readdir(): supplied argument is not a valid Directory resource in /home/username/public_html/admin/includes/functions/sitemonitor_functions.php on line 58

Reference file creation failed.

 

Do I need to change permissions somewhere? Or what I am doing wrong here?

 

Thanks for any help!

 

jailaxmi


I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Share this post


Link to post
Share on other sites

Those are server related problems. You will need to ask your host to see if they will assist you with them.

 

Jack

Share this post


Link to post
Share on other sites
Those are server related problems. You will need to ask your host to see if they will assist you with them.

 

Jack

Thanks! I'll check with them, but if anyone else comes up with a solution, please let me know! My host usually says it's a script error whenever I bring these kinds of issues up... :(

 

jailaxmi


I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Share this post


Link to post
Share on other sites
Those are server related problems. You will need to ask your host to see if they will assist you with them.

 

Jack

 

 

Actually, the problem would be with the code in that you're probably referencing full paths for files instead of setting the PHP path enviroment variable and using relative paths, which is a shared server safe solution. I could be wrong, though.

 

Great idea, for a contrib! I just noticed it in the RSS list of new/updated contribs and now am just dinking around the code seeing how it all works. You've written some really clean, quality code -- reads like a good novel. :)


Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Share this post


Link to post
Share on other sites
You can try placing
set_time_limit(0);

anywhere in the code. Probably in sitemonitor.php before the runSiteMonitor line. It won't work on all servers but if your host said it would on theirs, it is worth trying.

 

Jack

Thanks Jack That worked Perfectly Everything is fine Now thanks again and Great Contrib!

Share this post


Link to post
Share on other sites

No, you don't have to do that. The file structure changed in the last version so you have to upload all of the files included in the contribution. Just follow the install instructions. You will also need to delete your existing reference file.

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack,

Can I ask in what directory the file is meant to be written to?

 

 

Warning: fopen(sitemonitor_reference.php) [function.fopen]: failed to open stream: Permission denied in /home/pathtomyshop/admin/includes/functions/sitemonitor_functions.php on line 171

Failed to open file sitemonitor_reference.php

 

This is when I clicked the top button.

Thanks in advance!

Share this post


Link to post
Share on other sites
Actually, the problem would be with the code in that you're probably referencing full paths for files instead of setting the PHP path enviroment variable and using relative paths, which is a shared server safe solution. I could be wrong, though.

 

Great idea, for a contrib! I just noticed it in the RSS list of new/updated contribs and now am just dinking around the code seeing how it all works. You've written some really clean, quality code -- reads like a good novel. :)

Hey Brian,

 

Could you elaborate a bit more on this? Which files should I check for this?

 

Thanks!

 

jailaxmi


I repeat myself when under stress, I repeat myself when under stress, I repeat myself...

 

--King Crimson (“Discipline”)

Share this post


Link to post
Share on other sites
It gets written to the admin directory.

 

Jack

Thanks Jack!

So I presume the admin directory needed write capabilities so CHMODed the directory for 777 for now and it all worked :)

Is that safe to have the directory at 777?

Share this post


Link to post
Share on other sites

As long as it is password protected it shouldn't be a problem although it shouldn't be necessary. Try running it so that the reference file is created. Chmod the reference file to 777 (if that is what your host requires) and chmod the admin directory back to 644. That might work for you.

 

Jack

Share this post


Link to post
Share on other sites
As long as it is password protected it shouldn't be a problem although it shouldn't be necessary. Try running it so that the reference file is created. Chmod the reference file to 777 (if that is what your host requires) and chmod the admin directory back to 644. That might work for you.

 

Jack

Thanks for the info Jack! :)

Share this post


Link to post
Share on other sites

A new version has been uploaded. It has these changes:

 

- Added logfile size option. File will be saved and replaced once a preset limit is reached.

- Added Quarantine option for new files. If set, new files will be moved to the quarantine directory. This can cause trouble if you add new files to your shop intentionally and forget to create a new reference file.

- Fixed bug in exclude list checking that would cause it to fail at times.

 

Jack

Share this post


Link to post
Share on other sites
A new version has been uploaded. It has these changes:

 

- Added logfile size option. File will be saved and replaced once a preset limit is reached.

- Added Quarantine option for new files. If set, new files will be moved to the quarantine directory. This can cause trouble if you add new files to your shop intentionally and forget to create a new reference file.

- Fixed bug in exclude list checking that would cause it to fail at times.

 

Jack

What permissions should be set for the quarantine directory?

Share this post


Link to post
Share on other sites

I think this is a great contrib and I thank very much the developer.

I have installed the latest version from January 7. But I think there must be some bug introduced with the exclude list.

Now it does not exclude anything at all, put into list.

 

Any help please?

Share this post


Link to post
Share on other sites

No one has a reported a problem and it is working here. Take a look at the admin/sitemonitor_config.php file. Are the items you want to exclude listed in there?

 

Jack

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

×