Versio

Zend_Config_Exception

Overzicht Reageren

Marick Marick

Marick Marick

06/12/2011 16:14:45
Quote Anchor link
Hoi iedereen,

Lange tijd geleden dat ik hier iets heb geplaatst, maar nu heb ik echt even jullie hulp nodig. :)

Ik heb voor het eerst een website gemaakt in het Zend Framework. Nu werkt deze perfect op localhost (XAMPP - PHP versie 5.3.8), maar als ik deze upload naar de server van de website waar hij op moet staan (PHP versie 5.2.17) krijg ik de volgende error:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'parse_ini_file(/application/configs/application.ini) [function.parse-ini-file]: failed to open stream: No such file or directory' in /var/www/qb205120/data/www/-domein-.nl/library/Zend/Config/Ini.php:182 Stack trace: #0 /var/www/qb205120/data/www/-domein-.nl/library/Zend/Config/Ini.php(202): Zend_Config_Ini->_parseIniFile('/application/co...') #1 /var/www/qb205120/data/www/-domein-.nl/library/Zend/Config/Ini.php(126): Zend_Config_Ini->_loadIniFile('/application/co...') #2 /var/www/qb205120/data/www/-domein-.nl/application/Bootstrap.php(150): Zend_Config_Ini->__construct('/application/co...', 'production') #3 /var/www/qb205120/data/www/-domein-.nl/library/Zend/Application/Bootstrap/BootstrapAbstract.php(667): Bootstrap->_initViewHelper() #4 /var/www/qb205120/data/www/-domein-.nl/library/Zend/Application/Bootstrap/BootstrapAbstract.php(620): Zend_Application_Bootstrap_BootstrapAbstract->_ in /var/www/qb205120/data/www/-domein-.nl/library/Zend/Config/Ini.php on line 182


Hij zegt dus dat application.ini niet bestaat maar als ik kijk bestaat hij toch echt wel. Dit is is mijn public/index.php:

Code (php)
PHP script in nieuw venster Selecteer het PHP script
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
<?php

// Define path to application directory
defined('APPLICATION_PATH')
    ||
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Define application environment
define('APPLICATION_ENV', 'testing');

/*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'),
    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();
?>


Ik hoop dat iemand me kan helpen. :)
Gr.
Gewijzigd op 06/12/2011 16:15:13 door Marick Marick
 
PHP hulp

PHP hulp

25/05/2012 20:01:36
Gesponsorde koppelingen:
 
Bram Boos
Redacteur

Bram Boos

06/12/2011 17:02:35
Quote Anchor link
Echo dit eens op je index.php en je weet precies waar PHP denkt dat je config file staat.

Code (php)
PHP script in nieuw venster Selecteer het PHP script
1
2
3
<?php
    echo realpath(dirname(__FILE__) . '/../application/configs/application.ini';
?>
 
Marick Marick

Marick Marick

08/12/2011 21:03:51
Quote Anchor link
Bedankt voor je reactie. Ik heb het inmiddels een beetje aangepast. Dit is inmiddels mijn index.php, ik output nu waar de application.ini zou moeten staan (/var/www/qb205120/data/www/-knip-.nl/application/configs/application.ini), en als ik dit pad volg zou hij het toch echt moeten doen, maar toch geeft hij nog steeds dezelfde error aan. Iemand een idee misschien?

Code (php)
PHP script in nieuw venster Selecteer het PHP script
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
<?php
 
// Define path to application directory
defined('APPLICATION_PATH')
    ||
define('APPLICATION_PATH', realpath(dirname(__FILE__)) . '/application');

defined('APPLICATION_ENV')
    ||
define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    'library',
    get_include_path(),
)));


/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    $appPath = APPLICATION_PATH . '/configs/application.ini'
);

die($appPath);
$application->bootstrap()
            ->
run();
?>
Gewijzigd op 08/12/2011 21:09:01 door Marick Marick
 
Kees Schepers
Moderator

kees Schepers

09/12/2011 09:29:51
Quote Anchor link
Heeft het bestand leesrechten?
 
Marick Marick

Marick Marick

10/12/2011 12:56:17
Quote Anchor link
Ja, het bestand heeft leesrechten. De bestandsrechten staan op 644, ik neem aan dat dit oké is?
 



Overzicht Reageren

Get Adobe Flash player