Re: help with require/includes pathing frustration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/1/29 Daevid Vincent <daevid@xxxxxxxxxx>

> At the very top of my login.php page I have this:
>
> <?php
> require_once('./includes/gui/gui_setup.inc.php');
> ...
> ?>
>
> (I've tried with and without the "./" prefix as if that might make a
> difference)
>
> When I try to load the URL:
> https://example.com/vincentd/mydart/login.php
>
> I get this error:
>
> Warning: require_once(./includes/gui/gui_setup.inc.php)
> [function.require-once]: failed to open stream:
> No such file or directory in /home/www/vincentd/mydart/login.php on line
> 2
>
> Fatal error: require_once()
> [function.require]: Failed opening required
> './includes/gui/gui_setup.inc.php'
> (include_path='.:/usr/share/php:/usr/share/pear')
>        in /home/www/vincentd/mydart/login.php on line 2
>
> If I try to access it from the web:
> https://example.com/vincentd/mydart/includes/gui/gui_setup.inc.php
>
> I get a 404:
>
> Not Found
> The requested URL /vincentd/mydart/includes/gui/gui_setup.inc.php was
> not found on this server.
>
> Yet, the file exists.
> [...]
>  -rw-r--r-- 1 vincentd vincentd 1589 2009-01-29 02:44
> includes/gui/gui_setup.php
>
> Doesn't the ".:" in include_path='.:/usr/share/php:/usr/share/pear' mean
> that PHP should look in the current directory (which I assume would be
> "/home/www/vincentd/mydart") as that is where login.php is located?
> And then relative to there it should look in "includes/gui/..." as per
> my require_once command.
>
> What am I not understanding about this?


Well, the name of the file is just: gui_setup.php
but you tried to include: gui_setup.inc.php
Should work without "./"

 -eddy

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux