phpunit command fails on MAMP.

Proposed resolution

According to comment #1, there is a workaround in place:
Comment out the following lines in /Applications/MAMP/Library/bin/envvars


Remaining tasks

Determine if fix is necessary.

Original report by msonnabaum

The error is this:

Warning: file_get_contents(~/sites/default/files/simpletest/phpunit-2.xml) [function.file-get-contents]: failed to open stream: No such file or directory in simpletest_phpunit_xml_to_rows() (line 733 of core/modules/simpletest/simpletest.module).
Exception: String could not be parsed as XML in SimpleXMLElement->__construct() (line 734 of ~/core/modules/simpletest/simpletest.module).

The issue is just that the phpunit command is failing.

I spent some time debugging it, and it looks like a MAMP bug, described in this issue:

If I change the exec line to this, it passes for me with MAMP:

  $ret = exec('export DYLD_LIBRARY_PATH="/usr/lib";' . join($command, " "));

I guess we could put a conditional in for MAMP and do that, but it doesn't feel great to me.


agentrickard’s picture

So MAMP users can account for this now by editing /Applications/MAMP/Library/bin/envvars and commenting out the following lines.


That will get people up and running until we determine if we want to fix this.

geerlingguy’s picture

Enough people use MAMP that it might be worth it. Otherwise, have some really easy to find documentation. This bug took at least an hour of troubleshooting over IRC to understand where it was coming from.

geerlingguy’s picture

The solution in #1 above works for me.

EclipseGc’s picture

Working for me with this fix too.

dcam’s picture contains instructions for updating the issue summary with the summary template.

The summary may need to be updated with information from comments.

thanhtek’s picture

Issue Summary Template has been added.

Mile23’s picture

I added MAMP's PHP binary to my path in ~/.profile:

export PATH=/Applications/MAMP/bin/php/php5.4.4/bin:[more path stuff here]

This means you can't use MAMP to change PHP versions, but if you really need to do that you can just alter your path settings.

catch’s picture

Priority:Major» Normal

Downgrading since this looks like a MAMP bug and there's already a workaround in the issue summary.

catch’s picture

Issue summary:View changes

Issue Summary Template

jhedstrom’s picture

Anything left to do here, or can this be closed out?

agentrickard’s picture

It can be closed. Documenting would be nice.