Error installing PHP using Web Platform Installer on Windows 10/IIS 10

I am developing an ASP MVC website… I have bought a plugin which uses PHP files and I want to use it within my site.

I am trying to install PHP 7.1.1 on Windows 10, IIS 10, using Web Platform Installer 5.0.

I am getting an error:

[error message]
I have already tried these:
1> set this key value to 8

.Net 3.5 installed and WCF TTP Activation is enabled for .Net Framework 3.

What’s the best way to get the PHP files working on my machine?


Source: stackoverflow-php

jQuery on/off don’t appear to be working

I have the following JavaScript/jQuery code. The intent is to have one handler run when hasVendorRelationship is true, and another handler run when it is false.

However, nothing seems to be working. In fact, neither handler appears to be called (no message is popped up) regardless of the value of hasVendorRelationship.

Can anyone see what I’m missing?

if (hasVendorRelationship) {
    $('ctl00_VIPER_Body_Body_EditEventPopUp_btnDelete').on('click', DeleteHasVendorRelationship);
    $('ctl00_VIPER_Body_Body_EditEventPopUp_btnDelete').off('click', DeleteNoVendorRelationship);
else {
    $('ctl00_VIPER_Body_Body_EditEventPopUp_btnDelete').off('click', DeleteHasVendorRelationship);
    $('ctl00_VIPER_Body_Body_EditEventPopUp_btnDelete').on('click', DeleteNoVendorRelationship);

function DeleteHasVendorRelationship() {
    alert('This event cannot be deleted because it is linked to one or more products that are pending or confirmed with one or more providers. You must cancel or release these products with providers before you can delete this event.');
    return false;

function DeleteNoVendorRelationship() {
    return confirm('<% string.Format("Are you sure you want to delete this event? The event will be deleted from the Costing, {0} and Event Schedule.", (Proposal.ProposalStage == ProposalStage.Operations) ? "Narrative" : "Proposal"); %>');

Source: stackoverflow-javascript

Firefox __doPostBack not receiving parameters

I am trying to postback a form from javascript.

i created the following

    function DoSomething() {
        __doPostBack('SomeArg', 'SomeVal');

Which works in chrome but not firefox.
To fix the firefox issues i added the following markup

<input type="submit" id="doAPostBack" name="doAPostBack" onclick="DoSomething();" value="Post" />

and then called it from JS as


Now this actually causes a post back but i fail to receive the response parameters


This is only an issue if the postback is triggered from JS, if i click on the button in the browser window then i get the parameter values as expected.

Whats the correct solution here?

Source: stackoverflow-javascript

Translating PHP http request into C# .NET

I have written this code in PHP to make a HTTP request to my server to retrieve my data:


$client_secret= '';
$data= array(

'email' => '**********',

'password' => '******',

'client_id' => '*******'



$signature_string = md5($json_data . $client_secret); 

$post_data = 'signature='.$signature_string.'&data='.urlencode($json_data);

$curl = curl_init($api_url); 
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1);

curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); 

curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);

curl_setopt($curl, CURLOPT_POST, 1); 

curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);

$result = curl_exec($curl); 




And this works good. Data is returned in JSON format. Now I’m trying to do exactly the same thing but in .NET

I have managed to recreate in .NET C# exactly the same postData parameter as in PHP, but I’m not sure how to pass it in C# with the request itself… So I’ve decided to use .NET’s restsharp library to make the request like this:

  public void GetResponse()
            string client_secret = "*****";

            var serializer = new JavaScriptSerializer();
            string json_data = serializer.Serialize(new { email = "*****", password = "*****", client_id = "*****" });

            var signature_string = CalculateMD5Hash(json_data + client_secret).ToLower();

            var postData = "signature=" + signature_string + "&data=" + Server.UrlEncode(json_data);
            var client = new RestClient("");
            var request = new RestRequest(Method.POST);
            request.AddHeader("content-type", "application/x-www-form-urlencoded");
            request.AddHeader("cache-control", "no-cache");
            request.AddParameter("application/x-www-form-urlencoded", "signature="+signature_string, ParameterType.RequestBody);
            request.AddParameter("application/x-www-form-urlencoded", "data=" +json_data, ParameterType.RequestBody);

            IRestResponse response = client.Execute(request);


Please note in C# and in PHP variables:



var postdata

are exactly identical. Now I just don’t know how to pass them alongside the request because the server always responds me that request data was empty..

What am I doing wrong here?

Source: stackoverflow-php