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 :

heberger appli 1&1 [ZF 1.11]


Sujet :

Zend Framework PHP

  1. #1
    Nouveau membre du Club
    Femme Profil pro
    Webmaster
    Inscrit en
    Février 2012
    Messages
    44
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Centrafrique

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Associations - ONG

    Informations forums :
    Inscription : Février 2012
    Messages : 44
    Points : 31
    Points
    31
    Par défaut heberger appli 1&1
    Salut a tous actuellement je souhaite heberger mon site sur 1&1 je demande de l'aide en sachant que ce probleme a ete traiter plusieurs fois mais malgrer les anciens post j'y suis pas arriver alors voila mon nom de domaine m'affiche: Adapter name must be specified in a string


    voici mon Bootstrap (en partie):
    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
    19
        protected function _initDb() {
            // Chargement des données du fichier application.ini
            $config = new Zend_Config($this->getOptions());
     
            // Test de la connexion avec l'adapateur créé
            try {
                $db = Zend_Db::factory($config->resources->db);
                $db->getConnection();
            }
            catch (Exception $e) {
                exit($e->getMessage());
            }
            // Configuration de l'adaptateur par defaut pour nos tables
            Zend_Db_Table::setDefaultAdapter($db);
     
            // Mise en registre de notre adatateur
            Zend_Registry::set('db', $db);
            return $db;
         }
    mon 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
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    <?php
     
    // Define path to application directory
    defined('APPLICATION_PATH')
        || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
     
    // Define application environment
    defined('APPLICATION_ENV')
        || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
     
    defined('FONTS_PATH')
    //    || define('FONTS_PATH', 'C:/Windows/Fonts/');
        || define('FONTS_PATH', APPLICATION_PATH . '/../public/fonts/');
    defined('MAIL_WEBMASTER')
        || define('MAIL_WEBMASTER', 'info@radi-rca.org');
     
    // Ensure library/ is on include_path
    set_include_path(implode(PATH_SEPARATOR, array(
        realpath(APPLICATION_PATH . '/../library'),
        get_include_path(),
    )));
     
    /** Zend_Application */
    require_once 'Zend/Application.php';
     
    // Create application, bootstrap, and run
    $application = new Zend_Application(
        APPLICATION_ENV,
        APPLICATION_PATH . '/configs/application.ini'
    );
    $application->bootstrap()
                ->run();
    ainsi que mon application.inien sachant que c'est celui du localhost)
    [production]
    
    ; Debug output
    phpSettings.display_startup_errors = 0
    phpSettings.display_errors = 0
    phpSettings.date.timezone = "Europe/Paris"
    
    ; Include path
    includePaths.library = APPLICATION_PATH "/../library"
    
    ; Bootstrap
    bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
    bootstrap.class = "Bootstrap"
    
    appnamespace = "Application"
    
    ; Front Controller
    resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
    resources.frontController.defaultModule = "accueil"
    resources.frontController.params.displayExceptions = 0
    resources.frontController.params.prefixDefaultModule = "1"
    
    resources.modules[] =
    
    ; Layout
    resources.layout.layout = "layout"
    resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
    
    ; Views
    resources.view.encoding = "UTF-8"
    resources.view.basePath = APPLICATION_PATH "/views/"
    resources.view[] =
    
    resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
    [staging : production]
    
    
    [testing : production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    
    [development : production]
    zfdebug.plugins.Variables = null
    zfdebug.plugins.Time = null
    zfdebug.plugins.Memory = null
    zfdebug.plugins.Exception = null
    zfdebug.plugins.Html = null
    zfdebug.plugins.Registry = null
    ; zfdebug.plugins.File = null
    ; zfdebug.plugins.Cache = null
    ; zfdebug.plugins.Database = null
    
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    resources.frontController.params.displayExceptions = 1
    
    ;
    resources.db.adapter = "MYSQLI"
    resources.db.params.host = "localhost"
    resources.db.params.username = "root"
    resources.db.params.password = ""
    resources.db.params.dbname = "rca"
    resources.db.params.charset = "utf8"
    resources.db.params.date_format = YYYY-MM-ddTHH:mm:ss
    resources.db.isDefaultTableAdapter = true
    ainsi que mes fichiers a sur le ftp:
    /
    +application
    -configs
    -application.ini
    +languages
    +layouts
    +models
    -Dbtable
    +modules
    +view
    --Bootsrap.php
    +docs
    +library
    +public
    voila mes fichiers a la racine du ftp en sachant que dans 1&1 j'ai cree un sous domaine qui pointe vers le fichier /public/index
    De plus je n'aipas cree de .htaccess a la racine voila toutes les infos merci a vous

  2. #2
    Nouveau membre du Club
    Femme Profil pro
    Webmaster
    Inscrit en
    Février 2012
    Messages
    44
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Centrafrique

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Associations - ONG

    Informations forums :
    Inscription : Février 2012
    Messages : 44
    Points : 31
    Points
    31
    Par défaut
    Citation Envoyé par ZYTROcypher Voir le message
    je fait un up si quelqu'un a une idée
    voici en developpement voici l'erreur que m'affiche le site:

  3. #3
    Membre éprouvé
    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 : 38
    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
    Points : 1 297
    Points
    1 297
    Par défaut
    Bonsoir,
    Tu as du mettre dans ton vhost ou .htaccess que tu es en production, le problème c'est que tu n'a pas de section production dans ton application.ini

    Attention car dans le message d'erreur j'ai l'impression que tu as un espace après production.

  4. #4
    Nouveau membre du Club
    Femme Profil pro
    Webmaster
    Inscrit en
    Février 2012
    Messages
    44
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Centrafrique

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Associations - ONG

    Informations forums :
    Inscription : Février 2012
    Messages : 44
    Points : 31
    Points
    31
    Par défaut
    Salut,
    (info)
    j'ai pas déployer le site en vhost n'ayant pas les droit d’administrateur sur le pc ensuite tu parle de mon fichier .ini (un soucis avec[production]) je vois pas je remet mon fichier .ini
    [production]

    ; Debug output
    phpSettings.display_startup_errors = 0
    phpSettings.display_errors = 0
    phpSettings.date.timezone = "Europe/Paris"

    ; Include path
    includePaths.library = APPLICATION_PATH "/../library"

    ; Bootstrap
    bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
    bootstrap.class = "Bootstrap"

    appnamespace = "Application"

    ; Front Controller
    resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
    resources.frontController.defaultModule = "accueil"
    resources.frontController.params.displayExceptions = 0
    resources.frontController.params.prefixDefaultModule = "1"

    resources.modules[] =

    ; Layout
    resources.layout.layout = "layout"
    resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"

    ; Views
    resources.view.encoding = "UTF-8"
    resources.view.basePath = APPLICATION_PATH "/views/"
    resources.view[] =

    resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
    [staging : production]


    [testing : production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1

    [development : production]
    zfdebug.plugins.Variables = null
    zfdebug.plugins.Time = null
    zfdebug.plugins.Memory = null
    zfdebug.plugins.Exception = null
    zfdebug.plugins.Html = null
    zfdebug.plugins.Registry = null
    ; zfdebug.plugins.File = null
    ; zfdebug.plugins.Cache = null
    ; zfdebug.plugins.Database = null

    [development : production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    resources.frontController.params.displayExceptions = 1

    ;
    resources.db.adapter = "MYSQLI"
    resources.db.params.host = ".db.1and1.com "
    resources.db.params.username = ""
    resources.db.params.password = ""
    resources.db.params.dbname = ""
    resources.db.params.charset = "utf8"
    resources.db.params.date_format = YYYY-MM-ddTHH:mm:ss
    resources.db.isDefaultTableAdapter = true
    ainsi que mon fichier .htaccess celui dans le fichier public:
    SetEnv APPLICATION_ENV production
    AddType x-mapp-php5 .php

    RewriteEngine On
    RewriteBase /
    RewriteRule !\.(js|ico|gif|jpg|png|css|swf|divx)$ index.php
    Options -MultiViews
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]
    ainsi que celui a laa racine de mon ftp:
    SetEnv APPLICATION_ENV development

    # "active" PHP5
    AddType x-mapp-php5 .php

    # Active rewrite engine
    RewriteEngine on

    RewriteBase /
    # pour que google trouve le fichier robots.txt, on ne redirige pas vers index.php
    RewriteRule ^robots.txt$ robots.txt [L]
    # pareil pour le fichier sitemap
    RewriteRule ^sitemap.xml$ sitemap.xml [L]

    # Active rewrite engine
    RewriteEngine on

    RewriteBase /
    # pour que google trouve le fichier robots.txt, on ne redirige pas vers index.php
    RewriteRule ^robots.txt$ robots.txt [L]
    # pareil pour le fichier sitemap
    RewriteRule ^sitemap.xml$ sitemap.xml [L]

    RewriteEngine On
    # Only apply to URLs on this domain
    RewriteCond %{HTTP_HOST} (.*)$ http://www.ong-centrafrique.org$

    # Only apply to URLs that aren't already under folder.
    RewriteCond %{REQUEST_URI} !^/public/

    # Don't apply to URLs that go to existing files or folders.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # Rewrite all those to insert /folder.
    RewriteRule ^(.*)$ /public/$1

    # Also redirect the root folder.
    RewriteCond %{HTTP_HOST}(.*)$ http://www.ong-centrafrique.org$
    RewriteRule ^(/)?$ public/index.php [L]
    voila je pense (apres ces modifs) il m'affiche une erreur 500 sitehttp://ong-centrafrique.org/

  5. #5
    Membre éprouvé
    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 : 38
    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
    Points : 1 297
    Points
    1 297
    Par défaut
    Bonsoir,
    Peux tu me faire voir les fichiers suivants :
    - public/index.php
    - ton fichier bootstrap si tu en as un.

  6. #6
    Nouveau membre du Club
    Femme Profil pro
    Webmaster
    Inscrit en
    Février 2012
    Messages
    44
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Centrafrique

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Associations - ONG

    Informations forums :
    Inscription : Février 2012
    Messages : 44
    Points : 31
    Points
    31
    Par défaut
    salut 5h4rk (j'avais ce projet entre parenthèse suite a une grosse migraine) j'ai repris un peu mon projet de bout en bout en l'hébergent il m'affiche une nouvelle erreur :Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in /homepages/5/d441632309/htdocs/public/index.php on line 25

    Fatal error: require_once() [function.require]: Failed opening required 'Zend/Application.php' (include_path='.:./library:./application/models/:./application/utils/:./application:.:/usr/lib/php5') in /homepages/5/d441632309/htdocs/public/index.php on line 25


    voila tu m'asdemandez mon ficjier 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
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    <?php
     
    // Define path to application directory
    defined('APPLICATION_PATH')
        || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
     
    // Define application environment
    defined('APPLICATION_ENV')
        || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));
     
    defined('FONTS_PATH')
    //    || define('FONTS_PATH', 'C:/Windows/Fonts/');
        || define('FONTS_PATH', APPLICATION_PATH . '/../public/fonts/');
    defined('MAIL_WEBMASTER')
        || define('MAIL_WEBMASTER', 'info@radi-rca.org');
     
    // Ensure library/ is on include_path
    set_include_path(implode(PATH_SEPARATOR, array(
        realpath(APPLICATION_PATH . '/../library'),
        get_include_path(),
    )));
     
    /** Zend_Application */
    require_once 'Zend/Application.php';
     
    // Create application, bootstrap, and run
    $application = new Zend_Application(
        APPLICATION_ENV,
        APPLICATION_PATH . '/configs/application.ini'
    );
    $application->bootstrap()
                ->run();
    ainsi que mon bootstrap:
    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
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    [production]
    phpSettings.display_startup_errors = 0
    phpSettings.display_errors = 0
    includePaths.library = APPLICATION_PATH "/../library"
    bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
    bootstrap.class = "Bootstrap"
    appnamespace = "Application"
    resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
    resources.frontController.params.displayExceptions = 0
    resources.view[] =
    resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
    resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
    resources.modules = ""
     
    [staging : production]
     
    [testing : production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
     
    [development : production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    resources.frontController.params.displayExceptions = 1
     
    resources.db.adapter = "MYSQLI"
    resources.db.params.host = ""
    resources.db.params.username = ""
    resources.db.params.password = ""
    resources.db.params.dbname = "rca"
    resources.db.params.charset = "utf8"
    resources.db.params.date_format = YYYY-MM-ddTHH:mm:ss
    resources.db.isDefaultTableAdapter = true

  7. #7
    Membre averti Avatar de Njörd
    Homme Profil pro
    Inscrit en
    Janvier 2010
    Messages
    190
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Janvier 2010
    Messages : 190
    Points : 390
    Points
    390
    Par défaut
    Bonjour ZYTROcypher,

    Citation Envoyé par ZYTROcypher Voir le message
    salut 5h4rk (j'avais ce projet entre parenthèse suite a une grosse migraine) j'ai repris un peu mon projet de bout en bout en l'hébergent il m'affiche une nouvelle erreur :Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory in /homepages/5/d441632309/htdocs/public/index.php on line 25
    Juste comme ça, vu que tu as recommencé ton projet, n'aurais tu pas oublié de recopier la librairie Zend dans ton dossier "library" ?

  8. #8
    Nouveau membre du Club
    Femme Profil pro
    Webmaster
    Inscrit en
    Février 2012
    Messages
    44
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : Centrafrique

    Informations professionnelles :
    Activité : Webmaster
    Secteur : Associations - ONG

    Informations forums :
    Inscription : Février 2012
    Messages : 44
    Points : 31
    Points
    31
    Par défaut
    Salut a tous sayez j'ai résolu mon probleme d'abord Njörd avait raison j'ai oubliez de recopier la librairie Zend dans ton dossier "library"
    ensuite pour ceux qui auraont le meme probleme j ai cree a la racine de mon ftp un fichier index: qui redirige vers mon fichiez index dans public
    voici le fichier index à la racine de mon ftp:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    <?php 
    define('RUNNING_FROM_ROOT', true);
    include 'public/index.php';
    ?>
    voila si sa peut aider
    psmerci a Njörd ainsi qu'a 5h4rk)

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Appli][Autre language]dll-contenant form
    Par flash dans le forum Langage
    Réponses: 6
    Dernier message: 20/09/2002, 14h18
  2. Réponses: 1
    Dernier message: 22/08/2002, 17h00
  3. [Kylix] [cgi] pb déploiement appli avec connexion MySQL [rés
    Par Nepomiachty Olivier dans le forum EDI
    Réponses: 3
    Dernier message: 06/08/2002, 20h09
  4. enregistrer dans un fichier avec une appli mdi
    Par ferrari dans le forum C++Builder
    Réponses: 4
    Dernier message: 05/05/2002, 15h17

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