views:

334

answers:

1

it's all in index.php

/* Define site root */
defined('DOCUMENT_ROOT') ? null : define('DOCUMENT_ROOT',realpath(dirname(__FILE__)));
defined('SITE_ROOT') ? null : define('SITE_ROOT',realpath(dirname(DOCUMENT_ROOT.'../')));


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


$includePath[] = '.';
$includePath[] = SITE_ROOT . '/library';
$includePath[] = get_include_path();
$includePath = implode(PATH_SEPARATOR,$includePath);
set_include_path($includePath);

require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();

 /* Adding action helpers path */
 Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers','Helper');

 $application->bootstrap()
    ->run();

Getting those error and a lot more with wrong paths to bundled ZF helpers, what's wrong?

/* Setting decorators path and prefix for form and it's elements */ $form->addElementPrefixPath('Form', SITE_ROOT . '/library/form/decorators', 'decorator'); // prefix, path, type /* Setting additional validators */ $form->addElementPrefixPath('Form', SITE_ROOT . '/library/form/validators', 'validate'); // prefi, path, type

 [2] fopen(/var/www/vhosts/blabla.com/httpdocs/application/controllers/helpers/ViewRenderer.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 
  [2] fopen(/var/www/vhosts/blabla.com/httpdocs/library/form/validators/NotEmpty.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 
  [2] fopen(/var/www/vhosts/blabla.com/httpdocs/library/form/validators/InArray.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 
  [2] fopen(/var/www/vhosts/blabla.com/httpdocs/library/form/validators/NotEmpty.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 
  [2] fopen(/var/www/vhosts/blabla.com/httpdocs/library/form/validators/InArray.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 
  [2] fopen(/var/www/vhosts/blabla.com/httpdocs/library/form/validators/InArray.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 
  [2] fopen(/var/www/vhosts/blabla.com/httpdocs/library/form/validators/NotEmpty.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 
  [2] fopen(/var/www/vhosts/blabla.com/httpdocs/library/form/validators/NotEmpty.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 
  [2] fopen(/var/www/vhosts/blabla.com/httpdocs/library/form/validators/InArray.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 
  [2] fopen(/var/www/vhosts/blabla.com/httpdocs/library/form/validators/NotEmpty.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 
  [2] fopen(/var/www/vhosts/blabla.com/httpdocs/library/form/validators/NotEmpty.php) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: No such file or directory 
  in file: /var/www/vhosts/blabla.com/httpdocs/library/Zend/Loader.php 
  on line: 165 

Bundled with ZF validators are located here:

library/Zend/Validate/InArray.php for example

What's wrong with autoloader then?

+1  A: 

Remove realpath from the defines and debug the paths which you define are correct.

This seems wired:

realpath(dirname(DOCUMENT_ROOT.'../'));

shouldn't it be:

realpath(dirname(dirname(DOCUMENT_ROOT)')));

or:

realpath(dirname(('/../'.DOCUMENT_ROOT)'));

Also, double chceck the file permissions.

takeshin