Projet

Général

Profil

Demande #36438

Erreur PHP sur Scribe 2.6

Ajouté par Laurent Brillard il y a environ un an. Mis à jour il y a environ un an.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Version cible:
-
Début:
14/02/2025
Echéance:
% réalisé:

0%


Description

Bonjour Arnaud et collègues,

Sur Scribe 2.6, Roundcube affiche une erreur 500, en fouillant dans /var/www/html/roundcube/logs/errors.log on voit :

[14-Feb-2025 09:32:08 Indian/Reunion] PHP Fatal error:  Uncaught Error: Call to undefined method EolephpCAS::isInitialized() in /var/www/html/sondepiwik/envoleSonde.php:16
Stack trace:
#0 /var/www/html/sondepiwik/envoleSonde.php(85): initCAS(false, false, '1.3.1')
#1 /var/www/html/roundcube/plugins/cas_authentication/cas_authentication.php(130): include('/var/www/html/s...')
#2 /var/www/html/roundcube/program/lib/Roundcube/rcube_plugin_api.php(516): cas_authentication->render_page(Array)
#3 /var/www/html/roundcube/program/include/rcmail_output_html.php(831): rcube_plugin_api->exec_hook('render_page', Array)
#4 /var/www/html/roundcube/program/include/rcmail_output_html.php(654): rcmail_output_html->parse('mail', false)
#5 /var/www/html/roundcube/program/include/rcmail.php(289): rcmail_output_html->send('mail')
#6 /var/www/html/roundcube/index.php(283): rcmail->action_handler()
#7 {main}
  thrown in /var/www/html/sondepiwik/envoleSonde.php on line 16

Une erreur liée à la mise à jour de sondepiwik ?

Merci d'avance pour le correctif !
Laurent

Révisions associées

Révision 1a74da89 (diff)
Ajouté par Benjamin Bohard il y a environ un an

Utiliser la bonne méthode pour tester l’initialisation de phpCAS.

Ref #36438

Historique

#1 Mis à jour par Laurent Brillard il y a environ un an

Pour info, ce problème concerne aussi Scribe 2.7

#2 Mis à jour par Benjamin Bohard il y a environ un an

Une condition est utilisée avant d’instancier le client phpCAS, pour vérifier que phpCAS est prêt.

Avant la mise à jour, ce test est une composition de 2 tests :

            if (method_exists("eolephpCAS", "EoleTestphpCAS")){
                if(!eolephpCAS::EoleTestphpCAS()) {
…

En remplaçant l’appel à la méthode isInitialized par ce test, l’interface de Roundcube est de nouveau disponible.

#3 Mis à jour par Benjamin Bohard il y a environ un an

diff --git a/src/sondepiwik-1.0/envoleSonde.php b/src/sondepiwik-1.0/envoleSonde.php
index 2ea4e27..2baee69 100644
--- a/src/sondepiwik-1.0/envoleSonde.php
+++ b/src/sondepiwik-1.0/envoleSonde.php
@@ -13,7 +13,7 @@
                     require_once('configCAS/cas.inc.php');

                     if (__CAS_DEBUG) EolephpCAS::setDebug('/var/log/phpcas/phpcas-sonde.log');
-                    if(!EolephpCAS::isInitialized()) {
+                    if(method_exists("eolephpCAS", "EoleTestphpCAS") and !EolephpCAS::EoleTestphpCAS()) {
                         eolephpCAS::client(__CAS_VERSION, __CAS_SERVER, __CAS_PORT, __CAS_FOLDER, false);
                         eolephpCAS::setNoCasServerValidation();
                     }

#4 Mis à jour par Laurent Brillard il y a environ un an

Bonjour Benjamin,

Paquet eole-sondepiwik (1.0+2-38) testé et validé sur Scribe 2.6 !

Merci !

#5 Mis à jour par Arnaud FORNEROT il y a environ un an

  • Statut changé de Nouveau à Fermé

Formats disponibles : Atom PDF