4

when I try to run phpunit the only output is a question mark ?

benino@benino-VirtualBox:/$ phpunit
?benino@benino-VirtualBox:/$ 

benino@benino-VirtualBox:/$ phpunit --version
?benino@benino-VirtualBox:/$ 

I get the same output if I actually try to run a test.

I then downloaded the current version of phpunit as follows:

$ wget https://phar.phpunit.de/phpunit.phar
$ php phpunit.phar --version

The output of that last command is:

??r????

I have no idea what's wrong. running php 5.3.8 on Ubuntu

4
  • Have you tried it with the code version from composer or github? Maybe there's something wrong with the phar. I never saw a problem like that. Commented Oct 18, 2014 at 21:52
  • 2
    I am not positive but you may want to try adding detect_unicode = Off to your php.ini file. Had a very similar issue although it was with composer and not phpunit. Commented Nov 10, 2014 at 21:07
  • Had the same problem and this was the only post on the Internet about it. @mschuett suggestion actually fixed it for me also. Commented Nov 20, 2014 at 8:06
  • Support for PHP 5.3 ended on August 14, 2014. For security reasons consider an upgrade to PHP 5.6 or 5.5. It will solve your problems. Commented Nov 22, 2014 at 2:18

1 Answer 1

4

Just adding this as an answer since it looks like at least my solution helped one other person.

If you are running into this issue it is highly likely due to the version of php having dectect_unicode turned on. You can simply modify your php.ini file to have detect_unicode = Off and the output should be shown properly.

http://php.net/manual/en/ini.core.php#ini.zend.detect-unicode for more info.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.