I am running PHP 5.3.8 non-thread-safe version with IIS 7 on windows server 2008 . I have the following code
<?php
echo "Started..<br/>";
$outStr = "";
$stack = new DOTNET("mscorlib", "System.Collections.Stack");
$stack->Push(".Net");
$stack->Push("Hello ");
echo $stack->Pop() . $stack->Pop();
echo "<br/>".$_SERVER['REQUEST_TIME']."<br/>";
?>
It will crash every other time ( work , crash , work , crash, …. etc ).
The error reported to the web browser is :
HTTP Error 500.0 – Internal Server Error
c:\php\php-cgi.exe – The FastCGI process exited unexpectedly
I tried other .net assemblies (I wrote with C#) and get the same crashing behaviour (every other time).
Please help.
I am using .net 4 . In my c:\php directory I have a php-cgi.exe.config file as follow:
<?xml version="1.0"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
But even with .net 3.5 I get the same crashing behaviour.
If I run the php script in command line as follow , it seems to work everytimes, but I really need my php web app to work without crashes ( I have NO php.exe.config .. none )
\php\php.exe testscript.php
This behaviour appears to be a known bug:
https://bugs.php.net/bug.php?id=53140&edit=1