title: Assigning the return value of new by reference is deprecated in
body: <p>I'm new to PHP and Im playing around with some code to see what i can learn/do.  I have a simple little project where I am connecting to a mysql db and displaying the records of a table. </p>
  
  <p>When I put all my code in one file, everything runs smooth, as soon as I try to put a chunk of code in a separte PHP file and use an include or require_once I get the error Assigning the return value of new by reference is deprecated in...PEAR\config.php yadda yadda</p>
  
  <p>I've done some research and I understand that passing an object by reference (&amp;obj) is no longer acceptable in PHP 5, that's fine, but no where in my code do I have an ampersand, and again, it all works fine if it's all in the same .php file.  So i figure i might be doing something wrong with my includes or something.</p>
  
  <p>This is the file that 'does the work' that i am calling from my main page with a require_once </p>
  
  <pre><code>include '/config.php';
  // Open the database connection
  
  $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
  mysql_select_db($dbname);
  
          //Define and run the query
          $query = "SELECT * FROM wp_posts";
      $result = mysql_query($query);
  
      echo mysql_error();
  
          //Close the db connection
      mysql_close();
  
      echo "&lt;table&gt;&lt;tr&gt;&lt;td&gt;Post Title&lt;/td&gt;&lt;td&gt;Post Status&lt;/td&gt;&lt;td&gt;Post Date&lt;/td&gt;&lt;/tr&gt;";
  
          //Loop through result set and display data
  
          while($tdata=mysql_fetch_array($result))
          {
              echo "&lt;tr&gt;&lt;td&gt;$tdata[post_title]&lt;/td&gt;&lt;td&gt; $tdata[post_status]&lt;/td&gt;&lt;td&gt; $tdata[post_date]&lt;/td&gt;&lt;/tr&gt;";     // name class and mark will be printed with one line break
      }
  
          echo "&lt;/table&gt;";
  </code></pre>
  
  <p>Anyways, I know my code isn't beautiful, Im still trying to figure it all out.  Thanks for any help you can provide.</p>
  
  <p>Additional Information:
  Ok, I know I'm a complete noob on this include stuff, and i apologize.  Cant quite wrap my head around it all yet.  But here's some additional info.  Here is the full text of the error message I'm receving (NOTE: My code still runs and my table DOES still display)</p>
  
  <p>Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 80</p>
  
  <p>Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config.php on line 166</p>
  
  <p>Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Config\Container.php on line 111</p>
  
  <p>Again, I'm using netBeans as my IDE, so in my Netbeans i went to Tools-Options and went to PHP and set C:\xampp\php\PEAR as the Global include path (Whatever the heck that means, but nonetheless it seemed like a good idea).  </p>
  
  <p>I guess if my include path is set right (/xampp/php...) then why am I still receiving the error.  Grrr.  Thanks for all your help guys.</p>