473,624 Members | 2,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

php5 PEAR error on test scripts

1 New Member
This is being installed on WindowsXP home edition.

I am a complete novice at working with php and have just installed apache2_2, php5, mySQL5.0 and phpMyAdmin 2.10.1. After installing all 4 programs following the instructions from http://www.semtopia.com/?p=28 it tells you to create a file called testpear.php to test your pear install when working with MySQL and PHP. The file I was to create contains this information:
<?php

require_once 'DB.php';
PEAR::setErrorH andling(PEAR_ER ROR_DIE);

$db_host = 'localhost';
$db_user = 'root';
$db_pass = 'isnot14me';
$db_name = 'dataBase_name' ;
$dsn = "mysql://$db_user;$db_pa ss@unix+$db_hos t/$db_name";
$db = DB::connect($ds n);
$db->setFetchMode(D B_FETCHMODE_OBJ ECT);
?>

When I bring it up in a browser these are the errors that I get:
Warning: require_once(DB .php) [function.requir e-once]: failed to open stream: No such file or directory in C:\webs\test\te stpear.php on line 3

Fatal error: require_once() [function.requir e]: Failed opening required 'DB.php' (include_path=' .;C:\php\PEAR') in C:\webs\test\te stpear.php on line 3

Being a novice at this I have no idea what this means and the only real answer I found was in a language I could not understand. Could you please help me out. Normally I would not ask for help but I am on a deadline for a school project and really need to figure this out. Everything else appears to be fine installation and test-wise with the exception of this test.

Any help you could provide would be appreciated.
Jun 5 '07 #1
2 2924
epots9
1,351 Recognized Expert Top Contributor
what "require_on ce" does is open a file and places that whole files into the file that is calling it, this is useful when more than one page performs the same task as another page.

so, in your code u are telling your php script to open another script called DB.php, since u haven't made one it is complaning.
Jun 5 '07 #2
Motoma
3,237 Recognized Expert Specialist
Is DB.php in the C:\php\PEAR folder? If not then this is your problem.
Jun 5 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
3684
by: Christoph Nothdurfter | last post by:
Hallo! I was wondering if my PHP4-Scripts will run under PHP5 (Haeven't tried the beta yet). Does anybody know? Thank you, -Christoph
0
1550
by: Joe | last post by:
I have just upgrade to php5 and installed pear with gopear.bat on my windows installation. Problem: I get this error when i try to run my cli scripts: Fatal error: main(): Failed opening required 'DB.php' (include_path='.;C:\php5\p ear') in d:\web\cmd_drawings.php on line 5
4
5832
by: badbetty | last post by:
Dear Googlers I have installed PHP5 to run on WinXP against Apache 2. It works! ie. I have tested a few simple scripts and a basic xml document parse. I now want to try the XSL extension so I can transform xml docs. Having copied the php_xsl.dll to a directory where it can be found and done the uncommenting in php.ini, it still will not work. The script I
0
4087
by: Henrik Brautaset Aronsen | last post by:
I am having problems converting from Pear SOAP to PHP5 SOAP, especially when it comes to complex types. I would be grateful for any help on how this should be translated: require_once("SOAP/Client.php"); $wsdlurl = "http://myserver/myservices/mypage.php?wsdl"; $wsdl = new SOAP_WSDL($wsdlurl, array("timeout" => 360));
0
1671
by: Yarco | last post by:
I have just installed phpdocumentor on using: pear.bat install phpdocumentor-beta to suitable my php version. Then i create a test file "test.php" to have a trial. But the result is: E:\yarco\workshop\web\php>phpdoc.bat -f test.php -pp on -s on -o HTML:frames:default -t test
2
1305
by: awebguynow | last post by:
latest PEAR on W32, refers to PHP5 inaccurately. I've seen posts regarding path's that get messed up, by lost ini's or registry settings. I don't think that's my case, because I can't find PHP5 in registry or any left-over ini's. This is a new PC that I use on the weekends mostly. The latest Pear version 1.4.5-I believe, also seems to have changed (written over) include_path and extension_dir settings of php.ini changing them to ...
4
2126
by: awebguynow | last post by:
Re: only got "pear.old_bat" I had a previous post ".. Upgrade Methods ..." and so far I've gotten around most thorny issues, including patching php5.1.4 with php5apache2_2.dll so I can run it as module with Apache2.2.3 I need a educated response from a PEAR developer, if possible My 1st run go-pear died because I exceeded "maximum execution time" while researching the 1st ?
19
2357
by: McKirahan | last post by:
I am working in two environments neither configuration of which I can change; one's my Web host the other a client. My Web host requires the use of the ".php5" extension to use PHP v5.1.4; where ".php" is used for PHP v4.3.11. My client supports PHP v5.2.0 with the ".php" extension. Is there a way to reliably determine if the ".php5" extension must be used on a server? Perhaps via a "phpinfo()" value?
2
3803
by: grand220 | last post by:
FreeBSD 6.2 PHP 5.2.3 PEAR 1.6.1 Keep getting the below error: "Encountered error 2048 in /usr/local/share/pear/PEAR.php, line 281: is_a(): Deprecated. Please use the instanceof operator" I look through PEAR.php and it's full of is_a() functions, if it's
0
8231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8672
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8614
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7153
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5561
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4075
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1474
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.