2
votes

Im trying to use the Zend Frameworks ACL library in my code (in codeigniter) and after including the library in my controller I get this error:

Fatal error: Cannot redeclare class Zend_Acl in C:\xampp\php\PEAR\Zend\Acl.php on line 48

If I remove the include to the Zend library I get this error instead

Fatal error: Class 'Zend_Acl' not found in C:\xampp\htdocs\ISU-Cart\system\application\libraries\acl.php on line 3

Any help on this?

3

3 Answers

1
votes

I fixed this by going into all of the files I had and changing the

require_once 'Zend/Acl/Resource/Interface.php';

to

require_once BASEPATH .'libraries/Zend/Acl/Resource/Interface.php';

1
votes

This is what is in my index.php file

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

Notice the library instead of libraries. Maybe that's your issue.

0
votes

I rename the folder ZEND into C:\xampp\php\PEAR to "_ZEND" and now works fine...

Good Good.