473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

require_once issue

I have code that brings in the Pear DB

require_once 'DB.php';

However, there is an include in the DB.php for the PEAR.php file, and
the system does not appear to be able to locate that file. The
PHP.ini has

include_path = ".;c:\php\includes;c:\php\includes\Pear"

PHP appears to use this dir. search path for the DB.php but not the
internal Pear.php!

I can force the include but changing it to a full path, but this is
not the best option.

Any ideas as to the root cause of this issue?

Sep 13 '05 #1
1 1378
On Tue, 13 Sep 2005 14:54:37 -0500, David <ma******@sbcglobal.net> wrote:
I have code that brings in the Pear DB

require_once 'DB.php';

However, there is an include in the DB.php for the PEAR.php file, and
the system does not appear to be able to locate that file. The
PHP.ini has

include_path = ".;c:\php\includes;c:\php\includes\Pear"

PHP appears to use this dir. search path for the DB.php but not the
internal Pear.php!

I can force the include but changing it to a full path, but this is
not the best option.

Any ideas as to the root cause of this issue?


What error do you get?

Are you sure it's picking up DB.php from c:\php\includes\Pear and not another
path?

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Sep 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: the wonderer | last post by:
This is an elementary question, but I've not been able to find the answer, so here goes: I am developing a site using php. I have the html header information in a file that I include in all the...
7
by: Lars Plessmann | last post by:
I hava several php files in different folders. I tried to use relative paths. But when I call a script from another folder that has another depth, it cannot find the files that are embedded via...
6
by: Nik Coughin | last post by:
Say I have a script: http://www.mydomain.com/test/admin/foo.php That looks like this: <?php $baseDir = "http://" . $_SERVER . "/test"; require_once( $baseDir . '/helpers/helper.php' );
3
by: Justin L. Kennedy | last post by:
I am having a problem with multiple includes. A.php require_once on two files: B.php then C.php C.php require_once on B.php again Then I get a message: Warning: main(../../B.php): failed...
5
by: mostof | last post by:
I'm facing a problem with require_once... Instead of actually including the file i'm requiring, it just dumps it out as text... other functions are working quite well... the code look like...
11
by: Kimmo Laine | last post by:
I'm flipping my wig here, people. I'm using classes and making each class a file. when I'm including dependet classess, I use require_once to avoid multiple declarations - yet they happen. I put...
3
by: Tyno Gendo | last post by:
Has anyone come across this problem with require_once? I was working on my local machine with apache and have included a file like this: require_once "welcome_patient.php"; Works fine, the...
6
by: Shelly | last post by:
Here is a crazy question that has happend to me once before. I have an include file for the connection information to the server. It is like this: $hostname= "the_server_location"; $database...
6
by: Royan | last post by:
Ok the problem is quite hard to explain, but i'll try to keep it as simple as i can. Imagine I have the following structure of my files and folders: /root/global.inc |__/files/foo.php...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.