0

I have this statement:

set_include_path('/sites/intranet/includes/Zend' . PATH_SEPARATOR . get_include_path());

but when I try to use the Acl library it seems that is not able to find the file;

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

The path is really included in the path, I have printed it. Any idea?

2 Answers 2

3

If "Zend" is in your require_once instruction, you probably don't have to put it in your include_path too.

If your directories look like this :

/sites/intranet/includes/Zend/Acl/Resource/Interface.php

Your include_path should probably be :

set_include_path('/sites/intranet/includes' . PATH_SEPARATOR . get_include_path());

(Without the "Zend" part)


As a sidenote : why are you not using the autoloader ?

Sign up to request clarification or add additional context in comments.

2 Comments

The answer is: (Without the "Zend" part)
I am using ZF just for Acl and I not interested in ZF at all. I have an intranet build with Qcodo framework but I hope to rewrite everyting in Rails or write new modules in Rails and un PHP, Qcodo and ZF as less as possible. Hopefully PHP 5.3 has namespaces as other more serious languages (but the syntax is rubish... they use the slash \ blahhh).
2

Maybe it is because you already has /Zend in the include path? So either do this

set_include_path('/sites/intranet/includes' . PATH_SEPARATOR . get_include_path());

or

require_once 'Acl/Resource/Interface.php';

Due to the zend frameworks autoloader, the first one is recommended.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.