Jump to content
Latest News: (loading..)
Jack_mcs

SiteMonitor

Recommended Posts

Those are correct. The $excludeList includes directories you don't want to search. So if you wanted to skip the pub directory, you would change it to

$excludeList = array('cgi-bin','pub');
Edited by Jack_mcs

Share this post


Link to post
Share on other sites

My problem with PHP Warning:  opendir(/home/username/public_html): failed to open dir: No such file or directory in /home/*****/public_html/*********/includes/functions/sitemonitor_functions.php on line 364 which we discussed in September is still there but Site Monitor works correctly including the daily cron job that is run.

Today, for the first time, this has appeared in the admin error log as a result of the cron job.

[02-Nov-2018 06:00:02 UTC] PHP Notice:  Undefined variable: verbose in /home/****/public_html/*****/includes/functions/sitemonitor_functions.php on line 301

Line 301 is

DisplayMessage($verbose, 'Deleted log file due to age - ' . $file);

Frozen  PHP 7.2


OsC 2.3.4.1 CE Frozen   PHP 7.2   MySQL 10.1.36-MariaDB-cll-lve

Share this post


Link to post
Share on other sites
5 hours ago, mhsuffolk said:

Notice:  Undefined variable: verbose

That is saying the variable is used without being declared first. But the verbose variable should be seen by all parts of the code since it is read in from the configure file. I don't have a shop setup on 7.2 using this addon so I can't check it to see why it is doing it. But the following change may work. At line 217 in the functions file, change this

global $logfile, $logfile_delete, $logfile_location;

to this

global $logfile, $logfile_delete, $logfile_location, $verbose;

 

Share this post


Link to post
Share on other sites

Thanks for that. It is interesting that the server can access sitemonitor_functions.php  when running the cron job but I still cannot access it through admin. On my test xampp set up I can access sitemonitor_functions.php so it must be a server issue and not PHP 7.2.

As I cannot emulate it on my xampp I will have to test this using the cron job. I have amended sitemonitor_configure.txt to renew the log after 1 day and will wait until tomorrow or Sunday morning and see if the error is repeated. Then I will apply your change to see if it disappears.

PS. If you want something tested under 7.2 please PM me.

Martin


OsC 2.3.4.1 CE Frozen   PHP 7.2   MySQL 10.1.36-MariaDB-cll-lve

Share this post


Link to post
Share on other sites

Update to verbose .

Have made your suggested change and all appears OK now.


OsC 2.3.4.1 CE Frozen   PHP 7.2   MySQL 10.1.36-MariaDB-cll-lve

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

×