• smozgur
  • NEWBIE
  • 5 Points
  • Member since 2007

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

Hi,

My problem is
Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in /***/soapclient/SforceBaseClient.php:113
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'https://www.sal...', '', 1, 0)
#1 [internal function]: SoapClient->__call('login', Array)
#2 /***/soapclient/SforceBaseClient.php(113): SoapClient->login(Array)
#3 /***/test.php(7): SforceBaseClient->login('username@domain...', 'mypassword')
#4 {main} thrown in /***/soapclient/SforceBaseClient.php on line 113

Settings:
Apache/1.3.37 (Unix)
PHP 5.2.1

curl
cURL support  enabled 
cURL Information  libcurl/7.16.1 OpenSSL/0.9.7e zlib/1.2.3 

openssl
OpenSSL support  enabled 
OpenSSL Version  OpenSSL 0.9.7e-p1 25 Oct 2004 

soap
Soap Client  enabled 
Soap Server  enabled 
Directives
soap.wsdl_cache 1
soap.wsdl_cache_dir /tmp
soap.wsdl_cache_enabled 1
soap.wsdl_cache_limit 5
soap.wsdl_cache_ttl 86400

php.ini
allow_url_fopen = On

Same script is working from my local computer (apache 2.2, php 5.2.3 on windows) with exactly same settings.
I don't see any requirement about Apache version as long as PHP 5 works but it is the only difference beside windows - unix?

Thanks for helping!

Suat

If I run this query via sforce Explorer:
 
Select Id, AccountID, LastName from Contact where email = 'username@domain.com'
 
I get data output for all fields, as expected.
 
However, if I run the same query via the API (see below), I get output for all fields except for the AccountID.  The value for this field is blank.

 
   $queryResult = $sfdc->query("select AccountID, id, FirstName, LastName from Contact where email = '$emaillogin'");
$record = $queryResult['records'];
 // getting the record pointer 
 $sfrecordid = $record->id;
// all of these will output except for accountid
$values = $record->values;
$firstname = $values['FirstName'];
$lastname = $values['LastName'];
 $accountid = $values['AccountID'];

  
Thanks for any suggestions!
 
Chuck