• roMancer
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
hi there,

we're using php_sforce_nusoap, and have been shocked by this line of code inside the package:

$this->client->forceEndpoint = str_replace("https", "http", $url);

(see php_sforce_nusoap/salesforce.php, function setURL($url))


we've modified the line like this:

 $this->client->forceEndpoint = $url;

and it still works.


sooo... question is:
why would they replace HTTPS by HTTP?
and why does it still work without the replacement?
which protocol does it use, after all?!
how secure is php_sforce_nusoap?!?!


any comments appreciated,
thanks in advance,

regards,
roMan

hi there,

we're using php_sforce_nusoap, and have been shocked by this line of code inside the package:

$this->client->forceEndpoint = str_replace("https", "http", $url);

(see php_sforce_nusoap/salesforce.php, function setURL($url))


we've modified the line like this:

 $this->client->forceEndpoint = $url;

and it still works.


sooo... question is:
why would they replace HTTPS by HTTP?
and why does it still work without the replacement?
which protocol does it use, after all?!
how secure is php_sforce_nusoap?!?!


any comments appreciated,
thanks in advance,

regards,
roMan

Hello again everyone....

I'm still having problems with php and its queries to salesforce... It always shows me a blank screen...

does anybody have a working code sample that does a short query to salesforce so that I can discover what's going wrong with my code?

Any help would be very useful.

Thank you

M
  • June 19, 2007
  • Like
  • 0
Hello, can anyone help me with this?

This code is not working very well...

until the second "Try" everything works well....
but, when I get to the query it doesn't even print the "NOT REACHING THIS PRINT!", print...

can anyone help me with this please?

<?php
 
require_once ('C:\Program Files\PHP\ext\soapclient\SforcePartnerClient.php');

try
{
    $mySforceConnection = new SforcePartnerClient();
    $mySoapClient = $mySforceConnection->createConnection("partner.wsdl.xml");
    $mylogin = $mySforceConnection->login("admin@*****.com", "******");
 
      print "Reaching this print";  
 
      $userResult = $mylogin->userInfo;
      print $userResult->userFullName.', your session id is '.$mylogin->sessionId;

}
catch (Exception $e)
{
  echo $e->faultstring;
}

try
{
   // $result = $sforce->query(array("queryString" => "select Id, FirstName, LastName from Lead where Lead.FirstName='Miguel'"));
   // print_r($result);
   $query =  "select Id from Lead where Lead.FirstName='Miguel'";
   $result = $sforce->query($query);
   print_r($result);
   print "NOT REACHING THIS PRINT!";

} catch (Exception $e)
{
    print_r($e);
}
?>
  • June 13, 2007
  • Like
  • 0