0

Zend でテストアプリを作成し、オンライン (ovh 共有サーバー上) に配置しようとしました

オフラインで (WampServer を使用して) 実行していますが、オンラインでは実行していません。解決できないエラーは次のとおりです。

Warning: require_once(/library/Zend/loader/Autoloader.php) [function.require-once]:
failed to open stream: No such file or directory in 
/homez.483/<site>/www/files/<project>/index.php on line 22

Fatal error: require_once() [function.require]: Failed opening required 
'/library/Zend/loader/Autoloader.php' 
(include_path='.
:/homez.483/<site>/www/files/<project>/library
:/homez.483/<site>/www/files/<project>/application
:/homez.483/<site>/www/files/<project>/application/models
:/homez.483/<site>/www/files/<project>/application/forms
:.:/usr/local/lib/php') 
in /homez.483/<site>/www/files/<project>/index.php on line 22

これは、サーバーの www/files/project にある index.php の一部です。

// Definition de variable d'environnement
defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application/'));
defined('LIBRARY_PATH') || define('LIBRARY_PATH', realpath(dirname(__FILE__) . '/library/'));   
defined('MODELS_PATH') || define('MODELS_PATH', realpath(dirname(__FILE__) . '/application/models/'));  
defined('FORMS_PATH') || define('FORMS_PATH', realpath(dirname(__FILE__) . '/application/forms/')); 
defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : $applicationEnv));

// Mise en place des répertoires et chargement des classes
set_include_path('.'
. PATH_SEPARATOR . LIBRARY_PATH
. PATH_SEPARATOR . APPLICATION_PATH
. PATH_SEPARATOR . MODELS_PATH
. PATH_SEPARATOR . FORMS_PATH
. PATH_SEPARATOR . get_include_path());
require_once 'Zend/loader/Autoloader.php'; 
Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);

.htaccess は PHP5 と UrlRewriting を有効にしますが、何もする必要はありません...

# Config OVH
AddType x-mapp-php5 .php
SetEnv PHP_VER 5
SetEnv REGISTER_GLOBALS 0
SetEnv MAGIC_QUOTES 0
SetEnv SHORT_OPEN_TAG 1

# Règles de réécriture pour Zend Framework
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php
RewriteRule ^robots.txt$ robots.txt [L]

この問題を解決する方法はありますか? それはかなり明白だと思いますが、成功せずにウェブ上で見つかった多くの方法を調査しました.

ありがとう

4

1 に答える 1

1

サーバーのファイルシステムでは大文字と小文字が区別されます。

この行を変更

require_once 'Zend/loader/Autoloader.php';

require_once 'Zend/Loader/Autoloader.php';

ディレクトリは大文字のLoader「L」で始まります。

于 2012-02-29T12:38:07.067 に答える