riko Posted September 16, 2022 Posted September 16, 2022 I've got 4 renewal  notices now in less the 24 hours spamming my inbox. My next renewal tough is 12-04-22. That is a little bit less then 4 month's from now. What's up with this?🤔
Marc Posted September 16, 2022 Posted September 16, 2022 We are aware of the duplicate emails and some issues with when these are sent, and we are looking into this. We hope you have this resolved as soon as possible
Sebastian Darowski Posted September 16, 2022 Posted September 16, 2022 Hey, I already was looking for a thread like this... yesterday I got like 200 mails in 2 hours and it's already 100 in the past 30 minutes. Would be happy to have this fixed. 🙂 Should note that I'm still on-prem. Kind regards SeNioR- 1
Sebastian Darowski Posted September 16, 2022 Posted September 16, 2022 I added some debug code to the init.php... [Fri Sep 16 11:15:58 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: -187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:15:58 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:00 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:01 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:02 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:02 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57', referer https://forum.carnivoren.org/forums/forum/59-nepenthes/page/14/ [Fri Sep 16 11:16:03 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:06 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:06 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:09 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57', referer https://forum.carnivoren.org/forums/forum/56-drosera/page/49 [Fri Sep 16 11:16:11 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:16 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57', referer https://forum.carnivoren.org/forums/forum/89-natur/page/37 [Fri Sep 16 11:16:21 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57', referer https://www.google.com/ [Fri Sep 16 11:16:22 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57', referer https://forum.carnivoren.org/calendar/1-kalender/2018/6/7 Really? What's wrong with this line: $daysLeft = (int) (new \IPS\DateTime)->diff( \IPS\DateTime::ts( strtotime( $response['expires'] ) ) )->format('%r%a');
Management Matt Posted September 16, 2022 Management Posted September 16, 2022 4 minutes ago, Sebastian Darowski said: I added some debug code to the init.php... [Fri Sep 16 11:15:58 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: -187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:15:58 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:00 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:01 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:02 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:02 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57', referer https://forum.carnivoren.org/forums/forum/59-nepenthes/page/14/ [Fri Sep 16 11:16:03 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:06 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:06 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:09 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57', referer https://forum.carnivoren.org/forums/forum/56-drosera/page/49 [Fri Sep 16 11:16:11 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57' [Fri Sep 16 11:16:16 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57', referer https://forum.carnivoren.org/forums/forum/89-natur/page/37 [Fri Sep 16 11:16:21 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57', referer https://www.google.com/ [Fri Sep 16 11:16:22 2022] [error] [client <redacted>:0] AH01071: Got error 'PHP message: sending license notification | daysLeft: 187 | expires: 2023-03-23 08:22:57', referer https://forum.carnivoren.org/calendar/1-kalender/2018/6/7 Really? What's wrong with this line: $daysLeft = (int) (new \IPS\DateTime)->diff( \IPS\DateTime::ts( strtotime( $response['expires'] ) ) )->format('%r%a'); That is a PHP 8.1 bug. It has been fixed in 4.7.2.
Sebastian Darowski Posted September 16, 2022 Posted September 16, 2022 (edited) Hey, I'm running 4.7.1 on PHP 8.1 for a while now, never had this issue before. I updated to 4.7.2 the day before yesterday and needed to revert (restore from backup) since one of my applications is not compatible, yet (which also means I can not update to 4.7.2 right now). So I'm basically running 4.7.1 on PHP 8.1 again. The whole notification spam just started yesterday. Was this introduced in a patch release of PHP 8.1? Because I configured my managed hosting for PHP 8.1 a while ago but I can not choose the exact patch release. Kind regards Marco (actually not Sebastian, due to shared account...) Edited September 16, 2022 by Sebastian Darowski
Management Matt Posted September 16, 2022 Management Posted September 16, 2022 It was fixed in 4.7.2, but it's a simple edit: SeNioR- and Sebastian Darowski 1 1
Sebastian Darowski Posted September 16, 2022 Posted September 16, 2022 Hehe, I was already wondering why the timestamp is timezone sensitive. Thank you very much! I guess my edits will be overwritten once I update to 4.7.2. So this is okay for now. SeNioR- and Matt 2
Management Matt Posted September 16, 2022 Management Posted September 16, 2022 Yeah, you can manually patch it and 4.7.2 will complain about edited files, but it's fine to overwrite them. Marc and Sebastian Darowski 2
Sebastian Darowski Posted September 17, 2022 Posted September 17, 2022 @Matt Even though I will update to 4.7.2.1 ASAP (hopefully by tomorrow), this temporary fix does not work for two reasons: The place you mentioned is where the license text is being generated, so this does not change the way the expiration is getting checked. This is why I changed it in the init.php. At least those are the only two occurrences of the term "expireSoon" in the whole product. applications/core/extensions/core/AdminNotifications/License.php /** * Notification Title (full HTML, must be escaped where necessary) * * @return string */ public function title() { switch ( $this->extra ) { case 'missing': case 'url': return \IPS\Member::loggedIn()->language()->addToStack('license_error'); case 'expireSoon': $licenseKeyData = \IPS\IPS::licenseKey(); return \IPS\Member::loggedIn()->language()->addToStack( 'license_renewal_soon', FALSE, array( 'pluralize' => array( \intval( \IPS\DateTime::create()->diff( \IPS\DateTime::ts( strtotime( $licenseKeyData['expires'] ) ) )->format('%r%a') ) ) ) ); case 'expired': return \IPS\Member::loggedIn()->language()->addToStack('license_expired'); } } init.php /* Check it hasn't expired */ if ( strtotime( $response['expires'] ) < time() or !$response['active'] ) { \IPS\core\AdminNotification::send( 'core', 'License', 'expired', FALSE ); \IPS\core\AdminNotification::remove( 'core', 'License', 'expireSoon' ); } else { \IPS\core\AdminNotification::remove( 'core', 'License', 'expired' ); /* Or there's 7 days or less to go */ $daysLeft = (int) (new \IPS\DateTime)->diff( \IPS\DateTime::ts( strtotime( $response['expires'], TRUE ) ) )->format('%r%a'); if( $daysLeft < 0 ) { $daysLeft = 0; } if ( $daysLeft <= 7 ) { \IPS\core\AdminNotification::send( 'core', 'License', 'expireSoon', FALSE ); } else { \IPS\core\AdminNotification::remove( 'core', 'License', 'expireSoon' ); } } So if your recommended change is the only attempt to fix this issue in 4.7.2, it will still occur. Daniel F 1
Daniel F Posted September 19, 2022 Posted September 19, 2022 Thank you very much for your investigation.We're looking at this right now.
Daniel F Posted September 19, 2022 Posted September 19, 2022 Hi,I have just double checked everything, and both places which you have mentioned in your post were changed for our last weeks patch! It seems that Matt just forgot to mention the second part ! Matt, SeNioR- and Sebastian Darowski 1 2
Recommended Posts