views:

56

answers:

3

I'm on windows 7 with wamp and I don't know where to put the zend framework, as I know I need to change the path of the include_path but I don't know what should that be to work.

I get this error when I open the test files or anything withing the zend files:

Warning: require_once(PHPUnit/Framework.php)

[function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\zend\tests\TestHelper.php on line 26

Fatal error: require_once() [function.require]: Failed opening

required 'PHPUnit/Framework.php' (include_path='.;C:\php5\pear') in C:\wamp\www\zend\tests\TestHelper.php on line 26

+1  A: 

You can place the zend framework directory anywhere you like, it doesn't matter. Generally I place it in a common folder shared by all my projects.

As long as you add the path to the zend framework lib directory to your include path you are right. Anything outside the lib directory is for extra stuff and should not be included in your application - this seems to be where your problem lies.

balupton
I used this `set_include_path('.;C:\wamp\www\zend');` but doesn't works, the `zend` folder is the folder what I downloaded from the zend.com which includes `demos`, `documentations`, `library` and `test`
CIRK
I have also tried these path's too `'.;C:\wamp\www\zend\library'`, `'.;C:\wamp\www\zend\library\Zend'` this one is the exact folder what contains the library files. But still doesn't works :S
CIRK
You're right on the money with using `.;C:\wamp\www\zend\library`, but you should be using a colon `:` instead of the semicolon `;`. You may also want to take a look into the autoloading chapter: http://framework.zend.com/manual/en/zend.loader.html
balupton
Windows and Linux have a different seperator for the string in php.ini and set_include_path, ; on windows, : on linux. The constant PATH_SEPARATOR is set appropriately.
Alister Bulman
@Alister, Good point.
balupton
+2  A: 

It's failing to find PHPUnit/Framework.php, so it does not appear to be a Zend Framework issue. The question is: Where you have your PHPUnit files installed?

I see an include path that contains C:\php5\pear. Is the PHPUnit library there?

David Weinraub
I don't have any `php5` folder in `C:\` I don't know what is this, I've checked for hidden files too but nothing. :| and what is PHPUnit? Sry if this question is stupid :P
CIRK
Well, the fail error seems to occur in the file `tests/TestHelper.php`, a file that is sometimes used as a bootstrap file for unit testing. This is consistent with the observation that it the error occurs as it is attempting to find the file PHPUnit/Framework.php since PHPUnit is a (totally excellent!) unit-testing framework.So the question now becomes: What are you doing that is calling the file TestHelper.php?
David Weinraub
A: 

I'm using Zend Server Community Edition it's set include paths and has installed required pear packages by default.