Index.php

Bonjour,
je viens juste de débuter avec PHP, et je voulais lancer une application "gsloc" déjà existante et quand je lance " http://localhost/gsloc/public/ " ben la page me renvoie ça " Path to Zend Framework and ZenDev not both defined. See index.php" et je n'arrive pas a trouver la solution aidez moi svp ?

2 réponses

  1. Contributeur
    bonjour, as-tu regardé dans index.php, comme écrit?
    0
    1. Oui, j'ai regardé dans index.php :

      $zf_path = get_cfg_var('zf_path');
      $zendev_path = get_cfg_var('zendev_path');

      if ($zf_path && $zendev_path) {
      define ('ZF_ROOT' , $zf_path .'/ZendFramework-'. ZF_VERSION );

      if (!get_cfg_var('zendev_dev')) { // zendev_dev -> reserved
      define ('ITPZF_ROOT' , $zendev_path .'/zendev-'. ZENDEV_VERSION );
      }
      else {
      define ('ITPZF_ROOT' , $zendev_path );
      }
      }
      else {
      // uncomment die line and define your own paths
      die("Path to Zend Framework and ZenDev not both defined. See index.php");
      }

      et quand je lance la page il m'affiche directement le "else"

      Merci
      0
  2. Modérateur
    Bonjour,

    Tu dis
    Je voulais lancer une application "gsloc" déjà existante

    Elle existait déjà sur le PC où tu la fais tourner ? Elle a déjà fonctionnée ?

    J'ai l'impression que tu as juste récupérer le répertoire d'une appli et que tu l'as collé sur ton ordi ...
    As tu installé ZEND FRAMEWORK ? https://framework.zend.com/manual/1.11/fr/learning.quickstart.create-project.html
    Si oui...
    (Je ne fais pas de Zend ... mais à tout hasard ...) n'aurais tu pas, dans ton PHP.INI une ligne pour la variable include_path ?
    Si elle est en commentaire il faut la retirer et s'assurer qu'elle contient le chemin vers la librairie de zend.

    0
    1. elle existe déja et je voulais la faire retourner sur mon PC et j'ai installer zend sur mon PC et j"ai décomenter dans fichier PHP.INI ça :

      ; UNIX: "/path1:/path2"
      include_path = ".:/php/includes"
      ;
      ; Windows: "\path1;\path2"
      include_path = ".;c:\php\includes"

      je mets quoi dans include_path ?

      merci
      0
    2. Modérateur
      Le souci semble venir des get_cfg_var('zf_path'); et get_cfg_var('zendev_path');
      get_cfg_var retourne une valeur présente dans ton fichier php.ini ( de ton apache) => https://www.php.net/manual/fr/function.get-cfg-var.php

      Dans ton php.ini ....Ces variables (zf_path et zendev_path ) y sont elles présentes ???

      Par contre.. quand tu dis :
      elle existe déja et je voulais la faire retourner sur mon PC
      Tu veux bien dire qu'il a déjà tourner sur ce PC avec la même config ? ou tu as changé quelque-chose (comme réinstaller ton apache/php et/ou Zend ) ???
      0
    3. @jordane45bonjour,

      an fait je l'ai exporter en utilisant un autre PC et je voulais la faire tourner sur mon PC pour cela :
      1- j'ai installer wamp
      2-j'ai télécharger et installer zendframework-1.12.6 et je l'ai mets dans le dossier C:\wamp64\www\zf_path\ZendFramework-1.12.6

      pour ta question j'ai rien toucher et j'ai pas trouvé les deux variable dans le fichier PHP.INI sur wamp les zf_path et zendev_path

      merci
      0
    4. Modérateur
      @Redouane.nouariRegarde la config de l'autre pc
      0
    5. en faite l'application se trouvais dans un serveur et je l'ai exporté en utilisant FileZila et je l'ai mets dans mon PC pour une modification dessus
      0