title: AWS SDK not found after setup using XAMPP and PEAR
body: <p>I'm trying to set up the AWS SDK for PHP on an EC2 instance, but I am having trouble getting the SDK to work. Just to note, I'm new to all AWS services, and I've only written PHP scripts, I've never configured it before. When I run the following script, I get "<strong>Fatal error</strong>: Class 'AmazonEC2' not found in <strong>/opt/lampp/htdocs/index.php</strong> on line 6":</p>
  
  <pre><code>require_once 'sdk.class.php';
  $ec2 = new AmazonEC2(); //Line 6
  </code></pre>
  
  <p>As far as I can tell, the AmazonEC2 class is in:</p>
  
  <pre><code>/opt/lampp/lib/php/AWSSDKforPHP/services/ec2.class.php
  </code></pre>
  
  <p>I followed this setup guide: <a href="http://aws.amazon.com/articles/PHP/4261" rel="nofollow">http://aws.amazon.com/articles/PHP/4261</a></p>
  
  <p>Here are some details:</p>
  
  <ul>
  <li>EC2 Instance: t1.Micro node of <code>Basic 32-bit Amazon Linux AMI 2010.11.1 Beta (AMI Id: ami-76f0061f)</code></li>
  <li>PHP is set up using XAMPP. Basically untar into /opt/lampp, where it is self contained.</li>
  <li>SDK installed using PEAR. Done with:
  <ul>
  <li>sudo /opt/lampp/bin/pear channel-discover pear.amazonwebservices.com</li>
  <li>sudo /opt/lampp/bin/pear install aws/sdk</li>
  </ul></li>
  </ul>
  
  <p>My path was set to ".:/opt/lampp/lib/php" by default. I tried adding ".:/opt/lampp/lib/php/AWSSDKforPHP" but that didn't work. I tried changing file permissions, but no dice.</p>
  
  <p>I've never used PEAR before, or XAMPP. Any ideas for how I can get the SDK working with PHP? I'm thinking it has to be just an include_path issue, but I'm not sure what to set it to work. (I reset apache after I change php.ini so that isn't the issue either).</p>
  
  <p>Here are some paths on my system:</p>
  
  <pre><code>/opt/lampp/lib/php/AWSSDKforPHP
  /opt/lampp/etc/php.ini
  /opt/lampp/htdocs/index.php
  /home/ec2-user/.aws/sdk/config.inc.php
  </code></pre>