简体   繁体   中英

Cannot find application.php

hello am trying to install zend framework again after formating my machine but i keep getting this error...i have already done one project from previous installation but this time installation has just failed..

 >>>Warning: require_once(Zend/Application.php) [function.require-once]:       to          open stream:  
No such file or directory in C:\xampp\htdocs\home\public\index.php on line 18



Fatal error: require_once() [function.require]: Failed opening required     'Zend/Application.php' (include_path='C:\xampp\htdocs\home\library;“.') in C:\xampp \htdocs\home\public\index.php on line 18
            This is my index.php page
    >>// 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'));

// 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();

//

   The application.php is already inside the library/zend package...
   This is my application.ini
    [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

    [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
I just dont understand why it cant get that file yet it is inside the Zend    folder...

Everything looks just fine from my perspective Pliz help...thanks in advance

Make sure that your ZF library folder is in you include path in php.ini.

On my machine (typical windows + xampp), the file can be found in c:\\xampp\\php\\php.ini

Look for the line:

include_path = "." 

and change it to include you ZF library path

include_path = ".;C:\path\to\Zend\Parent\Directory";

If your ZF libraries are located in C:\\xampp\\ZF\\library\\Zend, the include path should be "C:\\xampp\\ZF\\library".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM