Console application object crash

The problem is:

Windows 7 x64, Apache 2.4 x64, PHP 5.6.9 x64

Console application runs fine while executed from command line.

But while I try to spawn a background process with:

exec("C:\PHP569\php.exe C:/sites/app/yii \"module/controller/action\" >> c:/sites/app/runtime/log.log &");

the application fails - actually I can see the last command executed is:

$application = new yii\console\Application($config);

(this is in the "yii" console bootstrap file in the application root folder)

PHP quits here silently.

Any idea what is going wrong???

Ok, I’ve got it - there was error reporting switch deep in configuration files. While I turned error reporting on I found that while console is run as an Apache spawn (F-CGI) process, it does not have access to Windows environment variables and consequently Yii missed necessary DB configuration.