IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Zend Framework PHP Discussion :

probleme include path


Sujet :

Zend Framework PHP

  1. #1
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut probleme include path
    Bonjour,

    j'ai placer le repertoire ... /library/zend à la racine de mon site et je tente d'y accéder depuis un webService dans ./WebServices/TestService/WsController.php

    Mais l'inclusion pose problème et je reçois ceci :

    Warning: require_once(Zend/Controller/Action/HelperBroker.php): failed to open stream: No such file or directory in /customers/inkodeo.be/inkodeo.be/httpd.www/Zend/Controller/Action.php on line 25 Fatal error: require_once(): Failed opening required 'Zend/Controller/Action/HelperBroker.php' (include_path='.:/usr/share/php') in /customers/inkodeo.be/inkodeo.be/httpd.www/Zend/Controller/Action.php on line 25
    mon require dans WsController.php est :


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    require_once './MonWebService.php';
    require_once '../../Zend/Controller/Action.php';
     
    class WsController extends Zend_Controller_Action {
     
    	public function indexAction() {
    ...
    Je ne comprends pas, est-ce que quelqu'un peut m'expliquer ?

  2. #2
    Membre Expert
    Avatar de 5h4rk
    Homme Profil pro
    CTO at TabMo
    Inscrit en
    Février 2011
    Messages
    813
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : CTO at TabMo
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 813
    Par défaut
    Commence par faire les tutoriels pour voire comment débuter avec Zend

  3. #3
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut
    Je n'ai pas envie de respecter l'arborescence usuelle. J'ai déployé ma librairie ailleurs et je veux l'utiliser depuis n'importe où, sans config... du moins si c'est possible.

  4. #4
    Membre Expert
    Avatar de 5h4rk
    Homme Profil pro
    CTO at TabMo
    Inscrit en
    Février 2011
    Messages
    813
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : CTO at TabMo
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 813
    Par défaut
    Tu es donc le seul a savoir ou tu as mis tes librairie, donc a toi d inclure et spécifier correctement ou ces dernieres se trouve.
    Et regarde bien les fichier que tu inclus comment eux inclut les fichiers qui leur sont necessaire

  5. #5
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut
    En suivant le tutoriel du framework 1.10 http://s-jdm.developpez.com/tutoriel...ramework-1-10/ le problème reste le même.
    Après avoir suivit le tuto j'ai un :
    Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\tmpZendTest\public\index.php on line 18
    Je ne dois quand même pas pointer sur le repertoire de deploiement du framework quand même ?

  6. #6
    Membre Expert
    Avatar de 5h4rk
    Homme Profil pro
    CTO at TabMo
    Inscrit en
    Février 2011
    Messages
    813
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : CTO at TabMo
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 813
    Par défaut
    Ton .htacess est correcte ?

  7. #7
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut
    C'est celui généré par default à la création du projet :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
     
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

  8. #8
    Membre Expert
    Avatar de 5h4rk
    Homme Profil pro
    CTO at TabMo
    Inscrit en
    Février 2011
    Messages
    813
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : CTO at TabMo
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 813
    Par défaut
    Essaye de rajouter à ce fichier :
    setEnv APPLICATION_PATH "adresseabsolue/application"
    php_value include_path "adresseabsolue/library:."
    En remplaçant bien "adresseabsolue"

  9. #9
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut
    Ca ne change rien...

  10. #10
    Membre Expert
    Avatar de 5h4rk
    Homme Profil pro
    CTO at TabMo
    Inscrit en
    Février 2011
    Messages
    813
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : CTO at TabMo
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 813
    Par défaut
    Fais moi voir comment tu l'as écris ainsi que l'erreur que tu as

  11. #11
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut
    salut, voici l'htaccess

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
     
    setEnv APPLICATION_PATH "C:/wamp/www/tmpZendTest/application"
    php_value include_path "c:/wamp/www/ZendFramework-1.11.10/library:."
    et l'erreur

    ( ! ) Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\tmpZendTest\public\index.php on line 18
    Call Stack
    # Time Memory Function Location
    1 0.0043 373624 {main}( ) ..\index.php:0

    ( ! ) Fatal error: require_once() [function.require]: Failed opening required 'Zend/Application.php' (include_path='C:\wamp\www\tmpZendTest\library;c:/wamp/www/ZendFramework-1.11.10/library:.') in C:\wamp\www\tmpZendTest\public\index.php on line 18
    Call Stack
    # Time Memory Function Location
    1 0.0043 373624 {main}( ) ..\index.php:0

  12. #12
    Membre Expert
    Avatar de 5h4rk
    Homme Profil pro
    CTO at TabMo
    Inscrit en
    Février 2011
    Messages
    813
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : CTO at TabMo
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 813
    Par défaut
    Commente la ligne getIncludePath dans index.php, je ne suis pas sur du nom par contre

  13. #13
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut
    j'ai commenté le set_include_path

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    // Ensure library/ is on include_path
    /*
    set_include_path(implode(PATH_SEPARATOR, array(
        realpath(APPLICATION_PATH . '/../library'),
        get_include_path(),
    )));
    */
    Aucun changement... Je vais m'arrêter là avec mes inceptions sur le zf. C'est pas encore robuste. En tout cas merci pour ton aide.

  14. #14
    Membre Expert
    Avatar de 5h4rk
    Homme Profil pro
    CTO at TabMo
    Inscrit en
    Février 2011
    Messages
    813
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : CTO at TabMo
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 813
    Par défaut
    Je t'ai dit le get_include_path :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
     
    // Ensure library/ is on include_path
    set_include_path(implode(PATH_SEPARATOR, array(
        realpath(APPLICATION_PATH . '/../library'),
    //   get_include_path(),
    )));

  15. #15
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut
    sorry ... et bien c'est le même problème.

    Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream ...

  16. #16
    Membre Expert
    Avatar de 5h4rk
    Homme Profil pro
    CTO at TabMo
    Inscrit en
    Février 2011
    Messages
    813
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : CTO at TabMo
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 813
    Par défaut
    Tu es sur que les droits sur les dossiers et fichiers sont bon ?

  17. #17
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut
    les droits sont ceux par defaut et n'ont pas ete modifiés. On dirait que c'est un droit total.

  18. #18
    Membre Expert
    Avatar de 5h4rk
    Homme Profil pro
    CTO at TabMo
    Inscrit en
    Février 2011
    Messages
    813
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 40
    Localisation : France, Hérault (Languedoc Roussillon)

    Informations professionnelles :
    Activité : CTO at TabMo
    Secteur : High Tech - Multimédia et Internet

    Informations forums :
    Inscription : Février 2011
    Messages : 813
    Par défaut
    Remet ton fichier index.php de base dans ce cas la et edit le fichier php.ini de ton serveur virtuel et modifie ça :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    ; Windows: "\path1;\path2"
    ; include_path = ".;c:\php\includes"
    par ça :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    include_path = ".;c:\php\includes;c:\zend\library"
    A toi de voir pour le lien bien evidemment

  19. #19
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut
    aucun changement . Sur wamp je n'ai pas de repertoire includes dans php.

    En faisant un echo ini_get('include_path') j'obtiens :

    c:/wamp/www/ZendFramework-1.11.10/library:.

    Chose étrange j'ai toujours un stream not found sur Zend/Application.php

  20. #20
    Membre très actif Avatar de zulad
    Homme Profil pro
    creatif
    Inscrit en
    Juin 2007
    Messages
    714
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 52
    Localisation : Belgique

    Informations professionnelles :
    Activité : creatif

    Informations forums :
    Inscription : Juin 2007
    Messages : 714
    Par défaut
    J'ai solutionné provisoirement le problème avec la set_include_path

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
     
     
    defined('ZEND_PATH')
        || define('ZEND_PATH', realpath('c:/wamp/www/ZendFramework-1.11.10/library'));
     
    set_include_path(implode(PATH_SEPARATOR, array(
        realpath(APPLICATION_PATH . '/../library'),
        realpath(ZEND_PATH . ''),
        get_include_path()
    )));
    Le probleme pourrait venir du fait que je suis sur wamp sous windows server 2008. Les droits sont peut-être différents.

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. [Struts] Probleme include feuille de style dans JSP
    Par r_m_i_8 dans le forum Struts 1
    Réponses: 2
    Dernier message: 13/03/2006, 14h06
  2. [Borland CPP Compiler] Probleme avec !! Path !!
    Par kanzarih dans le forum Autres éditeurs
    Réponses: 1
    Dernier message: 20/10/2004, 23h07
  3. Réponses: 5
    Dernier message: 27/07/2004, 17h04
  4. Probleme de PATH
    Par barucca dans le forum Linux
    Réponses: 4
    Dernier message: 26/04/2004, 14h37
  5. [Struts][jsp] probleme de path
    Par vpet dans le forum Servlets/JSP
    Réponses: 2
    Dernier message: 30/03/2004, 18h21

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo