tags:

views:

858

answers:

4

I recently installed phpunit on my server via the pear installer.

When I go to run a test I get the following error:

PHP Warning:  require_once(PHPUnit/Util/Filter.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 44

PHP Fatal error:  require_once(): Failed opening required 'PHPUnit/Util/Filter.php' (include_path='.:/usr/bin/php') in /usr/bin/phpunit on line 44

After doing some searching, I tried making some modifications to the include_path in my php.ini file on the server. But that hasn't done a thing.

Any idea what might be causing this?

A: 

(include_path='.:/usr/bin/php')

Are you sure you added it to the include_path?

It might also help if we saw your ini file, and the include_path snippet in it...

meder
Yeah, I've tried that path and several others. The comments here are limited to 600 characters so I'm not sure how I would show you my ini file. include_path = " .:/usr/bin/php"
/usr/bin is where executables live, not libraries.
Alister Bulman
+2  A: 

If it is the first time you are using PEAR, perhaps you have not configured the include path right. Take a look at the appropriate section in the PEAR manual.

jeroen
A: 

I found it!

Looks like PEAR installed PHPUnit in /usr/share/pear. Not sure why but that's where it is. Must be a (mt) thing.

Anyway, I'm all set. Thanks for the help.

+1  A: 

This is also what happens if you have an out-of-date or incomplete PHPUnit install. Please be aware that after you set up PEAR, you must add the PHPUnit.de channel in order to get an up-to-date package.

Josh Koenig