We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,530 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Adodb on Xampp

Hi...

I am using xampp-win32-1.7.3.I want to use Adodb.I had seen that adodb is included on xampp package(xampp/php/pear/adodb).I had used the following code to retrieve data from mysql database.

<?php
include("adodb.inc.php");
$db = NewADOConnection('mysql');
$db->Connect("localhost", "root", "", "emp");
$result = $db->Execute("SELECT * FROM employ");
if ($result === false) die("failed");
    while (!$result->EOF) {
       for ($i=0, $max=$result->FieldCount(); $i < $max; $i++)
              print $result->fields[$i].' ';
       $result->MoveNext();
   print "<br>n";
}
 ?>

It displays the following error messages

Warning: include(adodb.inc.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\divya\adodb\adodbex.php on line 2

Warning: include() [function.include]: Failed opening 'adodb.inc.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\divya\adodb\adodbex.php on line 2

Fatal error: Call to undefined function NewADOConnection() in C:\xampp\htdocs\divya\adodb\adodbex.php on line 3

I had included the path of adodb onto php.ini.


include_path = ".;C:\xampp\php\PEAR;C:\xampp\php\PEAR\adodb"

Pear package is working properly...I didn't see any installation file for adodb..
Please help me .....
Thanks...

3
Contributors
3
Replies
2 Years
Discussion Span
3 Months Ago
Last Updated
4
Views
Question
Answered
divyakrishnan
Posting Whiz in Training
235 posts since May 2010
Reputation Points: 30
Solved Threads: 24
Skill Endorsements: 1

Hi,

As you are using the built in PEAR php class, you need to give an absolute path of the class.
Change this instead of the first line,

include("adodb/adodb.inc.php");

For your info,
adodb

paulrajj
Junior Poster
102 posts since Mar 2010
Reputation Points: 17
Solved Threads: 38
Skill Endorsements: 0

Now it is working....Thank You Very Much..

divyakrishnan
Posting Whiz in Training
235 posts since May 2010
Reputation Points: 30
Solved Threads: 24
Skill Endorsements: 1
Question Answered as of 2 Years Ago by paulrajj

Please provide detailed guidance

son.anh.963
Newbie Poster
1 post since Jan 2013
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0608 seconds using 2.65MB