473,800 Members | 2,495 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

include_path related issue

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:
/usr/local/psa/home/vhosts/mydomain.com/includes.
..htaccess in httpdocs contains:
php_value include_path ".|../includes"

I can specify additional subdomains in the control panel of my account.
They automatically go in
/usr/local/psa/home/vhosts/mydomain.com/subdomains/
One of these:
/usr/local/psa/home/vhosts/mydomain.com/subdomains/customer
which also has the subdirs 'httpdocs' and 'includes'
To browse httpdocs/index.php the subdomain the URL reads:
http://customer.mydomain.com[/index.php]
The .htaccess file in httpdocs is similar to the one in my master domain.
PHP recognizes the include_path setting properly, yet fails to open ANY
file in the includes directory (e.g.):
Fatal error: main() [function.requir e]: Failed opening required
'dbconn.inc' (include_path=' .:../includes') in
/usr/local/psa/home/vhosts/mydomain.com/subdomains/customer/httpdocs/counter.php
on line 4

Permissions are set along the same lines for both master and
sub-domains, 'r-x' to others for all subdirs involved, 'r--' for the files.

Any ideas what prevents PHP from opening include files for my
subdomains? Open_basedir is set to my root dir btw by H.P., if that
makes any difference for this issue.

Hope my message is readable enough. Thanks in advance!
Sh.
Apr 24 '07 #1
10 2615
Rik
Schraalhans Keukenmeester wrote:
php_value include_path ".|../includes"
(include_path=' .:../includes')
If a unix box, the colon seems correct (windows would have a semicolon).
I've never seen a pipe use for this though, but that might be my lack
of OS knowledge and environmental variables.

--
Rik Wasmus
Apr 24 '07 #2
Rik wrote:
Schraalhans Keukenmeester wrote:
> php_value include_path ".|../includes"

>(include_path= '.:../includes')

If a unix box, the colon seems correct (windows would have a semicolon).
I've never seen a pipe use for this though, but that might be my lack
of OS knowledge and environmental variables.
The pipe was a typo, alas. If only it were so easy, Rik.Thanks for your
keen eye though! No news from my provider either. WEIRD!

Sh.
Apr 25 '07 #3
Rik
Schraalhans Keukenmeester wrote:
Rik wrote:
>Schraalhans Keukenmeester wrote:
>> php_value include_path ".|../includes"
>>(include_path ='.:../includes')
If a unix box, the colon seems correct (windows would have a semicolon).
I've never seen a pipe use for this though, but that might be my lack
of OS knowledge and environmental variables.
The pipe was a typo, alas. If only it were so easy, Rik.
Wish it was...
Thanks for your
keen eye though! No news from my provider either. WEIRD!
What happens if you try to include it specifically? Does that work or
does that give a more clear error?
--
Rik Wasmus

Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
Apr 25 '07 #4
On Apr 24, 4:34 pm, Schraalhans Keukenmeester <bitbuc...@inva lid.spam>
wrote:
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:
/usr/local/psa/home/vhosts/mydomain.com/includes.
.htaccess in httpdocs contains:
php_value include_path ".|../includes"

I can specify additional subdomains in the control panel of my account.
They automatically go in
/usr/local/psa/home/vhosts/mydomain.com/subdomains/
One of these:
/usr/local/psa/home/vhosts/mydomain.com/subdomains/customer
which also has the subdirs 'httpdocs' and 'includes'
To browse httpdocs/index.php the subdomain the URL reads:
http://customer.mydomain.com[/index.php]
The .htaccess file in httpdocs is similar to the one in my master domain.
PHP recognizes the include_path setting properly, yet fails to open ANY
file in the includes directory (e.g.):
Fatal error: main() [function.requir e]: Failed opening required
'dbconn.inc' (include_path=' .:../includes') in
/usr/local/psa/home/vhosts/mydomain.com/subdomains/customer/httpdocs/counter.php
on line 4

Permissions are set along the same lines for both master and
sub-domains, 'r-x' to others for all subdirs involved, 'r--' for the files.

Any ideas what prevents PHP from opening include files for my
subdomains? Open_basedir is set to my root dir btw by H.P., if that
makes any difference for this issue.

Hope my message is readable enough. Thanks in advance!
Sh.
the short answer is not to reply on the includes directive/.htaccess
files, just define the application include root (and any and all other
paths your application needs) for yourself in your php application and
then prefix any attempt to open an include with that definition. Your
application becomes more portable as it doesnt reply on the ability to
set the includes dir in an .htaccess file. that's what i would do
anyway!

Apr 25 '07 #5
Rik wrote:
Schraalhans Keukenmeester wrote:
>Rik wrote:
>>Schraalhans Keukenmeester wrote:
php_value include_path ".|../includes"

(include_pat h='.:../includes')
If a unix box, the colon seems correct (windows would have a semicolon).
I've never seen a pipe use for this though, but that might be my lack
of OS knowledge and environmental variables.
The pipe was a typo, alas. If only it were so easy, Rik.

Wish it was...
>Thanks for your
keen eye though! No news from my provider either. WEIRD!

What happens if you try to include it specifically? Does that work or
does that give a more clear error?
No matter what I try, just the filename, or including the relative or
even full path to the include file, same error, no further specification
of why this happens.

(Helpdesk people can be really annoying, you tell them you have a
working solution with include files outside httpdocs which you'd like to
work for subdomains as well. The reply after two working days: "You
can't include files outside your httpdocs on the server, that's why it's
not working." Sigh!!! Guns please!)
Apr 26 '07 #6
shimmyshack wrote:
On Apr 24, 4:34 pm, Schraalhans Keukenmeester <bitbuc...@inva lid.spam>
wrote:
>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:
/usr/local/psa/home/vhosts/mydomain.com/includes.
.htaccess in httpdocs contains:
php_value include_path ".|../includes"

I can specify additional subdomains in the control panel of my account.
They automatically go in
/usr/local/psa/home/vhosts/mydomain.com/subdomains/
One of these:
/usr/local/psa/home/vhosts/mydomain.com/subdomains/customer
which also has the subdirs 'httpdocs' and 'includes'
To browse httpdocs/index.php the subdomain the URL reads:
http://customer.mydomain.com[/index.php]
The .htaccess file in httpdocs is similar to the one in my master domain.
PHP recognizes the include_path setting properly, yet fails to open ANY
file in the includes directory (e.g.):
Fatal error: main() [function.requir e]: Failed opening required
'dbconn.inc' (include_path=' .:../includes') in
/usr/local/psa/home/vhosts/mydomain.com/subdomains/customer/httpdocs/counter.php
on line 4

Permissions are set along the same lines for both master and
sub-domains, 'r-x' to others for all subdirs involved, 'r--' for the files.

Any ideas what prevents PHP from opening include files for my
subdomains? Open_basedir is set to my root dir btw by H.P., if that
makes any difference for this issue.

Hope my message is readable enough. Thanks in advance!
Sh.

the short answer is not to reply on the includes directive/.htaccess
files, just define the application include root (and any and all other
paths your application needs) for yourself in your php application and
then prefix any attempt to open an include with that definition. Your
application becomes more portable as it doesnt reply on the ability to
set the includes dir in an .htaccess file. that's what i would do
anyway!
Valid point, I'll make sure all stuff in my main domain uses that
solution instead. The .htaccess solution only existed in my 'testlab'.
However, in this case that doesn't seem to be the culprit. PHP has the
include path right, just isn't able to open any files in it.

Right now a 2nd helpdesk employee is modifying some configs to make
things work, he thinks he has the solution. Once fixed, I'll ask him
what exactly caused this behavour, I'll report back here.

Thanks for the input.
Sh.
Apr 26 '07 #7
Rik
Schraalhans Keukenmeester wrote:
Rik wrote:
>Schraalhans Keukenmeester wrote:
>>Rik wrote:
Schraalhan s Keukenmeester wrote:
php_value include_path ".|../includes"
(include_pa th='.:../includes')
If a unix box, the colon seems correct (windows would have a semicolon).
I've never seen a pipe use for this though, but that might be my lack
of OS knowledge and environmental variables.

The pipe was a typo, alas. If only it were so easy, Rik.
Wish it was...
>>Thanks for your
keen eye though! No news from my provider either. WEIRD!
What happens if you try to include it specifically? Does that work or
does that give a more clear error?
No matter what I try, just the filename, or including the relative or
even full path to the include file, same error, no further specification
of why this happens.
Hmmmz, normally I'd say there's probably another open_base_dir
restriction in effect for the subdomain, that would mean another error
message though... Are you sure the settings for the subdomain are the
same as for the main one?
(Helpdesk people can be really annoying, you tell them you have a
working solution with include files outside httpdocs which you'd like to
work for subdomains as well. The reply after two working days: "You
can't include files outside your httpdocs on the server, that's why it's
not working." Sigh!!! Guns please!)
Hehe, I've more then once explained a hoster how to configure Apache to
my wishes, after being told they didn't think something was possible...
Helpdesk ignorance is OK if they trust you enough to give them the
education they lack :-). It's a pain if they're slow though, the bulk of
the hosters I deal with reply within the hour.
--
Rik Wasmus

Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
Apr 26 '07 #8
Rik
Schraalhans Keukenmeester wrote:
Right now a 2nd helpdesk employee is modifying some configs to make
things work, he thinks he has the solution. Once fixed, I'll ask him
what exactly caused this behavour, I'll report back here.
OK, awaiting in anticipation.

--
Rik Wasmus

Estimated date being able to walk again: 01-05-2007.
Less then a week, hurray!
Apr 26 '07 #9
On Apr 26, 3:17 pm, Schraalhans Keukenmeester <bitbuc...@inva lid.spam>
wrote:
Rik wrote:
Schraalhans Keukenmeester wrote:
Rik wrote:
Schraalhans Keukenmeester wrote:
php_value include_path ".|../includes"
>>(include_path ='.:../includes')
If a unix box, the colon seems correct (windows would have a semicolon).
I've never seen a pipe use for this though, but that might be my lack
of OS knowledge and environmental variables.
The pipe was a typo, alas. If only it were so easy, Rik.
Wish it was...
Thanks for your
keen eye though! No news from my provider either. WEIRD!
What happens if you try to include it specifically? Does that work or
does that give a more clear error?

No matter what I try, just the filename, or including the relative or
even full path to the include file, same error, no further specification
of why this happens.

(Helpdesk people can be really annoying, you tell them you have a
working solution with include files outside httpdocs which you'd like to
work for subdomains as well. The reply after two working days: "You
can't include files outside your httpdocs on the server, that's why it's
not working." Sigh!!! Guns please!)
it does sound rather as though your setup there is non-standard, it
stragely uses .htaccess to fiddle with include paths, when of course
you should handle the environment within your app.
i wonder if it isnt because there are symbolic links which are
resolving to be outside the openbase dir restriction.

my advice: name and shame your host with its bad customer service - to
me it sounds like http://1and1.co.uk who are also notorious for
getting back to you after weeks only to have misunderstood what you
asked, and insist on telling you something along the line of "its your
browser settings" which means I just dont bother reading their
replies!

after youve named and shamed them, consider moving to somewhere wher
you are in control of your environment, which doesnt depend on
architechtural restrictions, which after all wont work on IIS etc...
are on apache with htaccess disallowed!

Apr 26 '07 #10

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

Similar topics

3
2225
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...
3
1911
by: mirko | last post by:
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
2
2293
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...
24
5372
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/
0
1886
by: Bastien Continsouzas | last post by:
I am trying to set the include path for SimpleTest under Eclipse I have the following config : Eclipse : 3.2.0 PHPEclipse 1.1.8 SimpleTest plugin : 0.2.1 I ran a test I found on the SimpleTest plugin page and it worked fine http://simpletest.org/en/extension_eclipse.html
9
2412
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...
1
2524
by: hoobert | last post by:
Hi all -- I have an include_path question. Just setting up a new server, and I'm running into a really stupid issue. I have the following line in php.ini: include_path = ".:/usr/local/include:/usr/share/pear" Inside /usr/local/include there's a file lib/html/html.php which does some templating for me.
1
3845
by: Bob | last post by:
Im setting up a fedora core 8 web server. Im currently running everything on another fedora core 6 server (working fine). Ive installed php 5.2.5 and apache 2.0.63 Im getting the following: Warning: include_once() : Failed opening 'mysql.inc' for inclusion (include_path='/home/jeff/src/soccer/php_inc') in /home/ http/soc/show.php on line 13
4
3817
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...
0
9690
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
9551
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,...
0
10505
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
10275
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...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9085
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
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2945
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.