when i was trying ZF create project test. I got this error message.
Pls help me to correct this.
PHP Fatal error: Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/share/php/PHPUnit/Autoload.php on line 64
Fatal error: Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/share/php/PHPUnit/Autoload.php on line 64
from PHP Unit Installation instructions :
PHP_CodeCoverage, the library that is used by PHPUnit 3.5 to collect
and process code coverage information, depends on Xdebug 2.0.5 (or
later) but Xdebug 2.1.2 (or later) is highly recommended.
So you need to install it using PEAR , so either install PEAR or update your existing pear installation and do these commands to install PHP_CodeCoverage
pear config-set auto_discover 1
pear install pear.phpunit.de/PHP_CodeCoverage
Related
I've tried to install SOAP::Lite from the Active State's repository but it
gave the following error:
ppm install SOAP-Lite
ppm install failed: Can't find any package that provides SOAP-Lite
I read somewhere on Apache dependency but not sure if that is correct. I am using perl version 5.26.3 on windows 7
Regards
I am migrating to a new computer moving from snow leopard to lion at the same time. phpunit did not seem to make the migration, so I have reinstalled it. However the standard install with pear seems to not work with my home brew install of php. Here is the error:
phpunit
PHP Warning: require(/usr/lib/php/PHPUnit/Autoload.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 43
Warning: require(/usr/lib/php/PHPUnit/Autoload.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 43
PHP Fatal error: require(): Failed opening required '/usr/lib/php/PHPUnit/Autoload.php' (include_path='.:/Users/bimemployee/pear/share/pear:/usr/lib/php') in /usr/bin/phpunit on line 43
Fatal error: require(): Failed opening required '/usr/lib/php/PHPUnit/Autoload.php' (include_path='.:/Users/bimemployee/pear/share/pear:/usr/lib/php') in /usr/bin/phpunit on line 43
I have my computer setup with my main /etc/php.ini file as a symlink to the home brew php.ini file at /usr/local/etc/php.ini this contains my include path which seems to be working.
php -r 'foreach (explode(":", get_include_path()) as $path) echo $path . PHP_EOL;'
No log handling enabled - turning on stderr logging
Cannot find module (LM-SENSORS-MIB): At line 0 in (none)
.
/Users/bimemployee/pear/share/pear
/usr/lib/php
I am also setting up php to work with the homebrew version via the .bash_profile file.
export PATH="$(brew --prefix)/bin:$PATH"
which php
/usr/local/bin/php
which phpunit
/usr/bin/phpunit
Thanks for any help.
-Cory
Maybe you don't have the latest version or the full phpunit installation. You need to install all dependencies using --alldeps
So you should install phpunit like this:
pear channel-discover pear.symfony.com # for Yaml dependency
pear channel-discover pear.phpunit.de
pear install --alldeps phpunit/PHPUnit
This work for me ;)
The problem you having might be connected with your include_path, actual (real) php lib directory and with brew link command.
Brew installs php lib into Cellar directory and than links (brew link) all existing resources to /usr/local/lib/php (or /usr/lib/php - depending on your installation).
The problem is File.php and File/ appears in Cellar php lib after linking process (probably after pear update/upgrade). That means it will be not linked in /usr/local/lib/php.
To fix it you can simply brew unlink and brew link again.
Additionally it would be good to set your pear php_dir to /usr/local/lib/php. This way all new pear modules will be installed in correct destination without linking process. This makes nice separation between custom Pear modules and PHP lib itself.
You need to set your php include path in php.ini so that it includes the PEAR directory where PHPUnit lives.
include_path = ".:/Applications/MAMP/bin/php/php5.3.6/lib/php:"
You may need to search for Autoload.php using spotlight to find the right location.
I have tried to install the mbstring module for PHP. I have entered the below commands:
yum install php-mbstring
/usr/local/apache/bin/apachectl restart
Module is now installed but the errors has not dissapeared.
Fatal error: Call to undefined function mb_send_mail()
In my phpinfo(), "mbstring" doesn't exist...
OS: centos 6
PHP: 5.3.8
How did you install PHP on your system? The PHP version currently supported via YUM install is 5.3.3, but you said your PHP version is 5.3.8 which leads me to believe that you may have compiled PHP manually. If so, you will have to recompile with the --enable-mbstring flag.
I am trying to install distcc 3.1 on one of the Sun Solaris platform.
After extracting the files to a folder I run configure (script which basically checks the required configuration).
This script throws out the following error
make: Fatal error in reader: Makefile, line 471: Unexpected end of line seen
after this if I run make or make install command I get another error and I am not able to proceed with the installation. Please help me with the correct installation process or guide me on how to resolve this Make issue.
this error occurs when the version of distcc installed is not compatible with your O.S. Install the package again this time for your own OS. Example - I installed distcc 2.13 for solaris 9 from www.sunfreeware.com.
I hope this helps !!
Thanks
I'm trying to install the following ruby gem on my mac:
http://www.sinatrarb.com/intro.html
I get the following message:
michael-rosarios-macbook:bin michaelrosario1$ mono ir.exe igem sinatra
ERROR: While executing gem ... (RuntimeError)
Unknown command sinatra
michael-rosarios-macbook:bin michaelrosario1$
Can someone more familiar with Ruby/IronRuby help me out?
It appears that I had missed an argument installing sinatra:
michael-rosarios-macbook:bin michaelrosario1$ mono ir.exe igem install sinatra
Successfully installed rack-1.0.0
Successfully installed sinatra-0.9.4
2 gems installed
Installing ri documentation for rack-1.0.0...
Installing ri documentation for sinatra-0.9.4...
Installing RDoc documentation for rack-1.0.0...
Installing RDoc documentation for sinatra-0.9.4...
I'm now experiencing issues with writing a "hello world" example using Sinatra. This is probably related to Shay's comment. Any other thoughts!?
First thing - I'm not familiar with mono, but on Windows I would execute "igem sinatra" without ir before that. Maybe that's the problem?
Anyways, if you're having troubles installing the gem using igem, try MRI gem installer instead.
After that you'll be able to use it via IronRuby with a tiny tweak.
On your ruby file add the next line:
$LOAD_PATH << path_to_mri_gems_folder
where path_to_mri_gems_folder would be the full path to the MRI gems folder.
After this line require sinatra.
There is also a patch of the IronRuby team for Sinatra, I'm not sure if it's still needed:
http://www.ironruby.net/Documentation/Real_Ruby_Applications/Sinatra
Shay.