Page 1 of 1

Include for PEAR db.php

PostPosted: 16. September 2007 22:26
by GeorgeR
Hello,
I am attempting to install a product and I receive the following error messages listed below.

How do I set XAMPP (1.6.2) on windows xp up so that it can find the PEAR modules?

I've been looking at the forums for hours and am either missing something or can not find the information.

Thanks

George

<br />
<b>Warning</b>: include_once(include/db.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in <b>C:\xampp\htdocs\b2\install\installxml.php</b> on line <b>54</b><br />
<br />
<b>Warning</b>: include_once() [<a href='function.include'>function.include</a>]: Failed opening 'include/db.php' for inclusion (include_path='.;C:\xampp\php\PEAR\:C:\xampp\htdocs\b2') in <b>C:\xampp\htdocs\b2\install\installxml.php</b> on line <b>54</b><br />
<br />
<b>Fatal error</b>: Class 'db' not found in <b>C:\xampp\htdocs\b2\install\installxml.php</b> on line <b>55</b><br />

PostPosted: 16. September 2007 23:12
by Wiedmann
How do I set XAMPP (1.6.2) on windows xp up so that it can find the PEAR modules?

That's working by default.

Warning: include_once(): Failed opening 'include/db.php' for inclusion

Your script is wrong. Like you can read in the manual for this class, the normal way to include this class is:
Code: Select all
require_once 'DB.php';

and not "include_once 'include/db.php';".

BTW:
Maybe your forum have it's own db-class and there is a directory missing in your forum installation?

made change and still same problem

PostPosted: 17. September 2007 13:37
by GeorgeR
<br />
<b>Warning</b>: require_once(DB.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in <b>C:\xampp\htdocs\b2\install\installxml.php</b> on line <b>55</b><br />
<br />
<b>Fatal error</b>: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'DB.php' (include_path='.;C:\xampp\php\PEAR:C:\xampp\htdocs\b2') in <b>C:\xampp\htdocs\b2\install\installxml.php</b> on line <b>55</b><br />

P.S. Why would I want to re-write a gpl product? Which is what you are asking me to do.

PostPosted: 17. September 2007 14:43
by Wiedmann
(include_path='.;C:\xampp\php\PEAR:C:\xampp\htdocs\b2')

There is an error in your include_path. The paths must be separated with a ";" and not with a ":"
-->
Code: Select all
include_path='.;C:\xampp\php\PEAR;C:\xampp\htdocs\b2'


P.S. Why would I want to re-write a gpl product?

I don't know. That was your question, how to use a PEAR package (in the correct way)...

Which is what you are asking me to do.

But as I wrote above... I also think, your forum software have it's own db-class and does not need a PEAR installation. Just correct the include_path. After this, the forum should also find its own include files.

(or just ask the forum support)