title: cron job problem with soapclient included in php
body: <p>I have a php script, and need to run it everyday.  This script has a soapclient, and it works fine if I run it as a script using browser directly.  However, some fatal errors if I set it as a cron job.</p>
  
  <p>The script is very simple as "crontest.php"</p>
  
  <pre><code>&lt;?php 
  
  $mage_url = 'http://******.com/api/?wsdl'; 
  $mage_user = '*****'; 
  $mage_api_key = '******';
  
  $soap = new SoapClient( $mage_url ); 
  echo "success";
  
  exit;
  ?&gt;
  </code></pre>
  
  <p>And the cronjob I set is</p>
  
  <pre><code>0 8 * * * /usr/bin/php /home/duan/public_html/scripts/crontest.php
  </code></pre>
  
  <p>The error it gives is </p>
  
  <p><b>Fatal error</b>:  Class 'SoapClient' not found in <b>/home/duan/public_html/scripts/crontest.php</b></p>
  
  <p>It works fine if I remove line </p>
  
  <pre><code>$soap = new SoapClient( $mage_url );
  </code></pre>
  
  <p>Anyone can help?</p>