problem with include()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Disco Octopus

    #1

    problem with include()

    Hi,

    I am trying to upload my site to a new server, and am finding a hard
    time with the include() function.

    I am getting this...

    Warning: main(includes/site_auth.inc) [function.main]: failed to open
    stream: No such file or directory in
    /usr/home/vhosts/example.com/web/maint/index.php on line 2

    line 2 of my file looks like this...
    include ('site_auth.inc ');

    I have given this in my .htaccess file....
    php_value include_path
    ".:/users/example/includes:/home/vhosts/example.com/includes"

    and, the really interesting thing is I am getting a FALSE when I
    execute this....
    file_exists(/users/example/includes/site_auth.inc)
    ....even when I KNOW that the file is there.

    The file is *definately* in that location, but I am still getting the
    error.

    Any ideas?

    Thanks

    --
    a beef jerky site http://www.choicebeefjerky.com.au
    not a beef jerky site http://mycoolwheels.com/vote.cmks
    eat beef jerky


  • Berislav Lopac

    #2
    Re: problem with include()

    Disco Octopus wrote:[color=blue]
    > Hi,
    >
    > I am trying to upload my site to a new server, and am finding a hard
    > time with the include() function.
    >
    > I am getting this...
    >
    > Warning: main(includes/site_auth.inc) [function.main]: failed to open
    > stream: No such file or directory in
    > /usr/home/vhosts/example.com/web/maint/index.php on line 2
    >
    > line 2 of my file looks like this...
    > include ('site_auth.inc ');
    >
    > I have given this in my .htaccess file....
    > php_value include_path
    > ".:/users/example/includes:/home/vhosts/example.com/includes"
    >
    > and, the really interesting thing is I am getting a FALSE when I
    > execute this....
    > file_exists(/users/example/includes/site_auth.inc)
    > ...even when I KNOW that the file is there.
    >
    > The file is *definately* in that location, but I am still getting the
    > error.
    >
    > Any ideas?[/color]

    Try to check for
    file_exists('/usr/home/vhosts/example.com/web/maint/users/example/includes/site_auth.inc')

    I have a feeling this might come up true...

    Berislav


    Comment

    • gardnern

      #3
      Re: problem with include()


      Disco Octopus wrote:[color=blue]
      > Hi,
      >
      > I am trying to upload my site to a new server, and am finding a hard
      > time with the include() function.
      >
      > I am getting this...
      >
      > Warning: main(includes/site_auth.inc) [function.main]: failed to open
      > stream: No such file or directory in
      > /usr/home/vhosts/example.com/web/maint/index.php on line 2
      >
      > line 2 of my file looks like this...
      > include ('site_auth.inc ');
      >
      > I have given this in my .htaccess file....
      > php_value include_path
      > ".:/users/example/includes:/home/vhosts/example.com/includes"
      >
      > and, the really interesting thing is I am getting a FALSE when I
      > execute this....
      > file_exists(/users/example/includes/site_auth.inc)
      > ...even when I KNOW that the file is there.
      >
      > The file is *definately* in that location, but I am still getting the
      > error.
      >
      > Any ideas?
      >
      > Thanks
      >
      > --
      > a beef jerky site http://www.choicebeefjerky.com.au
      > not a beef jerky site http://mycoolwheels.com/vote.cmks
      > eat beef jerky[/color]

      Since your moving to a new server (are you managing server?), they may
      have these functions disabled for some crazy reason. Run a phpinfo();
      and check PHPs settings.

      Comment

      Working...