I have a simple php script that is runs via cli to start OpenVPN:
$system_string = "openvpn --config C:\\openvpn-config\\" . $config_file;
exec($system_string,$return_var);
file_put_contents('myfile.txt',$return_var);
The openvpn process starts with no issues (the openvpn console pops up in a separate window) but the output of the exec() is not getting saved to the file. In other words, the handle is not being returned back to the calling php script once the openvpn service starts. If I close the openvpn interface the php script continues though. I am on windows so pcntl is not an option unfortunately.
Any suggestions on how I can continue running the php scipt after starting the openvpn process?