Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP][Zend]Przeniesieni z windowsa na ubuntu.
cykcykacz
post
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.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
cykcykacz
post
Post #2





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;
}
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 27.12.2025 - 21:46