• jesusnoseq
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hello!

I have a problem with salesforce api for PHP. I can't connect.

I use XAMPP on windows 7 and free salesforce developer account..

 

 

The url:

https://127.0.0.1/sforce-php/prueba.php

 

The code:

<?php
define("USERNAME", "MyMailXXX@gmail.com");
define("PASSWORD", "My password XXX");
define("SECURITY_TOKEN", "The TOKEN XXX");
 
require_once ('soapclient/SforceEnterpriseClient.php');
 
$mySforceConnection = new SforceEnterpriseClient();
$mySforceConnection->createConnection("soapclient/enterprise.wsdl.xml");

$mySforceConnection->login(USERNAME, PASSWORD.SECURITY_TOKEN);

$query = "SELECT Id, FirstName, LastName, Phone from Contact";
$response = $mySforceConnection->query($query);
 
echo "Results of query '$query'<br/><br/>\n";
foreach ($response->records as $record) {
    echo $record->Id . ": " . $record->FirstName . " ".
        $record->LastName . " " . $record->Phone . "<br/>\n";
}
?>

 

The error message:

 

Warning: SoapClient::__doRequest() [soapclient.--dorequest]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\xampp\htdocs\sforce-php\soapclient\SforceBaseClient.php on line 159

Fatal error: Uncaught SoapFault exception: [HTTP] SSL support is not available in this build in C:\xampp\htdocs\sforce-php\soapclient\SforceBaseClient.php:159 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://login.s...', '', 1, 0) #1 C:\xampp\htdocs\sforce-php\soapclient\SforceBaseClient.php(159): SoapClient->__call('login', Array) #2 C:\xampp\htdocs\sforce-php\soapclient\SforceBaseClient.php(159): SoapClient->login(Array) #3 C:\xampp\htdocs\sforce-php\prueba.php(19): SforceBaseClient->login('MymailXXX@gmail.com', 'Password+TokenXXX') #4 {main} thrown in C:\xampp\htdocs\sforce-php\soapclient\SforceBaseClient.php on line 159

 And phpinfo()

 

 

 

 

I have no idea of the error...

 

Thanks,

Jesusnoseq.

 

Hello!

I have a problem with salesforce api for PHP. I can't connect.

I use XAMPP on windows 7 and free salesforce developer account..

 

 

The url:

https://127.0.0.1/sforce-php/prueba.php

 

The code:

<?php
define("USERNAME", "MyMailXXX@gmail.com");
define("PASSWORD", "My password XXX");
define("SECURITY_TOKEN", "The TOKEN XXX");
 
require_once ('soapclient/SforceEnterpriseClient.php');
 
$mySforceConnection = new SforceEnterpriseClient();
$mySforceConnection->createConnection("soapclient/enterprise.wsdl.xml");

$mySforceConnection->login(USERNAME, PASSWORD.SECURITY_TOKEN);

$query = "SELECT Id, FirstName, LastName, Phone from Contact";
$response = $mySforceConnection->query($query);
 
echo "Results of query '$query'<br/><br/>\n";
foreach ($response->records as $record) {
    echo $record->Id . ": " . $record->FirstName . " ".
        $record->LastName . " " . $record->Phone . "<br/>\n";
}
?>

 

The error message:

 

Warning: SoapClient::__doRequest() [soapclient.--dorequest]: Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in C:\xampp\htdocs\sforce-php\soapclient\SforceBaseClient.php on line 159

Fatal error: Uncaught SoapFault exception: [HTTP] SSL support is not available in this build in C:\xampp\htdocs\sforce-php\soapclient\SforceBaseClient.php:159 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://login.s...', '', 1, 0) #1 C:\xampp\htdocs\sforce-php\soapclient\SforceBaseClient.php(159): SoapClient->__call('login', Array) #2 C:\xampp\htdocs\sforce-php\soapclient\SforceBaseClient.php(159): SoapClient->login(Array) #3 C:\xampp\htdocs\sforce-php\prueba.php(19): SforceBaseClient->login('MymailXXX@gmail.com', 'Password+TokenXXX') #4 {main} thrown in C:\xampp\htdocs\sforce-php\soapclient\SforceBaseClient.php on line 159

 And phpinfo()

 

 

 

 

I have no idea of the error...

 

Thanks,

Jesusnoseq.