[development] base_path() not returning path to Drupal root

Cog Rusty cog.rusty at gmail.com
Fri Sep 21 14:28:11 UTC 2007


On 9/21/07, Tomas J. Fulopp <tomi at vacilando.org> wrote:
> More about this - I thought perhaps the user could manually set
> $base_url in his settings.php file.
>
> He did that -- but it did not solve the issue!


$base_url can't help with anything except fixing the internal paths
and the menu links if they were wrong. If you change it, either the
internal paths will break or you changed it to something equivalent.


> See the messages from fuzzion at http://drupal.org/node/176939
>
> Seems like a serious issue also for other users that have Drupal
> installed in subfolder(s), so I hope somebody comes back to me on this.
>
> Best regards,
>
> Tomas
>
>
>
> Tomas J. Fulopp wrote:
> > I have one other question I am pondering for a crazy long time - I
> > wonder if it's a bug in the core...?
> >
> > An user has Drupal installed in www.example.com/foldera/folderb/ and
> > in there a files folder ( thus www.example.com/foldera/folderb/files/ )
> >
> > In my module, I need to determine the path to the 'files' folder
> > relative to the domain name (example.com)
> >
> > So I've used file_directory_path() .. that gave me just 'files'.
> > Then I've used base_path() hoping that it would give me
> > /foldera/folderb/ this way
> > base_path() . file_directory_path()
> > but the result was
> > /files
> >
> > I see this issue was discussed at length at
> > http://lists.drupal.org/archives/support/2006-03/msg00042.html but
> > there are no clear conclusions, and anyway, that's a thread from March
> > 2006. So I wonder whether there is a clean solution for this.
> >
> > I'm on Drupal 5.2, btw.
> >
> > Tomas
> >
> >
>


More information about the development mailing list