0

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.

Charles
  • 50,943
  • 13
  • 104
  • 142
volkan
  • 209
  • 4
  • 12
  • can you confirm what versions you are using 'Zend 1.7.6 and PHP 2.2.0' I'm asuming thats Zend Framework 1.7.6 but I have not idea what the PHP bit is refering to unless you're on a version of php thats over 10 years old! – piddl0r Apr 05 '11 at 09:24
  • @piddl0r, maybe that's the problem, he's trying to make ZF works with an old version of PHP : ) – Boris Guéry Apr 05 '11 at 09:46
  • So sorry about wrote wrong versions of php and zend.I edited with true version php 5.2.4 and zend 2.2.0. – volkan Apr 05 '11 at 10:48
  • Still a bit confused is that Zend Server 2.2.0? – piddl0r Apr 05 '11 at 11:13
  • using php -v : Zend Engine v2.2.0 may be wrong ? – volkan Apr 05 '11 at 11:17
  • Ah the engine :) That makes sense now, and it's not going to cause a problem afaik – piddl0r Apr 05 '11 at 11:20

1 Answers1

1

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

piddl0r
  • 2,431
  • 2
  • 23
  • 35