I use this code in the 3.4 without any problems.
Now updating to 3.5 it gives this error “500 Internal Error”.
As it worked on 3.4 I don’t think is a problem with the PHP code.
What changed to the WWW class that could give this error?
var URLLogin : String = "http://xxx.xxx.x.x/example.php";
var form = new WWWForm();
form.AddField( "usuario",usuario);
form.AddField( "senha",senha);
getLogin = WWW(URLLogin, form);
yield getLogin;
if (getLogin.error != null)
{
print(getLogin.error);
}
else
{
Debug.Log(getLogin.text);
}
A 5xx HTTP-Error code indicates that there is a problem on the server, not on the client. So why don’t you check your server’s logs? They should tell you what is going wrong here.
I also has the 500 internal server error, but I was no able to modify the PHP.ini or the Apache configuration.
Finally I fix it creating a .htaccess file in the folder where my upload.php is located. With the following instructions:
####################################################
<IfModule mod_security.c>
<Files upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
#####################################################