need to setup extension dir to current build instead of defaulting to system defaults (which may be different php version) also use preprocessed PHP.INI from test framework --- php-5.4.0alpha3/ext/pcntl/tests/pcntl_exec.phpt 2011-06-24 22:18:06.000000000 +0300 +++ php-5.4.0alpha3/ext/pcntl/tests/pcntl_exec.phpt 2011-08-22 09:36:01.105334996 +0300 @@ -8,7 +8,10 @@ --FILE-- --EXPECT-- --- php-5.4.0alpha3/ext/pcntl/tests/pcntl_exec_2.phpt~ 2011-06-24 22:18:06.000000000 +0300 +++ php-5.4.0alpha3/ext/pcntl/tests/pcntl_exec_2.phpt 2011-08-22 19:57:12.780576314 +0300 @@ -14,7 +14,13 @@ exit; } echo "ok\n"; -pcntl_exec(getenv("TEST_PHP_EXECUTABLE"), array(__FILE__), array( + +$php = getenv("TEST_PHP_EXECUTABLE"); +$extension_dir = ini_get("extension_dir"); +$inipath = php_ini_loaded_file(); +$args = array("-n", "-d$extension_dir", "-c$inipath", __FILE__); + +pcntl_exec($php, $args, array( b"PCNTL_EXEC_TEST_IS_CHILD" => b"1", b"FOO" => b"BAR", 1 => b"long")