Hello,
I have a problem with my include_path and I don't know why... Can
anybody see the mistake?
my configuration:
PHP Version 4.3.11
System: Windows NT 5.0 build 2195
Server API: CGI/FastCGI
Virtual Directory Support: enabled
Configuration File (php.ini) Path: C:\WINNT\php.in i
PHP API: 20020918
PHP Extension: 20020429
Thread Safety: enabled
include_path: .;C:\Inetpub\ww wroot
My php script used this:
require("/development/classes/configWeb.php") ;
and the configWeb File location is:
C:\Inetpub\wwwr oot\development \classes\config Web.php
And I geet this error message:
Fatal error: getofficeslist( ): Failed opening required
'\development\c lasses\configWe b.php'
(include_path=' .;C:\Inetpub\ww wroot') in
C:\Inetpub\wwwr oot\development \classes\office s.php on line 45
THANKS ! 3 1911 mi***@abitur97. de wrote: Hello,
I have a problem with my include_path and I don't know why... Can anybody see the mistake?
my configuration:
PHP Version 4.3.11
System: Windows NT 5.0 build 2195 Server API: CGI/FastCGI Virtual Directory Support: enabled Configuration File (php.ini) Path: C:\WINNT\php.in i PHP API: 20020918 PHP Extension: 20020429 Thread Safety: enabled include_path: .;C:\Inetpub\ww wroot
My php script used this:
require("/development/classes/configWeb.php") ;
and the configWeb File location is: C:\Inetpub\wwwr oot\development \classes\config Web.php
And I geet this error message: Fatal error: getofficeslist( ): Failed opening required '\development\c lasses\configWe b.php' (include_path=' .;C:\Inetpub\ww wroot') in C:\Inetpub\wwwr oot\development \classes\office s.php on line 45
What your script is actually trying to access, is
"c:\development \classes\config Web.php", which is referenced in the
require() statement above. If you remove the slash from the beginning
of that file reference, you'll see that it works.
The way include_path works, it goes through each of the directories
(seperated by a semicolon) when you use include/require with a relative
path until it finds the file. This is only a side feature, since
include_path is meant to secure which directories a script is allowed
to include files from.
It will in your case look for the included file here (if making the
change I suggested):
..\development\ classes\configW eb.php (from current working directory)
c:\Inetpub\wwwr oot\development \classes\config Web.php
--
Kim André Akerø
- ki******@NOSPAM betadome.com
(remove NOSPAM to contact me directly)
On 21 Oct 2005 00:09:04 -0700, mi***@abitur97. de wrote: require("/development/classes/configWeb.php") ;
my guess is that this should be like this:
require("develo pment/classes/configWeb.php") ;
--
- Marketer to coder: "You start coding. I'll go find out what they want." -
mail: kr***@binel-withoutspam.hr | uin: 2040925
Thanks for the description how include_path works. Now it works!
Mirko This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Justin Hoffman |
last post by:
This is a question concerning query optimisation. Sorry if it's a bit long,
but thanks to anyone who has the patience to help - This is my first post
here...
If I have two tables: 'tblContact' and 'tblCategory' where categories are
like:
Code Name
010101 Short
010102 Fat
|
by: webguynow |
last post by:
I'm a little confused, I have test apps, using Pear DB.php but in my
application, and debugging through Zend studio, I have some Database
updates obviously working and then I get a Fatal Error.
Apparently, it cannot find DB.php and shows include_path as:
".;C:\PHP5"
On my Windows XP system, I've got php installed at C:\php
and any php.ini or apache conf files reflect this accurately.
My phpinfo() also correctly shows include_path...
|
by: Chuck Anderson |
last post by:
My shared host used to have Php configured such that I could place a
php.ini file into any directory on my site and that was the php.ini file
that the Php cgi would use when it ran scripts.
Since upgrading to Php5.1 that is no longer possible (not allowed in
Php5.1 (?) ).
Anyway, ... this was a very handy way for me to set the include path so
that I could keep files with sensitive data (e.g., database usernames,
passwords) out of the...
|
by: Paul |
last post by:
I am taking over an existing app and having trouble understanding their
references.
They have encapsulated Pear packages in the directory structure like:
/site
/site/html/Pear.php
/site/html/Sigma.php
/site/html/Common.php
/site/html/Quickform.php
/site/html/Quickform/
|
by: Schraalhans Keukenmeester |
last post by:
I suspect the following problem IS hosting provider specific, but they
haven't been able to help me out so far. Perhaps I am doing something
wrong and someone is able to spot the issue... Here goes.
The actual path of the root dir of my account with hosting provider
(H.P.) is:
/usr/local/psa/home/vhosts/mydomain.com/
The webroot is a subdir of the root:
/usr/local/psa/home/vhosts/mydomain.com/httpdocs.
Include files go in:
| |
by: Charles Crume |
last post by:
Hello Everyone;
My site was hacked the other day -- someone was able to rename my
index.shtml file and put their own index.html file on my server. Not sure
how it was done, but looking through the log file, I found a lots and lots
of entries where an "include_path" parameter was included in the URL of the
PHP page, as shown below:
69.94.36.155 - - "GET...
|
by: Rob Wilkerson |
last post by:
Hey all -
I'm trying to create a developer-friendly environment on my production
server. By that, I mean an environment where developers don't need to
worry about certain things. Among those is the include path. I have
a "core" include_path set in php.ini, but most projects will require
an include path of their own _in addition to_ the global
include_path. Ideally, I'd like to script this directly into the
virtual host configuration...
|
by: Gordon |
last post by:
Is it possible in, say, a .htaccess file, to append additional paths
to the php include_path without knowing what the value of include_path
is beforehand? I want to add an absolute path to a directory and it's
subdirectories from a .htaccess file, but I don't want to have to
encode the entire current value of it and append my own path as that
would mean having to change it every time it changes in php.ini or the
code is deployed on a...
|
by: mukeshrasm |
last post by:
Hi! I want to use phpmailer class to send mail using smtp.I have downloaded the phpmailer and then i followed it's README file where it is mentioned that "Copy class.phpmailer.php into your php.ini include_path. If you are using the SMTP mailer then place class.smtp.php in your path as well", but I don't know where to paste the class.phpmailer.php into my php.ini include_path. In my php.ini file the include path is commented and it is like
...
|
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...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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...
|
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...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |