views:

207

answers:

2

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 aboel to find;

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

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

+2  A: 

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.

Yacoby
+1  A: 

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 ?

Pascal MARTIN
The answer is: (Without the "Zend" part)
rtacconi
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).
rtacconi