home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] Confused re path usage??

William Case wrote:
Hi;

I am trying to sort out why the following doesn't work.  I think it
should.

TUX DocumentRoot = /var/www/ = DR
CASE DocumentRoot = /var/www/html =DR ;the html directory was added by
apache install

TUX web repository = DR/index.php
		   /includes/header-oclug.html
/program_olympics/pics_olympics_07/images.php images.php header "include .././includes/header-oclug.html"
Produces an error "No such file or directory
in /var/www/program_olympics/pics_olympics_07/images.php on line 3"

CASE web repository = DR/index.php
		   /includes/header-oclug.html
/program_olympics/pics_olympics_07/images.php images.php header "include .././includes/header-oclug.html"
No error

Main question; relatively, aren't they the same? I have double checked the path structure on both CASE and TUX and I have
experimented with different numbers of /../ just to be sure.  Nothing
works.

Includes in PHP are defined in the php.ini file. If the include definition does not contain ":.:" somewhere in the include path locally referenced includes (i.e. ../includes etc.) will not work as PHP will not check places relevent to the current working directory. Check in your system's php.ini file.

Reading the fine manuals instead of asking the list for well documented items is very polite too. It's been a couple of years now that you've been at this - your "newbie" mystique is fading. Most of us have spent years reading (and writing) documentation, although helping _new_ folks is part of the culture, at some point everyone is expected to start giving back (or at least stop taking).

Googling for:

      PHP include file not found

will result in good answers without crusty responses.

--
Bill Strosberg