Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Bugs en série après passage à php 5.4  (Read 10838 times)

0 Members and 1 Guest are viewing this topic.

Springbox

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Bugs en série après passage à php 5.4
« on: July 22, 2013, 11:33:26 pm »

Bonjour

Mon hébergeur est passé sous php 5.4, depuis, même en upgradant vers la toute dernière version de Coppermine, j'ai toute une liste d'erreur qui apparaissent en haut des pages. En voici quelques-unes :
Quote
Strict Standards: Non-static method Inspekt::makeSuperCage() should not be called statically in /include/init.inc.php on line 50

Strict Standards: Non-static method Inspekt_Supercage::Factory() should not be called statically in /include/inspekt.php on line 283

Strict Standards: Non-static method Inspekt::makeGetCage() should not be called statically, assuming $this from incompatible context in /include/inspekt/supercage.php on line 126

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /include/inspekt.php on line 148

Strict Standards: Non-static method Inspekt::makePostCage() should not be called statically, assuming $this from incompatible context in /include/inspekt/supercage.php on line 127

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /include/inspekt.php on line 171

Strict Standards: Non-static method Inspekt::makeCookieCage() should not be called statically, assuming $this from incompatible context in /include/inspekt/supercage.php on line 128...
J'ai fait une recherche et vu que d'autres avaient eu des problèmes similaires. En revanche, je n'ai pas vu de solution autre que de repasser en php5.3 en créant un .htaccess
Y aurait-il une version compatible qui m'aurait échappé, un upgrade, une solution ?
Merci
Logged

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Bugs en série après passage à php 5.4
« Reply #1 on: July 23, 2013, 08:34:30 am »

un lien vers la galerie ?
est ce que l'utilitaire update.php a bien été lancé lors de la mise à jour ?
l'affichage des avertissement a t'il été désactivé ?
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Springbox

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Bugs en série après passage à php 5.4
« Reply #2 on: July 23, 2013, 11:13:44 am »

Merci pour la réponse.

Pas de lien vers la galerie, elle est en web profond et le restera.
L'utilitaire update.php a bien été lancé lors de la mise à jour.

Je ne suis pas sûr d'avoir compris la dernière question. Je viens de faire un tour dans le panneau de configuration pour activer le mode débogage et afficher les avertissements sous ce mode. C'était ça ?
Logged

Springbox

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Bugs en série après passage à php 5.4
« Reply #3 on: July 23, 2013, 11:24:48 am »

Quote from: Infos de débogage
/include/inspekt/cage.php

    Runtime Notice line 255: Non-static method Inspekt::getMatched() should not be called statically, assuming $this from incompatible context
    Runtime Notice line 531: Non-static method Inspekt::isIp() should not be called statically, assuming $this from incompatible context
    Runtime Notice line 238: Non-static method Inspekt::getEscaped() should not be called statically, assuming $this from incompatible context
    Runtime Notice line 238: Non-static method Inspekt::getEscaped() should not be called statically, assuming $this from incompatible context

/include/init.inc.php

    Runtime Notice line 229: Non-static method CPGPluginAPI::load() should not be called statically
    Runtime Notice line 434: Non-static method CPGPluginAPI::action() should not be called statically

/bridge/coppermine.inc.php

    Runtime Notice line 37: Non-static method Inspekt::makeSuperCage() should not be called statically, assuming $this from incompatible context
    Runtime Notice line 225: Non-static method Inspekt::makeSuperCage() should not be called statically, assuming $this from incompatible context

/include/functions.inc.php

    Runtime Notice line 110: Non-static method Inspekt::makeSuperCage() should not be called statically
    Runtime Notice line 771: Non-static method CPGPluginAPI::filter() should not be called statically
    Runtime Notice line 814: Non-static method CPGPluginAPI::filter() should not be called statically
    Runtime Notice line 819: Non-static method CPGPluginAPI::filter() should not be called statically
    Runtime Notice line 820: Non-static method CPGPluginAPI::filter() should not be called statically
    Warning line 162: Cannot modify header information - headers already sent by (output started at /include/init.inc.php:50)
    Runtime Notice line 6164: Non-static method Inspekt::makeSuperCage() should not be called statically
    Runtime Notice line 6176: Non-static method CPGPluginAPI::filter() should not be called statically

/bridge/udb_base.inc.php

    Deprecated line 353: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead.

/include/themes.inc.php

    Runtime Notice line 177: Non-static method CPGPluginAPI::filter() should not be called statically
    Runtime Notice line 214: Non-static method CPGPluginAPI::filter() should not be called statically
    Warning line 1559: Cannot modify header information - headers already sent by (output started at /include/init.inc.php:50)
    Warning line 1560: Cannot modify header information - headers already sent by (output started at /include/init.inc.php:50)
    Runtime Notice line 2463: Non-static method CPGPluginAPI::filter() should not be called statically
    Runtime Notice line 1723: Non-static method CPGPluginAPI::filter() should not be called statically
    Runtime Notice line 2486: Non-static method Inspekt::makeSuperCage() should not be called statically
    Runtime Notice line 1578: Non-static method CPGPluginAPI::filter() should not be called statically

/include/versioncheck.inc.php

    Notice line 148: Undefined index: errors_only
    Notice line 158: Undefined index: hide_images
    Notice line 168: Undefined index: no_modification_check
    Notice line 178: Undefined index: do_not_connect_to_online_repository
Pour la fonction dépréciée, cela peut s'expliquer par le fait que je suis repassé sous l'ancienne version (à force de bidouiller la nouvelle, plus rien ne fonctionnait). Pour le reste, aucune idée, j'ai les mêmes avertissements quelle que soit la version.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Springbox

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Bugs en série après passage à php 5.4
« Reply #5 on: July 23, 2013, 03:11:25 pm »

Heu... Merci. C'est gentil de balancer un lien sans un mot d'explication. En anglais en plus. Le top.
J'ai rien compris... Ou pas grand-chose.
Apparemment, il faut modifier le fichier php.ini… A condition d'y avoir accès (pas sûr que ce soit pas réservé à mon hébergeur, ça, au quel cas, ça m'étonnerait qu'il le modifie juste pour faire plaisir à M. Coppermine).
Ou alors, faut me dire où il est. Parce que dans les dossiers de la galerie, je ne l'ai pas trouvé.
Logged

Springbox

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Bugs en série après passage à php 5.4
« Reply #6 on: July 23, 2013, 03:49:24 pm »

Vérification faite, pas d'accès au fichier php.ini en hébergement mutualisé.
Une autre solution (en français de préférence) ?
Merci.
Logged

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Bugs en série après passage à php 5.4
« Reply #7 on: July 23, 2013, 09:44:46 pm »

la dernière question posée était de savoir si les avertissements avaient été désactivés. Ils ont étés activés par la manip faite. Vous pouvez re-désactiver cette fonction qui n'apporte rien de plus.
Phil essayait juste d'aider...
L'autre solution serait éventuellement de corriger toutes les lignes qui posent problème comme expliqué par André ici http://forum.coppermine-gallery.net/index.php/topic,69667.msg343021.html#msg343021
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Springbox

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Bugs en série après passage à php 5.4
« Reply #8 on: July 23, 2013, 11:12:32 pm »

OK, merci.
Je vais essayer ça, mais je suis loin d'être un pro. Ça va être chaud, je sens, parce qu'apparemment, c'est pas tout à fait la même modif à chaque fois. Faut adapter.
Je vous dirais quoi.
Logged

Springbox

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Bugs en série après passage à php 5.4
« Reply #9 on: July 24, 2013, 11:04:50 pm »

Bon, ce fut fastidieux, mais je pense avoir réussi. En tout cas, je n'ai plus d'avertissements en haut de page (j'en ai une chiée dans les alertes de débogages, mais pour ça, je me suis contenté de désactiver l'option)
Merci
Voici le détail des opération (à peu près aussi fastidieux à lire qu'à faire)

Pour Strict Standards: Non-static method Inspekt::makeSuperCage() should not be called statically in /include/init.inc.php on line 42
$superCage = Inspekt::makeSuperCage($strict); remplacé par
$inspekt = new Inspekt();
$superCage = $inspekt->makeSuperCage($strict);

Pour Strict Standards: Non-static method Inspekt_Supercage::Factory() should not be called statically in /include/inspekt.php on line 282
$_scinstance = Inspekt_Supercage::Factory($strict); remplacé par
$inspekt_supercage = new Inspekt_Supercage();
$_scinstance = $inspekt_supercage->Factory($strict);

Pour Strict Standards: Non-static method Inspekt::makeGetCage() should not be called statically, assuming $this from incompatible context in /include/inspekt/supercage.php on line 124
Strict Standards: Non-static method Inspekt::makePostCage() should not be called statically, assuming $this from incompatible context in /include/inspekt/supercage.php on line 125
Strict Standards: Non-static method Inspekt::makeCookieCage() should not be called statically, assuming $this from incompatible context in /include/inspekt/supercage.php on line 126
Strict Standards: Non-static method Inspekt::makeEnvCage() should not be called statically, assuming $this from incompatible context in /include/inspekt/supercage.php on line 127
Strict Standards: Non-static method Inspekt::makeFilesCage() should not be called statically, assuming $this from incompatible context in /include/inspekt/supercage.php on line 128
Strict Standards: Non-static method Inspekt::makeServerCage() should not be called statically, assuming $this from incompatible context in include/inspekt/supercage.php on line 134
   $inspekt = new Inspekt();
      $this->get   = $inspekt->makeGetCage($strict);
      $this->post   = $inspekt->makePostCage($strict);
      $this->cookie   = $inspekt->makeCookieCage($strict);
      $this->env   = $inspekt->makeEnvCage($strict);
      $this->files   = $inspekt->makeFilesCage($strict);
        /**
         * Don't put session in cage as it will nullify $_SESSION and we will loose the session completely.
         * TODO: Find a way to put the session data in cage and still retain the session correctly
         */
      //$this->session=  $inspekt->makeSessionCage($strict);
      $this->server   = $inspekt->makeServerCage($strict);


Pour Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /include/inspekt.php on line 124
      $_instance = Inspekt_Cage::Factory($_SERVER, $strict); remplacé par
      $inspekt_cage = new Inspekt_cage();
      $_instance = $inspekt_cage->Factory($_SERVER, $strict);

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /include/inspekt.php on line 147
      $_instance = Inspekt_Cage::Factory($_GET, $strict); remplacé par
      $inspekt_cage = new Inspekt_cage();
      $_instance = $inspekt_cage->Factory($_GET, $strict);

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /include/inspekt.php on line 170
            $inspekt_cage = new Inspekt_cage();
            $_instance = $inspekt_cage->Factory($_POST, $strict);

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /include/inspekt.php on line 192
         $inspekt_cage = new Inspekt_cage();
         $_instance = $inspekt_cage->Factory($_COOKIE, $strict);

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /include/inspekt.php on line 215
            $inspekt_cage = new Inspekt_cage();
         $_instance = $inspekt_cage->Factory($_ENV, $strict);

Strict Standards: Non-static method Inspekt_Cage::Factory() should not be called statically, assuming $this from incompatible context in /include/inspekt.php on line 238
         $inspekt_cage = new Inspekt_cage();
         $_instance = $inspekt_cage->Factory($_FILES, $strict);
Logged

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Bugs en série après passage à php 5.4
« Reply #10 on: July 25, 2013, 07:22:20 am »

merci pour le partage. Il faudra faire attention lors des futures mises à jour pour ne pas remplacer ce fichier modifié par le nouveau...
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Springbox

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Bugs en série après passage à php 5.4
« Reply #11 on: July 26, 2013, 11:07:55 am »

Sur le forum de mon hébergeur, on me propose une autre solution.
Et puis… Ils ont un message pour les développeurs de Coppermine  ;D
Quote
another workaround would be to go to your coppermine config file (or whatever config file you use for your application) and insert the following at the top, under the <?php tag:
Code: [Select]
error_reporting(E_ALL ^ E_STRICT);This will get rid of the "Strict Standards" warnings (although it doesn't actually fix the code itself, it only prevents the error messages from being displayed). For coppermine, try bugging their support/developers to release a version that is fully compatible with PHP 5.4, it's been out long enough that one should've been released by now anyway.
« Last Edit: July 26, 2013, 07:31:51 pm by François Keller »
Logged

François Keller

  • Moderator
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9094
  • aka Frantz
    • Ma galerie
Re: Bugs en série après passage à php 5.4
« Reply #12 on: July 26, 2013, 11:18:02 am »

merci, je vais transmettre à l'équipe de développement
Logged
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Gilles50110

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 12
    • Parigot-Manchot
Re: Bugs en série après passage à php 5.4
« Reply #13 on: August 23, 2013, 10:37:10 am »

Marrant, j'ai eu ce souci avec un autre script (clip bucket).

Le souci vient que depuis PHP 5.4, certaines erreurs "strictes" sont affichées.
Donc le fait de ne pas les afficher règle le souci d'affichage.
Et les erreurs strictes sont le signalement de problèmes genre... ceux listés plus haut.
Même pas forcément cassant pour le script.
En gros, CPG est compatible 100% jusqu'à PHP 5.3

PHP 5.4 est sorti en mars 2012.
PHP 5.3 sera fini de supporté en juillet 2014 je pense.
Un an pour se préparer :)
Logged

cdlr27

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Bugs en série après passage à php 5.4
« Reply #14 on: March 27, 2014, 10:12:45 pm »

Merci SpringBox.
  par défaut, j'ai appliqué toutes les modifications et cela a bien fonctionner.

Attention aux prochaines mises à jour.

Marcel
Logged
Pages: [1]   Go Up
 

Page created in 0.036 seconds with 19 queries.