A redirection or file access problem about Zend Framework

387 Views Asked by At

I'm beginner at Zend Framework. I have a php project with Zend 2.2.0 and PHP 5.2.4 but it cannot work truely.For ex at the staring point;

Failed opening required 'Zend_Loader_Autoloader.php' but this php file is exist.

And maybe a helper point about solving problem, when I try to access a file in our project like http://localhost/application/default/views/scripts/login/index.phtml the file opens but there is no access javascript file like default_login.js.(and a similar situation about *.gif files etc.)

Firebug prints: "http://localhost/application/default/views/scripts/login/%7B$VIRTUAL_DIR%7Dpublic/scripts/default_login.js" 404 not found.

However the correct url must be "http://localhost/public/scripts/default_login.js"

NOTE:The directory access permissions are ok, the problem is not that.

1

There are 1 best solutions below

3
On

If Zend_Loader_Autoloader is not found then I suspect the Zend Framework library is not in the include path or inaccessible (permissions). Also the 404 on .js and .gif files maybe down to your ModRewrite rules, have you changed the default .htaccess file at all?

edit : Pretty sure this is going to end up be not including the ZF library in the includes path. To check the include path use phpinfo() or just have a look at what is set in /public/index.php It defaults to

set_include_path(implode(PATH_SEPARATOR, array(
  realpath(APPLICATION_PATH . '/../library'),
  get_include_path(),
)));

I don't have my copy there as I installed using PEAR and it's already in my includes path