DesComm Posted July 22, 2018 Report Share Posted July 22, 2018 When the CRON job runs the following error happens: A non well formed numeric value encountered in ..........VMS/core/common/StatsData.class.php on line 171 It continues running and does the following" Reset PIREP Counts Updating Total Hours Count (question is always shows "found 1 flight hours for number" regardless of number of hours a pilot has - is this correct?) Now counting from PIREPS - Found 125774:08:00 total hours, updated Any fixes for the error? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 23, 2018 Administrators Report Share Posted July 23, 2018 What is that line? Quote Link to comment Share on other sites More sharing options...
DesComm Posted July 23, 2018 Author Report Share Posted July 23, 2018 167 * Get all of the months since a certain date 168 */ 169 public static function getMonthsSinceDate($start) { 170 171 $key_month = date('MY', $start); 172 $key = 'months_since_' . $key_month; 173 $months = CodonCache::read($key); Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted July 29, 2018 Administrators Report Share Posted July 29, 2018 I guess the start date is coming messed up... maybe add an echo $start; above that line and see what happens Quote Link to comment Share on other sites More sharing options...
DesComm Posted August 10, 2018 Author Report Share Posted August 10, 2018 I added that line "echo $start; on line 170 and the result is the same. A non well formed numeric value encountered in ..........VMS/core/common/StatsData.class.php on line 171 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted August 11, 2018 Administrators Report Share Posted August 11, 2018 Right but did it output anything? Quote Link to comment Share on other sites More sharing options...
DesComm Posted August 11, 2018 Author Report Share Posted August 11, 2018 20 minutes ago, Nabeel said: Right but did it output anything? See the Pm I send you with the full message. Also how do I contact you on Discort just installed it? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted August 12, 2018 Administrators Report Share Posted August 12, 2018 It's best to keep it here in case it helps anyone else. Was there an output from the $start? What if you run the script "by hand" on the command line? Quote Link to comment Share on other sites More sharing options...
DesComm Posted August 12, 2018 Author Report Share Posted August 12, 2018 1 hour ago, Nabeel said: It's best to keep it here in case it helps anyone else. Was there an output from the $start? What if you run the script "by hand" on the command line? Output is the same with and w/o $start When run manually here is what shows: in /var/www/vhosts/,,,,,,.com/test.,,,,,,,.com/core/common/StatsData.class.php on line 171 Reset PIREP Counts - list of pilots Updating Total Hours Count - calculating hours this OK Now counting from PIREPS - OK Found 127473:46:00 total hours, updated When CRON is run this is the message that system sends: Notice: A non well formed numeric value encountered in /var/www/vhosts/,,,,,,.com/test.,,,,,,,.com/core/common/StatsData.class.php on line 171 <div id="codon_crit_error" style="font-family: 'Lucida Sans',Verdana;border:#999 1px solid;background-color:#fff;padding:20px 20px 12px 20px;"> <h1 style="font-family: verdana; font-weight:16px;font-size:18px;color:#6B001B;margin:0 0 4px 0;">An Error Was Encountered</h1> <p style="font-size: 16px; color: #001B6B">Unauthorized access - Invalid Permissions.</p> <p style="font-size: 10px;"><center><a href="http://test.,,,,,,,,.com">Return to Homepage</a></p> </div> Quote Link to comment Share on other sites More sharing options...
DesComm Posted August 18, 2018 Author Report Share Posted August 18, 2018 Bump 1 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted August 20, 2018 Administrators Report Share Posted August 20, 2018 Ok, so it's not passing in the start date. Find out where that's being called from and see if you can trace the call from there. Also, it's a notice error, so you can probably just hide it. Does the thing you're trying to do actually work, though? There's also this... <p style="font-size: 16px; color: #001B6B">Unauthorized access - Invalid Permissions.</p> Check the permissions of your files Quote Link to comment Share on other sites More sharing options...
DesComm Posted August 21, 2018 Author Report Share Posted August 21, 2018 This from the original file StatsData.Class.php Here is the section w/ Line 171 /** * Get all of the months since a certain date */ public static function getMonthsSinceDate($start) { $key_month = date('MY', $start); (note this is Line 171) $key = 'months_since_' . $key_month; $months = CodonCache::read($key); if ($months === false) { if (!is_numeric($start)) { $start = strtotime($start); } $end = date('Ym'); do { # Get the months $month = date('M Y', $start); $months[$month] = $start; # Set the timestamp $start = strtotime('+1 month +1 day', strtotime($month)); # Convert to YYYYMM to compare $check = intval(date('Ym', $start)); } while ($check <= $end); CodonCache::write($key, $months, 'long'); } return $months; } /** Quote Link to comment Share on other sites More sharing options...
DesComm Posted August 27, 2018 Author Report Share Posted August 27, 2018 BUMP Quote Link to comment Share on other sites More sharing options...
thunder175 Posted November 6, 2018 Report Share Posted November 6, 2018 I've recently been hitting this exact problem as well. Was there a solution found? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.