Re: [URL file-access is disabled]

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

 



On Sat, June 9, 2007 12:14 pm, Dave Howard Schiff wrote:
> I have a problem, that I hope you can help me to solve:
>
>   I'm writing a very simple PHP script to list a directory contents
> based on a 'user' variable given by a login/password script. The
> problem is, the webhosting i'm using don't allow the so called "URL
> file-access" ( i'm using PANDELA.COM ). It's a great hosting but
> this feature is breaking my legs:
>
>   When the user put his name/passwrod, the script will check of course
> his information and then will allow the user to access his directory
> information, and then the "url variable" will look like this.
>
>   $username= $_GET['logininfo'];
>   include "/bd/userdirs/$username/listdir.php";

This is not a URL file access.

If it's not working, you may be falling under an "open_basedir"
restricition, but not "allow_url_fopen" as you seem to think.

Have you tried it yet?

> Warning: include() [function.include]: URL file-access is disabled in
> the server configuration in
> /home/users/b9/myhost/www/myhost.pandela.org/bd/loginuser.php on line
> 41

Ah.

The problem is that you are confusing DocumentRoot with Server root.

You will need to add all the
/home/users/b9/myhost/www/myhost.pandela.org/ in front of your current
/bd to work.

As it stands now, you are trying to include something from a directory
that is parallel to (a sibling of) /home:

In other words, what you typed would work if you had this:
/
  .
  ..
  /home/users/b9/myhost/www/myhost.pandela.org/
  /bd/userdirs/whatever/listdir.php

But you don't have that.  You have this:
/
  .
  ..
  /home/users/b9/myhost/www/myhost.pandela.org/bd/userdirs/whatever/listdir.php

[that last one is supposed to be all one line...]

I dunno why it's complaining about URL-file-access though... Seems
pretty weird to me...

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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