3

Trying to get PHPUnit to work on a new install of Mac OS X Mountain Lion.

After installed Pear and fixed various missing PATH variables, I installed the PHPUnit package.

However, when I try to run phpunit from the command line, I get:

PHP Fatal error:  require_once(): Failed opening required 'File/Iterator/Autoload.php' (include_path='.;/Users/shill/pear/share/pear') in /User
s/shill/pear/share/pear/PHPUnit/Autoload.php on line 64

Line 64 contains

require_once 'File/Iterator/Autoload.php';

I checked that this file exists, in /Users/shill/pear/share/pear

It does contain a folder named "File/Iterator/Autoload.php" - so that is puzzling.

I checked that php.ini in etc/ contains an include_path to the Pear directory, to see if that was the problem. In the process I discovered that php is complaining of

> PHP Warning:  PHP Startup: Unable to load dynamic library
> '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_curl.dll' -
> dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_curl.dll,
> 9): image not found in Unknown on line 0

Yet there is no such uncommented out line in my ini file.

I researched all of these, and it looks like this is a common problem but I was unable to find a fix.

metalaureate
  • 7,572
  • 9
  • 54
  • 93
  • try to look at `var_dump(get_include_path());`, `phpinfo()` – sectus Apr 07 '13 at 02:13
  • That produces PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_curl.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_curl.dll, 9): image not found in Unknown on line 0 string(30) ".;/Users/shill/pear/share/pear" – metalaureate Apr 07 '13 at 18:37
  • I fixed the PHP Warning - I had a .dll extension uncommented when this is a Mac. This just leaves me with the PHPUnit error. – metalaureate Apr 07 '13 at 19:23
  • duplicate http://stackoverflow.com/questions/8700642/fatal-error-file-iterator-autoload-php-not-found-when-running-phpunit – Saket Patel Apr 13 '13 at 20:18

0 Answers0