[development] base_path() not returning path to Drupal root
Tomas J. Fulopp
tomi at vacilando.org
Fri Sep 21 11:30:22 UTC 2007
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!
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.
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
> 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.
More information about the development