this is somewhat of a tricky question when it comes to "where should I place it?", but I assume a general problem behind it, which is why I am putting it on superUser.
I have a Doctrine script which is executed in a php file by calling:
exec('bin\doctrine.php.bat dbal:import import_data/mssql_data.sql'.' 2>&1', $output);
Since I am piping errors from STDERR to STDOUT and save it in $output, I get error messages.
Executing the script gives me:
php is not recognized as an internal or external command
Although I have added it to my system PATH variable:
(...)C:\Program Files\Microsoft\Web Platform Installer\;C:\PHP
C:\PHP is the correct path and doesn't contain a trailing "\" as mentioned here: php is not recognized as an internal or external command (windows 7).
Also, I can manually execute php scripts from CMD, using "php someFile.php", without problems. So I assume the PATH has been correctly adapted.
To be sure, I have also rebootet the machine with unchanged results.
I realize this could be a doctrine error, but since the error message looks like a general system problem, I hoped to find help here.
Currently I am kind of helpless and can only assume that, since the script is executed by php, it's running as the system user and thus doesn't get access to the PATH variable. But afaik this is only true for "normal" environment variables, since they are stored "per user". The PATH is a system variable and should thus be accessible by any user running the script, so it shouldn't matter. Correct?
The system is Windows Server 2012 R2.
Any suggestions and help are much appreciated!