![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 550 Pomógł: 9 Dołączył: 29.05.2009 Skąd: Ostrów Wielkopolski Ostrzeżenie: (0%) ![]() ![]() |
Witam,
przeniosłem projekt stworzony w systemie operacyjnym Windows na Linuxa Ubuntu. Jednak mam problem z działaniem projektu. Kod Warning: include_once(Zend/Application/Module/AutoLoader.php): failed to open stream: No such file or directory in /usr/share/php/libzend-framework-php/Zend/Loader.php on line 146 Warning: include_once(): Failed opening 'Zend/Application/Module/AutoLoader.php' for inclusion (include_path='/var/www/testy/application/../library:/var/www/testy/library:/var/www/testy/application::/usr/share/php/libzend-framework-php') in /usr/share/php/libzend-framework-php/Zend/Loader.php on line 146 Fatal error: Class 'Zend_Application_Module_AutoLoader' not found in /var/www/testy/application/Bootstrap.php on line 9 Proszę o pomoc. |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 2 885 Pomógł: 463 Dołączył: 3.10.2009 Skąd: Wrocław Ostrzeżenie: (0%) ![]() ![]() |
W głównym pliku index.php przed końcową sekcją zawierającą:
dodaj: Powinno pomóc. -------------------- Nie pomagam na pw, tylko forum.
|
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 550 Pomógł: 9 Dołączył: 29.05.2009 Skąd: Ostrów Wielkopolski Ostrzeżenie: (0%) ![]() ![]() |
Dodałem jednak dostaję taki komunikat błędu:
Kod Warning: include_once(Zend/Application/Module/AutoLoader.php): failed to open stream: No such file or directory in /usr/share/php/libzend-framework-php/Zend/Loader.php on line 146 Warning: include_once(): Failed opening 'Zend/Application/Module/AutoLoader.php' for inclusion (include_path='/var/www/testy/public/library:/var/www/testy/public/application/configs') in /usr/share/php/libzend-framework-php/Zend/Loader.php on line 146 Warning: require_once(Zend/Exception.php): failed to open stream: No such file or directory in /usr/share/php/libzend-framework-php/Zend/Loader.php on line 98 Fatal error: require_once(): Failed opening required 'Zend/Exception.php' (include_path='/var/www/testy/public/library:/var/www/testy/public/application/configs') in /usr/share/php/libzend-framework-php/Zend/Loader.php on line 98 Mój plik index.php CODE <?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')); // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(dirname(__FILE__) . '/../library'), realpath(dirname(__FILE__) . '/../application'), 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' ); $path = dirname($_SERVER['SCRIPT_FILENAME']); ini_set('include_path', $path . "/library:". $path . "/application/configs"); $application->bootstrap() ->run(); Mój plik application.ini CODE [production] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" autoloadernamespaces.0 = "Zend_" autoloadernamespaces.1 = "forms_" resources.layout.layoutpath = APPLICATION_PATH "/layouts" resources.db.adapter = mysqli resources.db.isDefaultAdapter = true resources.db.params.host = localhost resources.db.params.username = root resources.db.params.password = 54ajmon5 resources.db.params.dbname = zftutorial resources.db.params.charset = 'utf8' [staging : production] [testing : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 Plik bootstarp.php CODE <?php class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { private $_acl; protected function _initAutoLoad() { $modelLoader = new Zend_Application_Module_AutoLoader(array( 'namespace' => '', 'basePath' => APPLICATION_PATH, 'resourceTypes' => array ( 'validator' => array( 'path' => 'views/validators', 'namespace' => 'Validator' ) ) )); if(Zend_Auth::getInstance()->hasIdentity()) { Zend_Registry::set('role',Zend_Auth::getInstance()->getStorage()->read()->role ); } else { Zend_Registry::set('role', 'guest'); } $this->_acl = new Model_LibraryAcl; $this->_auth = Zend_Auth::getInstance(); $fc = Zend_Controller_Front::getInstance(); $fc->registerPlugin(new Plugin_AccessCheck($this->_acl)); return $modelLoader; } |
|
|
![]()
Post
#4
|
|
![]() Grupa: Zarejestrowani Postów: 2 885 Pomógł: 463 Dołączył: 3.10.2009 Skąd: Wrocław Ostrzeżenie: (0%) ![]() ![]() |
1. nie zastosowałeś się do moich wskazówek, te dwie linie kodu mają być przed sekcją /** Zend_Application */ ...
2. która wersja ZF? 3. u mnie jest
u Ciebie:
4. ja mam u siebie w application.ini tę linię zakomentowaną: ;includePaths.library = APPLICATION_PATH "/../library" 5. spróbuj też wywalić z indexu to: // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(dirname(__FILE__) . '/../library'), realpath(dirname(__FILE__) . '/../application'), get_include_path(), ))); Ten post edytował darko 18.08.2010, 20:12:22 -------------------- Nie pomagam na pw, tylko forum.
|
|
|
![]()
Post
#5
|
|
![]() Grupa: Zarejestrowani Postów: 550 Pomógł: 9 Dołączył: 29.05.2009 Skąd: Ostrów Wielkopolski Ostrzeżenie: (0%) ![]() ![]() |
Do katalogu "library" mam dowiązanie, coś na wzór:
Kod sudo ln -s /usr/share/php/libzend-framework-php/Zend /home/user/Zend/project/library/ , gdzie folder /home/user/Zend/project/ jest z twoim projektem; Teraz skopiowałem katalog Zend do katalogu aplikacji "library" jednak nie pomogło. Tutaj na skrinie widać strukturę moich katalogów http://yfrog.com/f/83zrzutekranuppap/ Po dodaniu zmian dostaję taki komunikat: Kod Warning: require_once(Zend/Application.php): failed to open stream: No such file or directory in /var/www/testy/public/index.php on line 22 Fatal error: require_once(): Failed opening required 'Zend/Application.php' (include_path='/var/www/testy/public/library:/var/www/testy/public/application/configs') in /var/www/testy/public/index.php on line 22 Mój plik index.php Kod <?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')); // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(dirname(__FILE__) . '/../library'), realpath(dirname(__FILE__) . '/../application'), get_include_path(), ))); $path = dirname($_SERVER['SCRIPT_FILENAME']); ini_set('include_path', $path . "/library:". $path . "/application/configs"); /** 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() ->ru W bootstrap.php zakomentowałem: Kod ;includePaths.library = APPLICATION_PATH "/../library" Coś musiałem namieszać z tymi PATH. ![]() Ten post edytował cykcykacz 19.08.2010, 17:35:45 |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 12.06.2025 - 10:47 |