Jump to content

PW3 index.php - symlink confusing assignment of $rootPath


Gazley
 Share

Recommended Posts

Hi there,

I have my development files in:

/Users/gazley/hsa/ProcessWire

I have a symlink in my document root folder like so:

/Applications/MAMP/htdocs  ᐅ ls -l hsa
lrwxr-xr-x  1 gazley  admin  33 10 Mar 16:19 hsa -> /Users/gazley/hsa/ProcessWire

In latest PW3 index.php, line 28, it says:

$rootPath = __DIR__;

which returns:

 /Users/gazley/hsa/ProcessWire

It actually needs to return the path based on the document root and not the path the symlink is actually pointing to. Obviously, this breaks everything thereafter! :)

I normally develop PW under the MAMP document root but on this occasion, I built from an HTML mockup in my home directory subsequently pointing to it from the document root (as per the symlink specified above).

If anyone has an idea whether it is possible to do what I want to do without upsetting PW, I'd appreciate it! :)

Many thanks.

Link to comment
Share on other sites

I'm using symlinks too, but I use it for the /site/... folders only, because I do not work on the wire/... folders:

/www/public_html/wire/ == is physically in the htdocsdirectory of apache

/www/public_html/site/ == symlinked to e.g. /Users/me/myproject/site/

/www/public_html/index.php == is physically in the htdocs directory of apache
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...