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 PHP Discussion :

Fatal error incompréhensible


Sujet :

Zend PHP

  1. #1
    Membre régulier
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2003
    Messages
    176
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mai 2003
    Messages : 176
    Points : 75
    Points
    75
    Par défaut Fatal error incompréhensible
    Bonjour,

    Je travaille avec Zend server CE et FlashBuilder 4.6
    Lors d'un test a un accès au données, j'ai l'erreur suivante (Erreur Zend je pense)
    Warning: syntax error, unexpected '(' in C:\Program Files (x86)\Zend\Apache2\htdocs\TEST02-debug/amf_config.ini on line 5 in C:\Program Files (x86)\Zend\Apache2\htdocs\TEST02-debug\gateway.php on line 12

    Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'syntax error, unexpected '(' in C:\Program Files (x86)\Zend\Apache2\htdocs\TEST02-debug/amf_config.ini on line 5' in C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Config\Ini.php:182Stack trace:#0 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Config\Ini.php(202): Zend_Config_Ini->_parseIniFile('C:\Program File...')#1 C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Config\Ini.php(126): Zend_Config_Ini->_loadIniFile('C:\Program File...')#2 C:\Program Files (x86)\Zend\Apache2\htdocs\TEST02-debug\gateway.php(31): Zend_Config_Ini->__construct('C:\Program File...', 'zendamf')#3 {main} thrown in C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Config\Ini.php on line 182
    Si je comprend bien cette erreur, c'est le caractère "(" qui provoque cette erreur ??? Comment résoudre ce problème ?
    Je me vois mal renommer le répertoire "Program Files (x86)" !!!

    Quelqu'un a-t-il déjà eut ce problème et comment peut-on s'en sortir ???

    Merci de votre aide.
    YC

  2. #2
    Expert éminent sénior

    Profil pro
    Inscrit en
    Septembre 2010
    Messages
    7 920
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2010
    Messages : 7 920
    Points : 10 726
    Points
    10 726
    Par défaut
    montre ton fichier ini

  3. #3
    Membre régulier
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2003
    Messages
    176
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mai 2003
    Messages : 176
    Points : 75
    Points
    75
    Par défaut
    Merci de t’intéresser a mon problème.
    De quel fichier ini parles tu ?
    en voici 2
    C:\Program Files (x86)\Zend\Apache2\htdocs\TEST02-debug/amf_config.ini
    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
     
    [zend]
    ;set the absolute location path of webroot directory, example:
    ;Windows: C:\apache\www
    ;MAC/UNIX: /user/apache/www
    webroot =C:/Program Files (x86)/Zend/Apache2/htdocs
     
    ;set the absolute location path of zend installation directory, example:
    ;Windows: C:\apache\PHPFrameworks\ZendFramework\library
    ;MAC/UNIX: /user/apache/PHPFrameworks/ZendFramework/library
    ;zend_path =
     
    [zendamf]
    amf.production = false
    amf.directories[]=./
    et C:\Program Files (x86)\Zend\ZendServer\share\ZendFramework\library\Zend\Config\Ini.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
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    <?php
    /**
     * Zend Framework
     *
     * LICENSE
     *
     * This source file is subject to the new BSD license that is bundled
     * with this package in the file LICENSE.txt.
     * It is also available through the world-wide-web at this URL:
     * http://framework.zend.com/license/new-bsd
     * If you did not receive a copy of the license and are unable to
     * obtain it through the world-wide-web, please send an email
     * to license@zend.com so we can send you a copy immediately.
     *
     * @category   Zend
     * @package    Zend_Config
     * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
     * @license    http://framework.zend.com/license/new-bsd     New BSD License
     * @version    $Id: Ini.php 24045 2011-05-23 12:45:11Z rob $
     */
     
     
    /**
     * @see Zend_Config
     */
    require_once 'Zend/Config.php';
     
     
    /**
     * @category   Zend
     * @package    Zend_Config
     * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
     * @license    http://framework.zend.com/license/new-bsd     New BSD License
     */
    class Zend_Config_Ini extends Zend_Config
    {
        /**
         * String that separates nesting levels of configuration data identifiers
         *
         * @var string
         */
        protected $_nestSeparator = '.';
     
        /**
         * String that separates the parent section name
         *
         * @var string
         */
        protected $_sectionSeparator = ':';
     
        /**
         * Whether to skip extends or not
         *
         * @var boolean
         */
        protected $_skipExtends = false;
     
        /**
         * Loads the section $section from the config file $filename for
         * access facilitated by nested object properties.
         *
         * If the section name contains a ":" then the section name to the right
         * is loaded and included into the properties. Note that the keys in
         * this $section will override any keys of the same
         * name in the sections that have been included via ":".
         *
         * If the $section is null, then all sections in the ini file are loaded.
         *
         * If any key includes a ".", then this will act as a separator to
         * create a sub-property.
         *
         * example ini file:
         *      [all]
         *      db.connection = database
         *      hostname = live
         *
         *      [staging : all]
         *      hostname = staging
         *
         * after calling $data = new Zend_Config_Ini($file, 'staging'); then
         *      $data->hostname === "staging"
         *      $data->db->connection === "database"
         *
         * The $options parameter may be provided as either a boolean or an array.
         * If provided as a boolean, this sets the $allowModifications option of
         * Zend_Config. If provided as an array, there are three configuration
         * directives that may be set. For example:
         *
         * $options = array(
         *     'allowModifications' => false,
         *     'nestSeparator'      => ':',
         *     'skipExtends'        => false,
         *      );
         *
         * @param  string        $filename
         * @param  mixed         $section
         * @param  boolean|array $options
         * @throws Zend_Config_Exception
         * @return void
         */
        public function __construct($filename, $section = null, $options = false)
        {
            if (empty($filename)) {
                /**
                 * @see Zend_Config_Exception
                 */
                require_once 'Zend/Config/Exception.php';
                throw new Zend_Config_Exception('Filename is not set');
            }
     
            $allowModifications = false;
            if (is_bool($options)) {
                $allowModifications = $options;
            } elseif (is_array($options)) {
                if (isset($options['allowModifications'])) {
                    $allowModifications = (bool) $options['allowModifications'];
                }
                if (isset($options['nestSeparator'])) {
                    $this->_nestSeparator = (string) $options['nestSeparator'];
                }
                if (isset($options['skipExtends'])) {
                    $this->_skipExtends = (bool) $options['skipExtends'];
                }
            }
     
            $iniArray = $this->_loadIniFile($filename);
     
            if (null === $section) {
                // Load entire file
                $dataArray = array();
                foreach ($iniArray as $sectionName => $sectionData) {
                    if(!is_array($sectionData)) {
                        $dataArray = $this->_arrayMergeRecursive($dataArray, $this->_processKey(array(), $sectionName, $sectionData));
                    } else {
                        $dataArray[$sectionName] = $this->_processSection($iniArray, $sectionName);
                    }
                }
                parent::__construct($dataArray, $allowModifications);
            } else {
                // Load one or more sections
                if (!is_array($section)) {
                    $section = array($section);
                }
                $dataArray = array();
                foreach ($section as $sectionName) {
                    if (!isset($iniArray[$sectionName])) {
                        /**
                         * @see Zend_Config_Exception
                         */
                        require_once 'Zend/Config/Exception.php';
                        throw new Zend_Config_Exception("Section '$sectionName' cannot be found in $filename");
                    }
                    $dataArray = $this->_arrayMergeRecursive($this->_processSection($iniArray, $sectionName), $dataArray);
     
                }
                parent::__construct($dataArray, $allowModifications);
            }
     
            $this->_loadedSection = $section;
        }
     
        /**
         * Load the INI file from disk using parse_ini_file(). Use a private error
         * handler to convert any loading errors into a Zend_Config_Exception
         *
         * @param string $filename
         * @throws Zend_Config_Exception
         * @return array
         */
        protected function _parseIniFile($filename)
        {
            set_error_handler(array($this, '_loadFileErrorHandler'));
            $iniArray = parse_ini_file($filename, true); // Warnings and errors are suppressed
            restore_error_handler();
     
            // Check if there was a error while loading file
            if ($this->_loadFileErrorStr !== null) {
                /**
                 * @see Zend_Config_Exception
                 */
                require_once 'Zend/Config/Exception.php';
                throw new Zend_Config_Exception($this->_loadFileErrorStr);
            }
     
            return $iniArray;
        }
     
        /**
         * Load the ini file and preprocess the section separator (':' in the
         * section name (that is used for section extension) so that the resultant
         * array has the correct section names and the extension information is
         * stored in a sub-key called ';extends'. We use ';extends' as this can
         * never be a valid key name in an INI file that has been loaded using
         * parse_ini_file().
         *
         * @param string $filename
         * @throws Zend_Config_Exception
         * @return array
         */
        protected function _loadIniFile($filename)
        {
            $loaded = $this->_parseIniFile($filename);
            $iniArray = array();
            foreach ($loaded as $key => $data)
            {
                $pieces = explode($this->_sectionSeparator, $key);
                $thisSection = trim($pieces[0]);
                switch (count($pieces)) {
                    case 1:
                        $iniArray[$thisSection] = $data;
                        break;
     
                    case 2:
                        $extendedSection = trim($pieces[1]);
                        $iniArray[$thisSection] = array_merge(array(';extends'=>$extendedSection), $data);
                        break;
     
                    default:
                        /**
                         * @see Zend_Config_Exception
                         */
                        require_once 'Zend/Config/Exception.php';
                        throw new Zend_Config_Exception("Section '$thisSection' may not extend multiple sections in $filename");
                }
            }
     
            return $iniArray;
        }
     
        /**
         * Process each element in the section and handle the ";extends" inheritance
         * key. Passes control to _processKey() to handle the nest separator
         * sub-property syntax that may be used within the key name.
         *
         * @param  array  $iniArray
         * @param  string $section
         * @param  array  $config
         * @throws Zend_Config_Exception
         * @return array
         */
        protected function _processSection($iniArray, $section, $config = array())
        {
            $thisSection = $iniArray[$section];
     
            foreach ($thisSection as $key => $value) {
                if (strtolower($key) == ';extends') {
                    if (isset($iniArray[$value])) {
                        $this->_assertValidExtend($section, $value);
     
                        if (!$this->_skipExtends) {
                            $config = $this->_processSection($iniArray, $value, $config);
                        }
                    } else {
                        /**
                         * @see Zend_Config_Exception
                         */
                        require_once 'Zend/Config/Exception.php';
                        throw new Zend_Config_Exception("Parent section '$section' cannot be found");
                    }
                } else {
                    $config = $this->_processKey($config, $key, $value);
                }
            }
            return $config;
        }
     
        /**
         * Assign the key's value to the property list. Handles the
         * nest separator for sub-properties.
         *
         * @param  array  $config
         * @param  string $key
         * @param  string $value
         * @throws Zend_Config_Exception
         * @return array
         */
        protected function _processKey($config, $key, $value)
        {
            if (strpos($key, $this->_nestSeparator) !== false) {
                $pieces = explode($this->_nestSeparator, $key, 2);
                if (strlen($pieces[0]) && strlen($pieces[1])) {
                    if (!isset($config[$pieces[0]])) {
                        if ($pieces[0] === '0' && !empty($config)) {
                            // convert the current values in $config into an array
                            $config = array($pieces[0] => $config);
                        } else {
                            $config[$pieces[0]] = array();
                        }
                    } elseif (!is_array($config[$pieces[0]])) {
                        /**
                         * @see Zend_Config_Exception
                         */
                        require_once 'Zend/Config/Exception.php';
                        throw new Zend_Config_Exception("Cannot create sub-key for '{$pieces[0]}' as key already exists");
                    }
                    $config[$pieces[0]] = $this->_processKey($config[$pieces[0]], $pieces[1], $value);
                } else {
                    /**
                     * @see Zend_Config_Exception
                     */
                    require_once 'Zend/Config/Exception.php';
                    throw new Zend_Config_Exception("Invalid key '$key'");
                }
            } else {
                $config[$key] = $value;
            }
            return $config;
        }
    }
    Merci de ta réponse
    YC

  4. #4
    Expert éminent sénior

    Profil pro
    Inscrit en
    Septembre 2010
    Messages
    7 920
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2010
    Messages : 7 920
    Points : 10 726
    Points
    10 726
    Par défaut
    faut mettre des quotes

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    webroot ="C:/Program Files (x86)/Zend/Apache2/htdocs"

  5. #5
    Membre régulier
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2003
    Messages
    176
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mai 2003
    Messages : 176
    Points : 75
    Points
    75
    Par défaut
    J'avais déjà essayé ça bien sur, mais ça ne change rien. C'est peut-être un bug avec Windows 7. Ma piètre expérience avec Zend ne me permet pas un telle accusation !!!

    Peut importe, j'ai refait l'installation de Zend CE en l'installant cette fois directement dans la racine du C:
    Nouvelle erreur (faut pas rêver non plus!!)
    class VOAuthor { public $id_aut; public $fname_aut; public $lname_aut;}
    Notice: Undefined index: HTTPS in C:\Zend\ZendServer\share\ZendFramework\library\Zend\Amf\Response\Http.php on line 59
     /0/onResultÿÿÿÿ�Uflex.messaging.messages.AcknowledgeMessagecorrelationIdclientIddestinationmessageIdtimestamptimeToLiveheaders bodyIF9A18422-FDF0-46B7-BB76-0BB8A76FBA89I0043166E-C929-C968-CA5A-00000234B29DI41B297FD-44DC-A669-BB7C-0000357C92BA132848148600 ‡G
    Une recherche sur internet et je m' aperçoi qu'il faut faire une modif dans Http.php http://framework.zend.com/issues/browse/ZF-11783

    Nouvel essai et Nouvelle erreur, encore et encore
    Vérifiez que Zend Framework est installé correctement et que le paramètre amf.production n'est pas défini sur vrai dans le fichier amf_config.ini, situé dans le dossier de sortie du projet.

    class VOAuthor { public $id_aut; public $fname_aut; public $lname_aut;} /0/onResultÿÿÿÿ�Uflex.messaging.messages.AcknowledgeMessagecorrelationIdclientIddestinationmessageIdtimestamptimeToLiveheaders bodyI16AEAA37-5C3E-469A-A733-70890F3D97D8I0AFCF871-1435-BCC8-13E4-000034380CADI5031B3F5-F1FD-58A9-9B8D-00002B1D6427132848278300 ‡G
    Et là je ne comprends même pas l'erreur !!
    Je suis a cours d'idées ....
    HELP

    YC

  6. #6
    Membre régulier
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2003
    Messages
    176
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Nouvelle-Calédonie

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Mai 2003
    Messages : 176
    Points : 75
    Points
    75
    Par défaut
    Bon, voila ça marche .....
    Ne me demande pas pourquoi, Je ne sais pas !!!!!

    Réinstallation complète de Zend CE sous c:\Zend
    Réinstallation complète de Flash Builder
    Modification de Http.php comme décrit précédemment
    et ça fonctionne !!!
    Pas d'explication satisfaisante. Tan pis !

    Merci de t’être intéressé a mon cas.
    YC

  7. #7
    Expert éminent sénior

    Profil pro
    Inscrit en
    Septembre 2010
    Messages
    7 920
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2010
    Messages : 7 920
    Points : 10 726
    Points
    10 726
    Par défaut
    oui je trouve aussi que Zend Server bug sous windows, j'aime beaucoup de le rendu de get_defined_functions

    https://gist.github.com/1476550

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

Discussions similaires

  1. erreurs fatal error C1010 dans visual c++ 6.0
    Par screeminelle dans le forum MFC
    Réponses: 2
    Dernier message: 12/10/2005, 14h30
  2. Fatal error: Allowed memory size of...
    Par Webfab dans le forum Langage
    Réponses: 3
    Dernier message: 17/09/2005, 11h11
  3. Réponses: 17
    Dernier message: 28/07/2005, 09h20
  4. Fatal Error : OpenGL GLX extension not support
    Par kacedda dans le forum GLUT
    Réponses: 5
    Dernier message: 06/06/2005, 11h28
  5. class php5 - Fatal error: main() [function.main]
    Par tom261285 dans le forum Langage
    Réponses: 3
    Dernier message: 21/01/2005, 15h41

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