elgg_get_root_path(""); does not gives the localhost xampp path

Hi,

I am running elgg in xampp. There I am getting the live path "/opt/bitnami/apache2/htdocs/" in elgg_get_root_path("");

Note: I have deleted the views_simplecache and system_cache in data directory

Any suggestion would be helpfull

Thx.

  • For path changes in DB
    ---------------------------
    TABLE elgg_datalists
    path
    dataroot
    TABLE  elgg_sites_entity

  • On Elgg 2 or newer the elgg_get_root_path() doesn't return the root path in all cases anymore. SInce Elgg 2 Elgg can be installed with composer (when not using the zip to install). The composer install would allow to install Elgg in a different path in relation to the install directory path. And therefore the path returned by elgg_get_root_path() seems a bit unreliable. I never needed to make use of this function (and also wasn't aware of the different behavior of this function on Elgg 1 or Elgg 2+). Are you sure you need this function, i.e. do you really need the install root folder? If you need another folder (e.g. something inside the mod folder) there are other function returning the path of these folders. Tell us you use case and then we might be able to suggest a better suited function.

  • I have resolved the issue. Thanks

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking