re: PEAR is the installation incomplete

Reply

Join Date: Mar 2006
Posts: 11
Reputation: crws416 is an unknown quantity at this point 
Solved Threads: 0
crws416 crws416 is offline Offline
Newbie Poster

re: PEAR is the installation incomplete

 
0
  #1
Jun 11th, 2007
Hi all,

I'm having just a slight problem in that I have recently installed the PEAR unit, however when ever i try to use either;

fetchRow()
getRow()

I get the following error:

Fatal error: Call to undefined function fetchRow()

or

Fatal error: Call to undefined function getRow()

I assuming this mean that I have managed to balls up the install of PEAR. I would just like some confirmation, i am using the following tutorial script to test the PEAR unit (only showing the relevant part of the script).

  1. <?php
  2. require_once( "DB.php" );
  3. $dsn = 'mysql://root:password@localhost/time';
  4. $db =& DB::Connect( $dsn, array() );
  5. if (PEAR::isError($db)) { die($db->getMessage()); }
  6.  
  7. $res = $db->query( "SELECT id FROM users WHERE name=? AND password=MD5(?)", array( $_POST['user'], $_POST['password'] ) );
  8.  
  9. $row = array( null );
  10. if ( $res != null )
  11. $res->fetchInto( $row );
  12.  
  13. if ( $row[0] != null )
  14. {
  15.  
  16. session_start();
  17. $_SESSION['user'] = $row[0];
  18. header( "Location: welcome.php" );
  19. }
  20. else
  21. {
  22. header( "Location: index.php?bad=1" );
  23. }
  24. ?>

Cheers in advance
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 12
Reputation: netfreehost is an unknown quantity at this point 
Solved Threads: 0
netfreehost netfreehost is offline Offline
Newbie Poster

Re: PEAR is the installation incomplete

 
0
  #2
Jun 12th, 2007
You need to check if DB.php is in include path of php.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC