Getting error when Zend Cache module is used in php project -



Getting error when Zend Cache module is used in php project -

i using zend framework cache module in php project

my folder construction this

myproject *library *zend *cache *cache.php *tmp *index.php

then work.but if set index.php within new folder giving error

warning: require_once(zend/exception.php): failed open stream: no such file or directory in c:\xampp\htdocs\myproject\library\zend\cache\exception.php on line 25 fatal error: require_once(): failed opening required 'zend/exception.php' (include_path='.;c:\xampp\php\pear;c:\xampp\htdocs\myproject\library') in c:\xampp\htdocs\myproject\library\zend\cache\exception.php on line 25

you should consider 2 things here:

you should have c:\xampp\htdocs\myproject\library\zend\cache\exception.php (what volvox asked) check see how zend cache included in index.php. has relative path not cool.

i recommend have kind of root_dir or application_path constant , utilize constant relative path like:

define('application_path', 'c:\xampp\htdocs\myproject\'); include_once(application_path . 'library\zend\cache.php');

having index.php create possible move around project without problems

php zend-framework

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -