Include path issues

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • wedsall at geemail

    Include path issues

    Hello! I have an issue with my include_path.

    So I did a fresh install of php, and my web directory is actully in one
    of the home directories. Let's call it /home/userx/www/

    Something is wrong with the include_path, but I don't understand it.
    You can directly include a file in the directory you're in, but
    includes don't work two files deep. For instance when phpBB2 includes
    include/functions.php, the references to $base_url inside functions.php
    are taken from its own location, instead of the file that included it.

    Warning: include(./language/lang_english/lang_main.php)
    [function.includ e]: failed to open stream: No such file or directory in
    /home/userx/lib/www/htdocs/phpBB2/includes/functions.php on line 719

    Please help! My include_path is set to .:/usr/local/lib/php

  • David Haynes

    #2
    Re: Include path issues

    wedsall at geemail wrote:[color=blue]
    > Hello! I have an issue with my include_path.
    >
    > So I did a fresh install of php, and my web directory is actully in one
    > of the home directories. Let's call it /home/userx/www/
    >
    > Something is wrong with the include_path, but I don't understand it.
    > You can directly include a file in the directory you're in, but
    > includes don't work two files deep. For instance when phpBB2 includes
    > include/functions.php, the references to $base_url inside functions.php
    > are taken from its own location, instead of the file that included it.
    >
    > Warning: include(./language/lang_english/lang_main.php)
    > [function.includ e]: failed to open stream: No such file or directory in
    > /home/userx/lib/www/htdocs/phpBB2/includes/functions.php on line 719
    >
    > Please help! My include_path is set to .:/usr/local/lib/php
    >[/color]
    If I am reading the warning correctly, you are using relative pathing to
    specify the include file. Try removing the ./ prefix and letting PHP use
    the include_path to find the file you want.

    -david-

    Comment

    • wedsall at geemail

      #3
      Re: Include path issues

      Relative paths yes.. BUT..
      They're out of the box paths from phpBB2 and phpmyadmin. They should
      work.
      Something's wrong with my install.

      Comment

      Working...