Reply to Re: include_path related issue

Your name:

Reply:


Posted by shimmyshack on 04/25/07 23:06

On Apr 24, 4:34 pm, Schraalhans Keukenmeester <bitbuc...@invalid.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.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!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация