943,878 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1377
  • PHP RSS
Jun 11th, 2007
0

re: PEAR is the installation incomplete

Expand Post »
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).

PHP Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
crws416 is offline Offline
11 posts
since Mar 2006
Jun 12th, 2007
0

Re: PEAR is the installation incomplete

You need to check if DB.php is in include path of php.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
netfreehost is offline Offline
12 posts
since Nov 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: like php but have windows xp home
Next Thread in PHP Forum Timeline: email





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC