I created a simple and small webserver for only handling GET requests. I also wanted to add PHP support and also managed it. But there is one problem:
Everytime I try to call phpinfo() inside a .php file my server stops at "WaitForExit" Process.
class FastPHP
{
private string _phpPath = @"C:\\Program Files (x86)\\PHP\\php-cgi.exe";
Process p;
public FastPHP(string filename)
{
p = new Process();
p.StartInfo.FileName = this._phpPath;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.Arguments = "-q \""+filename+"\"";
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.UseShellExecute = false;
}
public string getPHPOutput()
{
p.Start();
p.WaitForExit();
string sOutput = p.StandardOutput.ReadToEnd();
p.Close();
return sOutput;
}
}
my PHP.ini settings should be fine, I adapted everything for fastcgi use. Any Ideas how to fix this problem?