It seems that the PHP builds provided by Travis are misbehaving when trying to use chdir in combination with proc_open.
When you use chdir with a subdirectory of your repository and then try to execute a binary in that directory via proc_open the execution fails and you get a message like “sh: 1: ./your-script: not found” printed to stdout.
The same script executed with the same cwd via shell_exec works correctly (a test is included demonstrating this).
I’ve tested this across a range of different environments that I have access too and cannot replicate this behavior; as far as I can tell this seems to be travis-specific.
I’ve prepared the simplest test-case I can @ https://github.com/ptlis/travis-chdir-debug
An example failure can be viewed @ https://travis-ci.org/ptlis/travis-chdir-debug/jobs/555996627