Jump to content
Froxlor Forum
  • 0

Fehlermeldung im froxlor Cronjob "PHP Warning: assert(): Assertion "is_string($dir) && strlen($dir)"


feiaweng

Question

Hallo Community,

 

nach dem Froxlor-Update auf

Maintenance release 0.9.34.2

bekomme ich folgende Meldung im cronjob:

++++++

PHP Warning: assert(): Assertion "is_string($dir) && strlen($dir) > 0 /* $dir does not look like an actual folder name */" failed in /var/www/froxlor/lib/functions/filedir/function.makeCorrectDir.php on line 29

++++++

Immer wieder dieselbe Zeile.

 

/etc/cron.d/froxlor:

*/5 * * * * root /usr/bin/nice -n 5 /usr/bin/php5 -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --tasks 1> /dev/null
0 0 * * * root /usr/bin/nice -n 5 /usr/bin/php5 -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --traffic 1> /dev/null
7 0 1 * * root /usr/bin/nice -n 5 /usr/bin/php5 -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --used_tickets_reset 1> /dev/null
14 0 1 * * root /usr/bin/nice -n 5 /usr/bin/php5 -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --ticketarchive 1> /dev/null
0 */6 * * * root /usr/bin/nice -n 5 /usr/bin/php5 -q /var/www/froxlor/scripts/froxlor_master_cronjob.php --mailboxsize 1> /dev/null

 

Es l?uft Debian 7.9 64-bit.

Mein Problem tritt nicht auf wenn ich mir den FTP-User anzeigen lassen, siehe Bug 1578

Hat jemand ne Idee?

 

Danke und Gruss

 

Link to comment
Share on other sites

19 answers to this question

Recommended Posts

Ich hatte das gleiche Problem nach dem nach dem Update der Pfad geprüft wird. Die Ursache war ein leerer phpappendopenbasedir Pfad. Diesen habe ich auf den Standardwert /tmp zurückgesetzt. Im Froxlor Frontend ist diese unter Einstellungen => Webserver-Einstellungen => Anzuhängende Pfade bei OpenBasedir => /tmp

 

Vielleicht hilft es ja jemand weiter.

Link to comment
Share on other sites

In der Konfiguration von Froxlor soll eigentlich nur noch eine Zeile in der Cronjob-Config aktiv sein.

*/5 * * * *    root    /usr/bin/nice -n 5 /usr/bin/php5 -q /var/www/froxlor/scripts/froxlor_master_cronjob.php

 

wenn ich das mache, l?uft komischerweise der cronjob gar nicht, nur wenn ich diesen von Hand starte, deswegen habe ich die Config mit den mehrzeiligen cronjobs aktiv gelassen.

Link to comment
Share on other sites

Nein das ist schon alles okay, nach dem ersten Cron-run erstellt Froxlor sich seine eigene Cron.d-Datei auf Grund der Informationen aus der Datenbank (du kannst ja z.B. die Intervalle anpassen etc.)

 

Gut, es passiert also beim Neuerstellen der Vhost-Configs. Hat er bis dahin schon configs erstellt, so dass man ggfls einschr?nken kann bei welchem Kunden das Problem auftritt?

Link to comment
Share on other sites

Ich lasse die Configs neu schreiben ?ber Froxlor.

Wenn ich unter /etc/apache2/sites-enabled die Files angucke,

haben die vhost-configs alle den Zeitstempel von gerade eben. Wurden also alle geschrieben.

Alle files  namens 40-diroptions50_froxlor_diroption_0d7cff7e836ae017cefdf855c03b6d82.conf

-rw-r--r-- 1 root root  289 Jan  4 12:21 40-diroptions50_froxlor_diroption_0d7cff7e836ae017cefdf855c03b6d82.conf

 

haben den Zeitstempel, der ?lter ist. Ob das so passt weiss ich nicht.

Link to comment
Share on other sites

Dann mach dir mal die Datei  /var/www/froxlor/lib/functions/filedir/function.makeCorrectDir.php auf und f?gst vor das

assert('is_string($dir) && strlen($dir) > 0 /* $dir does not look like an actual folder name */');

mal folgendes ein:

echo "Directory ist: ".$dir.PHP_EOL;

Dann l?sste den Cron laufen und dann sehen wir vllt ansatzweise bei welchem Punkt er da aussteigt

Link to comment
Share on other sites

/var/www/froxlor/lib/functions/filedir/function.makeCorrectDir.php

sieht jetzt so aus:

 

function makeCorrectDir($dir) {
echo "Directory ist: ".$dir.PHP_EOL;
        assert('is_string($dir) && strlen($dir) > 0 /* $dir does not look like an actual folder name */');

        $dir = trim($dir);

        if (substr($dir, -1, 1) != '/') {
                $dir.= '/';
        }
        if (substr($dir, 0, 1) != '/') {
                $dir = '/' . $dir;
        }
        $dir = makeSecurePath($dir);
        return $dir;
}

 

Zeigt leider immer noch die folgende Zeile an:

PHP Warning: assert(): Assertion "is_string($dir) && strlen($dir) > 0 /* $dir does not look like an actual folder name */" failed in /var/www/froxlor/lib/functions/filedir/function.makeCorrectDir.php on line 29

Link to comment
Share on other sites

@d00p

ich hab jetzt nochmal den cronjob von Hand gestartet mit --force.

Ich sehe das er mir anzeigt Directory ist: z.b. /var/www/webs/kunde/kundenverzeichnis.

Das sieht gut aus.

Was mir auff?llt ist, dass er nach dem Verzeichnis /usr/share/php5 wieder die Fehlermeldung schmei?t:

 

Directory ist: /var/www/fcgi/kunde/kundendomain/
Directory ist: /usr/share/php/
Directory ist: /usr/share/php/
Directory ist: /usr/share/php5/
Directory ist: /usr/share/php5/
Directory ist:
PHP Warning: assert(): Assertion "is_string($dir) && strlen($dir) > 0 /* $dir does not look like an actual folder name */" failed in /var/www/froxlor/lib/functions/filedir/function.makeCorrectDir.php on line 29
Directory ist:
Directory ist: /var/www/webs/kunde/kundendomain

Ist die Fehlermeldung ein Fehler in froxlor?

Oder ist es gar kein Fehler, und froxlor spuckt einen false positive aus?

Link to comment
Share on other sites

Hallo d00p,

 

ich benutze apache 2.2 mit aktiviertem mod_fcgi.

 

apache2ctl -M

Loaded Modules:
 core_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 alias_module (shared)
 auth_basic_module (shared)
 authn_file_module (shared)
 authz_default_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 fcgid_module (shared)
 mime_module (shared)
 negotiation_module (shared)
 perl_module (shared)
 php5_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 ssl_module (shared)
 status_module (shared)
 suexec_module (shared)

Link to comment
Share on other sites

Archived

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



×
×
  • Create New...