2

Each time I try to run tests with PHPStorm I get this error:

/usr/bin/php /private/var/folders/jl/34t9y2h94jsgchv4wfcxl6g80000gn/T/ide-phpunit.php -c app --configuration /Users/simonegentili/Sviluppo/web/wishventures/SendA/app/phpunit.xml.dist WishVentures\GeeftyApiBundle\Test\Controller\ApiControllerTest /Users/simonegentili/Sviluppo/web/wishventures/SendA/src/WishVentures/GeeftyApiBundle/Tests/Controller/ApiControllerTest.php
Testing started at 18:46 ...
dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib
  Referenced from: /usr/bin/php
  Reason: image not found

Process finished with exit code 133

I've found this question but

$ brew update && brew upgrade
$ brew reinstall php55

did not solve my troubles. Well, ... PHPStorm is looking for libpng15.15.dylib, but I've libpng16.16.dylib. I think is a broken link issue. How to solve it?


The reason was that I had two version of php installed on my computer. One reached via /usr/bin/php and another from /usr/local/bin/php. The first one was a link to php version 5.5.8 and the second one was 5.5.14

I sow that dyld (dynamic linker of Operating System) was looking for /usr/local/lib/libpng15.15.dylib (maybe called by php 5.5.8) but inside my /usr/local/lib/ there was not. In that folder, I got libpng16.16.dylib (I think ... because I've installed php55 via brew and this version oh php needs new version of libpng).

I undestood that my /usr/bin/php was a pointer to php 5.5.8. Instead, ... /usr/local/bin/php was 5.5.14. PHPStorm worked with /usr/bin/php that is default configuration. When I run php via console, I run /urs/local/bin/php.

Community
  • 1
  • 1
sensorario
  • 20,262
  • 30
  • 97
  • 159
  • 1
    Doesn't `php55` install in `/usr/local/bin` though? – Ja͢ck Jul 18 '14 at 17:09
  • Yes, ... I think the problem is in PHPStorm's phpunit. – sensorario Jul 18 '14 at 17:58
  • 1
    **1)** What PhpStorm has to do with libpng? If that library is loaded by your PHP (or your code).. why that is a PhpStorm issue? **2)** `/usr/bin/php` vs `/usr/local/bin` -- it's **you** who told PhpStorm to look for PHP in that folder (PHP interpreter has to be configured **manually** -- IDE does not do it for you automatically). So it **you** who needs to be blamed for the wrong path (if it's wrong, of course). – LazyOne Jul 18 '14 at 18:13
  • Sure, It's me. I don't understand /private/var/folders/jl/34t9y2h94jsgchv4wfcxl6g80000gn/T/ide-phpunit.php: now I am watching it. – sensorario Jul 18 '14 at 18:25
  • Thank you @LazyOne! My /usr/bin/php WAS a symbolic link to 5.5.8. /usr/local/bin/php 5.5.14. I have two version of php. o_O Now I have fixed the /urs/bin link. Now PHPStorm is working. – sensorario Jul 18 '14 at 18:48
  • *"I don't understand /private/var/folders/jl/34t9y2h94jsgchv4wfcxl6g80000gn/T/ide-phpunit.php"* This is helper/wrapper script used by PhpStorm to provide integration between running PHPUnit tests and actual IDE (custom code prints messages in special format which is understood by IDE instead of parsing native output). It is created in temp folder before executing tests and will be removed when tests are done (successful or not). – LazyOne Jul 18 '14 at 20:40
  • So, dear @LazyOne, ... my big issue is that I've a bad configured machine and sometimes I get some "strange" error. Today I've learned some new stuff. Thanks to you and google. – sensorario Jul 18 '14 at 20:42

0 Answers0