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 :

Zend Framework sur un serveur dédié Kimsufi


Sujet :

Zend Framework PHP

  1. #1
    Candidat au Club
    Profil pro
    Inscrit en
    Octobre 2012
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2012
    Messages : 13
    Points : 2
    Points
    2
    Par défaut Zend Framework sur un serveur dédié Kimsufi
    Bonjour,

    Je viens voir vous aujourd'hui pour savoir s'il existe un tuto pour installer un projet Zend sur un serveur dédié ? Car enfaite je rencontre un problème depuis plus d'une semaine...

    Mon projet tourne très bien en local sous W7. Lorsque je l'exporte vers un Kimsufi sous Debian 6.0 il me retourne une erreur PHP :
    Fatal error: Uncaught exception 'Zend_Exception' with message 'File "UserContentPlaylist.php" does not exist or class "UserContentPlaylist" was not found in the file' in /var/www/wall/library/Zend/Loader.php:99
    Stack trace: #0 /var/www/wall/application/views/helpers/GetContentPL.php(10): Zend_Loader::loadClass('UserContentPlay...') #1 [internal function]: Zend_View_Helper_GetContentPL->GetContentPL('-1') #2 /var/www/wall/library/Zend/View/Abstract.php(342): call_user_func_array(Array, Array) #3 /var/www/wall/application/views/scripts/search/show.phtml(72): Zend_View_Abstract->__call('GetContentPL', Array) #4 /var/www/wall/application/views/scripts/search/show.phtml(72): View->GetContentPL('-1') #5 /var/www/wall/library/Zend/View.php(108): include('/var/www/wal...') #6 /var/www/wall/library/Zend/View/Abstract.php(880): Zend_View->_run('/var/www/wal...') #7 /var/www/wall/library/Zend/View/Helper/Partial.php(105): Zend_View_Abstract->render('/search/show.ph...') #8 [internal function]: Zend_View in /var/www/wall/library/Zend/Loader.php on line 99
    Dès lors que je grise cette ligne ou j'invoque un $this->partial("..."); -

    Il m'affiche mon layout et me dit qu'il ne trouve pas mon controlleur /index/welcome -

    Quelqu'un aurait-il une idée ou un tutoriel pour régler ce genre de configuration ?

    Merci d'avance

  2. #2
    Membre expérimenté

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 278
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 278
    Points : 1 639
    Points
    1 639
    Par défaut
    As-tu vérifié la casse (majuscules / minuscules) de tes noms de fichiers et de classe ? C'est souvent le problème quand on passe de windows à linux.
    Par exemple, UserContentPlaylist.php, usercontentplaylist.php et USERCONTENTPLAYLIST.PHP sont trois fichiers différents sous linux (case sensitive) et le même fichier sous windows (case insensitive).

  3. #3
    Candidat au Club
    Profil pro
    Inscrit en
    Octobre 2012
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2012
    Messages : 13
    Points : 2
    Points
    2
    Par défaut
    Bonjour

    Et merci en effet le problème venait de là ! Par contre je suis passé à un autre problème du coup...
    Not Found
    The requested URL /apps/news was not found on this server.
    Apache/2.2.16 (Debian) Server at xxxxxx.com Port 80
    je ne sais pas pourquoi il n'arrive pas à trouver le chemin... Il m'affiche bien mon layout par contre

    aurais-tu une idée ?
    Merci pour ton aide

  4. #4
    Candidat au Club
    Profil pro
    Inscrit en
    Octobre 2012
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2012
    Messages : 13
    Points : 2
    Points
    2
    Par défaut
    config.ini
    [production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    includePaths.library = APPLICATION_PATH "/../library"
    bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
    bootstrap.class = "Bootstrap"
    appnamespace = "Application"
    resources.layout.layoutPath = APPLICATION_PATH "/layouts/"
    resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
    index.php
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    <?php
     
    // Define path to application directory
    defined('APPLICATION_PATH')
            || define('APPLICATION_PATH', realpath('/var/www/wall/application'));
     
    // Define application environment
    defined('APPLICATION_ENV')
            || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
     
    // Ensure library/ is on include_path
    set_include_path(implode(PATH_SEPARATOR, array(
                realpath(APPLICATION_PATH . '/../library'),
        realpath(APPLICATION_PATH . '/../library/Zend'),
                realpath(APPLICATION_PATH . '/../application'),
                realpath(APPLICATION_PATH . '/models/tables'),
                get_include_path(),
            )));

  5. #5
    Membre expérimenté

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 278
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 278
    Points : 1 639
    Points
    1 639
    Par défaut
    Normalement, dans ce cas, tu devrais avoir un 404 personnalisé. As-tu vérifié l'url_rewriting ?

  6. #6
    Candidat au Club
    Profil pro
    Inscrit en
    Octobre 2012
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2012
    Messages : 13
    Points : 2
    Points
    2
    Par défaut
    Je n'ai pas compris ?!

    dans le phpinfo() normalement j'ai bien mod_rewrite d'activé

  7. #7
    Membre expérimenté

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 278
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 278
    Points : 1 639
    Points
    1 639
    Par défaut
    Que se passe-t-il quand tu essaies d'accéder à une page qui n'existe pas ? Si tu n'obtiens pas ta page d'erreur du ZF, c'est que tu as probablement un problème de rewriting.

  8. #8
    Candidat au Club
    Profil pro
    Inscrit en
    Octobre 2012
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2012
    Messages : 13
    Points : 2
    Points
    2
    Par défaut
    j'obtiens la même erreur sauf que j'ai pas le layout

    Not Found

    The requested URL /singe/internet was not found on this server.

    Apache/2.2.16 (Debian) Server at wall.com Port 80

  9. #9
    Membre expérimenté

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 278
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 278
    Points : 1 639
    Points
    1 639
    Par défaut
    C'est donc probablement ton rewriting qui ne fonctionne pas.
    Si tu as mis tes règles de rewriting dans le .htaccess, vérifie qu'il est bien interprété (par exemple en définissant une variable d'environnement dans ton .htaccess et en testant sa valeur dans index.php). S'il n'est pas interprété, c'est surement parce que httpd.conf ou ton virtualhost ne contient pas la commande AllowOverride All.

  10. #10
    Candidat au Club
    Profil pro
    Inscrit en
    Octobre 2012
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2012
    Messages : 13
    Points : 2
    Points
    2
    Par défaut
    dans mon .htaccess
    Options -MultiViews
     
    # Règles de réécriture pour Zend Framework
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule .* index.php
     
    # Sécurité : Ne pas autoriser le parcours de répertoires
    Options -Indexes
     
    # "active" PHP5
    AddType x-mapp-php5 .php
    SetEnv PHP_VER 5
     
    # Désactive le paramètre register_globals
    SetEnv REGISTER_GLOBALS 0
    # Désactive le paramètre magic_quotes_gcp
    SetEnv MAGIC_QUOTES 0
    
    dans mon httpd.conf
    
    <VirtualHost *:80>
        ServerName http://wall.com
        SetEnv APPLICATION_ENV "production"
        DocumentRoot "/var/www/wall/public"
        <Directory />
        AllowOverride All
        </Directory>
    
        <Directory /var/www/wall/public>
            DirectoryIndex index.php
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    </VirtualHost>
    

  11. #11
    Membre expérimenté

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 278
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 278
    Points : 1 639
    Points
    1 639
    Par défaut
    As-tu testé si le .htaccess est interprété ?
    Je n'utilise pas les mêmes règles de rewriting :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

  12. #12
    Candidat au Club
    Profil pro
    Inscrit en
    Octobre 2012
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2012
    Messages : 13
    Points : 2
    Points
    2
    Par défaut
    je pense qu'il ne passe pas par mon .htaccess

    comment fait-on pour en être sûr ?

    Merci pour ton aide

  13. #13
    Membre expérimenté

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 278
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 278
    Points : 1 639
    Points
    1 639
    Par défaut
    Dans ton .htaccess :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    SetEnv TEST_HTACCESS good
    Dans index.php :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    defined('TEST_HTACCESS')
        || define('TEST_HTACCESS', (getenv('TEST_HTACCESS') ? getenv('TEST_HTACCESS') : 'bad'));
    echo TEST_HTACCESS;
    exit;
    Si tu obtiens 'bad', ton .htaccess n'est pas interprété.

  14. #14
    Candidat au Club
    Profil pro
    Inscrit en
    Octobre 2012
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2012
    Messages : 13
    Points : 2
    Points
    2
    Par défaut
    En effet le script m'affiche bad.

    Comment puis-je régler ce problème ?

    Merci d'avance

  15. #15
    Membre expérimenté

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 278
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 278
    Points : 1 639
    Points
    1 639
    Par défaut
    Dans ton httpd.conf, remplace
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <Directory /var/www/wall/public>
    par
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <Directory "/var/www/wall/public">
    Relance Apache et dis-moi ce que ça donne.

  16. #16
    Candidat au Club
    Profil pro
    Inscrit en
    Octobre 2012
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2012
    Messages : 13
    Points : 2
    Points
    2
    Par défaut
    J'ai toujours le même problème :/

  17. #17
    Membre expérimenté

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 278
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 278
    Points : 1 639
    Points
    1 639
    Par défaut
    Quelques pistes :
    1) Teste ton virtualhost en changeant la variable d'environnement.
    2) Remplace
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ServerName http://wall.com
    par N'oublie pas de reloader apache.

  18. #18
    Membre actif
    Homme Profil pro
    Développeur Web
    Inscrit en
    Décembre 2010
    Messages
    144
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Décembre 2010
    Messages : 144
    Points : 241
    Points
    241
    Par défaut
    Pour activer l'url rewriting d'Apache (depuis un terminal) :
    Si il est déjà activé il te retournera le message "Module rewrite already enabled" sinon il l'activera et te demandera de relancer Apache avec un :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    /etc/init.d/apache2 restart

  19. #19
    Candidat au Club
    Profil pro
    Inscrit en
    Octobre 2012
    Messages
    13
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2012
    Messages : 13
    Points : 2
    Points
    2
    Par défaut
    Mon mode rewrite est enable et en mettant juste wall.com ça me retourne le même bug
    hum... !!

  20. #20
    Membre expérimenté

    Profil pro
    Inscrit en
    Janvier 2005
    Messages
    1 278
    Détails du profil
    Informations personnelles :
    Localisation : France, Gironde (Aquitaine)

    Informations forums :
    Inscription : Janvier 2005
    Messages : 1 278
    Points : 1 639
    Points
    1 639
    Par défaut
    Dans httpd.conf, rajoute :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    	<Location />
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} -s [OR]
            RewriteCond %{REQUEST_FILENAME} -l [OR]
            RewriteCond %{REQUEST_FILENAME} -d
            RewriteRule ^.*$ - [NC,L]
            RewriteRule ^.*$ index.php [NC,L]
    	</Location>
    As-tu modifié APPLICATION_ENV dans ton virtualhost et testé sa valeur ?

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

Discussions similaires

  1. [Récapitulatif] Zend Framework sur serveurs mutualisés
    Par Janitrix dans le forum Zend Framework
    Réponses: 11
    Dernier message: 18/09/2011, 17h28
  2. Deux serveurs mysql sur un serveur dédié
    Par Tchi99 dans le forum Installation
    Réponses: 5
    Dernier message: 02/08/2007, 18h32
  3. wget sur un serveur dédié
    Par toffff dans le forum Debian
    Réponses: 3
    Dernier message: 12/03/2007, 18h20
  4. [C#] Installer plusieurs framework sur le serveur
    Par mister3957 dans le forum Services Web
    Réponses: 1
    Dernier message: 11/07/2006, 11h51
  5. Configuration des dossiers FTP sur un serveur dédié
    Par ptit_seb dans le forum Apache
    Réponses: 4
    Dernier message: 29/09/2005, 14h53

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