Re: include_path related issue
- From: Schraalhans Keukenmeester <bitbucket@xxxxxxxxxxxx>
- Date: Thu, 26 Apr 2007 17:02:00 +0200
shimmyshack wrote:
On Apr 24, 4:34 pm, Schraalhans Keukenmeester <bitbuc...@xxxxxxxxxxxx>Valid point, I'll make sure all stuff in my main domain uses that
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.require]: 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!
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.
.
- Follow-Ups:
- Re: include_path related issue
- From: Rik
- Re: include_path related issue
- References:
- include_path related issue
- From: Schraalhans Keukenmeester
- Re: include_path related issue
- From: shimmyshack
- include_path related issue
- Prev by Date: Re: Off Topic? Handling Client Expectations
- Next by Date: prepend data to field
- Previous by thread: Re: include_path related issue
- Next by thread: Re: include_path related issue
- Index(es):
Relevant Pages
|
|