View Single Post
  #1  
Old 01-27-2013, 02:51 AM
Sindre Sindre is offline
Member
 
Join Date: Dec 2008
Posts: 31
Question [solved] Problem with SoapClient and LiteSpeed

Hello,

I am struggling with a strange problem. I have a script which makes a simple Soap request to my Magento API:

PHP Code:
try {
   
$proxy= new SoapClient($host.'/index.php/api/soap/?wsdl',array('exceptions' => 1,'trace' => 1,"connection_timeout" => 120));
   
$sessionId$proxy->login($apiuser$apikey);
   echo  
"Magento Api accessed Successfully.";
   echo 
"<br>Session Id is:"$sessionId;
} catch (
Exception $e) {
   echo 
"==> Error: ".$e->getMessage();

When I run this through a browser I get
Code:
SOAP-ERROR: Parsing WSDL: "Couldn't load from 'http://....../index.php/api/soap/index/wsdl/1/' : failed to load external entity "http://..../index.php/api/soap/index/wsdl/1/"
However, when I run it from the command line it works fine:
Code:
/usr/local/lsws/fcgi-bin/lsphp5 path_to_script
Magento Api accessed Successfully.<br>Session Id is: xxxx
It is the same lsphp5 binary that is configured in LiteSpeed LSAPI external app.

Any ideas? I am sort of out of ideas at the moment.

Last edited by NiteWave; 01-27-2013 at 05:47 PM..
Reply With Quote