Jump to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP Notice bei Cronjob Ausfürung

Featured Replies

Hallo zusammen,

seit heute Morgen spamt mich mein Server mit dieser Fehlermeldung zu:

PHP Notice:  Trying to access array offset on value of type bool in /var/www/froxlor/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php on line 505

Froxlor Version : 0.10.18
OS: Debian 9 mit Kernel 4.9.0-8-amd64
PHP: 7.4.9

Ich habe dann eben auf 0.10.20 geupdated, aber leider keine Änderung des Verhaltens. Jemand eine Idee was ich da machen kann?

Besten Dank & Gruß

Ist doch nur ein Notice, php7.4 ist halt nicht Default auf aktuellen Standard supported distros. Wir arbeiten an der vollständigen Kompatibilität

Also laut code wird vorher schon auf Existenz und Lesbarkeit der Zertifikatsdatei geprüft, so dass dort maximal durch fehlerhaften Inhalt der Dateien die Funktion openssl_x509_parse() fehltschlägt, sonst sollte und dürfte an dieser Stelle dieses Notice gar nicht auftreten.

Verhindern kannst du es mit Hilfe folgender Änderung:

diff --git a/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php b/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php
index 3e7338e3..b476f755 100644
--- a/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php
+++ b/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php
@@ -502,7 +502,7 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron
 
                if (is_dir($certificate_folder) && file_exists($ssl_file) && is_readable($ssl_file)) {
                        $cert_data = openssl_x509_parse(file_get_contents($ssl_file));
-                       if ($cert_data['validTo_time_t'] > strtotime($cert_date)) {
+                       if ($cert_data && $cert_data['validTo_time_t'] > strtotime($cert_date)) {
                                return true;
                        }
                }

 

  • Author

Vielen Dank für die schnelle Antwort!

Ich musste PHP updaten auf eine neure Version als die, die mit Debian 9 ausgeliefert wird, daher hab ich direkt auf 7.4 aktualisiert.

Das Fix scheint auf jeden Fall zu funktioniren. Vielen Dank!

Archived

This topic is now archived and is closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.