Re: [PHP] [URL file-access is disabled]

2007-06-09 Thread Richard Lynch
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



Re: [PHP] [URL file-access is disabled]

2007-06-09 Thread Tijnema

On 6/9/07, Dave Howard Schiff <[EMAIL PROTECTED]> wrote:

Hello everyone,

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";

 Ok, I know that the hosting don't allow that kind of include. But, is there a 
workaround for that? I mean, every user has their own folder, and every folder 
has a default script called listdir.php - all that this script does is to list 
all files avaiable to him. But then, I get this error message below.

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

 Any help would be very appreciated.

 Best Regards,
Dave Howard Schiff.


URL include is when you include files from
http://www.domain.com/file.php, that shouldn't be this...
But keep in mind that the directory you log into with FTP isn't /
Try this include:
What if you do this:
include 
"/home/users/b9/myhost/www/myhost.pandela.org/bd/userdirs/$username/listdir.php";

Tijnema

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



[PHP] [URL file-access is disabled]

2007-06-09 Thread Dave Howard Schiff
Hello everyone,

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";
   
  Ok, I know that the hosting don't allow that kind of include. But, is there a 
workaround for that? I mean, every user has their own folder, and every folder 
has a default script called listdir.php - all that this script does is to list 
all files avaiable to him. But then, I get this error message below.
  
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
   
  Any help would be very appreciated.
   
  Best Regards,
Dave Howard Schiff.
  


   
-
Novo Yahoo! CadĂȘ? - Experimente uma nova busca.