ExpandPath with mod_cfml and mappings

I have an moduleglue app I’m trying to port over to Lucee from CF8 and I’m
having
some problems with ExpandPath and the current 4.5.2 build.

I have an Apache 2.4 virtual server setup which points to the wwwroot
directory,
as I don’t want to expose any files which don’t need to be web accessible

It all works fine if I set the apache documentRoot to the app root
directory (c:\inetpub\appdir)
and then access the http://localhost/wwwroot/index.cfm directory, which is
obviously sub optimal

but when I set the document root to c:\inetpub\appdir\wwwroot, it falls
over because
the expandPath for the moduleglue file then resolves to

C:\inetpub\appdir\wwwroot\appdir\config\ModelGlue.xml
instead of
C:\inetpub\appdir\config\ModelGlue.xml

any ideas?

Set up a mapping. Lucee (unlike Cf) probably has no idea what your Apache paths are.

Mark Drew

  • Sent by typing with my thumbs.> On 13 Jan 2016, at 07:48, Zac Spitzer <@Zac_Spitzer> wrote:

I have an moduleglue app I’m trying to port over to Lucee from CF8 and I’m having
some problems with ExpandPath and the current 4.5.2 build.

I have an Apache 2.4 virtual server setup which points to the wwwroot directory,
as I don’t want to expose any files which don’t need to be web accessible

It all works fine if I set the apache documentRoot to the app root directory (c:\inetpub\appdir)
and then access the http://localhost/wwwroot/index.cfm directory, which is obviously sub optimal

but when I set the document root to c:\inetpub\appdir\wwwroot, it falls over because
the expandPath for the moduleglue file then resolves to

C:\inetpub\appdir\wwwroot\appdir\config\ModelGlue.xml
instead of
C:\inetpub\appdir\config\ModelGlue.xml

any ideas?

Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/96fd2935-a9af-4e4d-bc0d-3f47edf4aa98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zac,

I have an old MG app, getting the paths set up correctly is always a pain
when shifting it to a new server. I really dislike the spaghetti nature of
the configuration settings. Trips me up every time.

In index.cfm, I set both ModelGlue_LOCAL_COLDSPRING_PATH to point to the
location of ColdSpring.xml, and *ModelGlue_CORE_COLDSPRING_PATH *to point
to the location of ModelGlue/unity/config/Configuration.xml (within which
the relative path to ModelGlue.xml is configured).

Hard coded paths work just fine for those MG _PATH variables. No need to
depend on ExpandPath(). That said, this code fragment is one I’ve used to
back down out of the webroot from index.cfm and into the application
directory:

<cfset ModelGlue_LOCAL_COLDSPRING_PATH = expandPath( ‘…/’ ) &
‘appdir/config/ColdSpring.xml’ />

… and this works for me in my Lucee dev environment. I just tested it to
make sure.

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamediaOn Wed, Jan 13, 2016 at 8:53 AM, Mark Drew <@Mark_Drew> wrote:

Set up a mapping. Lucee (unlike Cf) probably has no idea what your Apache
paths are.

Mark Drew

  • Sent by typing with my thumbs.

On 13 Jan 2016, at 07:48, Zac Spitzer <@Zac_Spitzer> wrote:

I have an moduleglue app I’m trying to port over to Lucee from CF8 and I’m
having
some problems with ExpandPath and the current 4.5.2 build.

I have an Apache 2.4 virtual server setup which points to the wwwroot
directory,
as I don’t want to expose any files which don’t need to be web accessible

It all works fine if I set the apache documentRoot to the app root
directory (c:\inetpub\appdir)
and then access the http://localhost/wwwroot/index.cfm directory, which
is obviously sub optimal

but when I set the document root to c:\inetpub\appdir\wwwroot, it falls
over because
the expandPath for the moduleglue file then resolves to

C:\inetpub\appdir\wwwroot\appdir\config\ModelGlue.xml
instead of
C:\inetpub\appdir\config\ModelGlue.xml

any ideas?


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/96fd2935-a9af-4e4d-bc0d-3f47edf4aa98%40googlegroups.com
https://groups.google.com/d/msgid/lucee/96fd2935-a9af-4e4d-bc0d-3f47edf4aa98%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/DD1E90D8-0D4F-467E-817E-FE073B2B0CEC%40gmail.com
https://groups.google.com/d/msgid/lucee/DD1E90D8-0D4F-467E-817E-FE073B2B0CEC%40gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

yeah, that’s true, but I the problem here is that the mapping isn’t being
picked up by expandpathOn Wednesday, 13 January 2016 21:56:21 UTC+11, Nando Breiter wrote:

ACF didn’t, and still does not, “just work for me” in terms of MG’s
relatively complex configuration / path setup. There are 3 or 4 points in
the app with make or break path settings, they are all interdependent, and
tucked away in hard to find locations. I can’t see how anything would make
that “just work” in all environments.

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

On Wed, Jan 13, 2016 at 11:40 AM, Zac Spitzer <zac.s...@gmail.com <javascript:>> wrote:

@nando looking into the MG framework code, hard coded paths look like an
option

@mark I do have mappings in place, but that didn’t help

it’s still quite a frustrating clusterf*ck with lucee compared to ACF
which just works,
I’m aware that ACF uses some custom AJP extensions to make this seamless,
has there been any motion to update AJP to standardise them?

On Wednesday, 13 January 2016 20:53:46 UTC+11, Nando Breiter wrote:

Zac,

I have an old MG app, getting the paths set up correctly is always a
pain when shifting it to a new server. I really dislike the spaghetti
nature of the configuration settings. Trips me up every time.

In index.cfm, I set both ModelGlue_LOCAL_COLDSPRING_PATH to point to
the location of ColdSpring.xml, and *ModelGlue_CORE_COLDSPRING_PATH *to
point to the location of ModelGlue/unity/config/Configuration.xml (within
which the relative path to ModelGlue.xml is configured).

Hard coded paths work just fine for those MG _PATH variables. No need to
depend on ExpandPath(). That said, this code fragment is one I’ve used to
back down out of the webroot from index.cfm and into the application
directory:

<cfset ModelGlue_LOCAL_COLDSPRING_PATH = expandPath( ‘…/’ ) &
‘appdir/config/ColdSpring.xml’ />

… and this works for me in my Lucee dev environment. I just tested it
to make sure.

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

On Wed, Jan 13, 2016 at 8:53 AM, Mark Drew mark...@gmail.com wrote:

Set up a mapping. Lucee (unlike Cf) probably has no idea what your
Apache paths are.

Mark Drew

  • Sent by typing with my thumbs.

On 13 Jan 2016, at 07:48, Zac Spitzer zac.s...@gmail.com wrote:

I have an moduleglue app I’m trying to port over to Lucee from CF8 and
I’m having
some problems with ExpandPath and the current 4.5.2 build.

I have an Apache 2.4 virtual server setup which points to the wwwroot
directory,
as I don’t want to expose any files which don’t need to be web
accessible

It all works fine if I set the apache documentRoot to the app root
directory (c:\inetpub\appdir)
and then access the http://localhost/wwwroot/index.cfm directory,
which is obviously sub optimal

but when I set the document root to c:\inetpub\appdir\wwwroot, it falls
over because
the expandPath for the moduleglue file then resolves to

C:\inetpub\appdir\wwwroot\appdir\config\ModelGlue.xml
instead of
C:\inetpub\appdir\config\ModelGlue.xml

any ideas?


Love Lucee? Become a supporter and be part of the Lucee project today!


You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/96fd2935-a9af-4e4d-bc0d-3f47edf4aa98%40googlegroups.com
https://groups.google.com/d/msgid/lucee/96fd2935-a9af-4e4d-bc0d-3f47edf4aa98%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today!


You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/DD1E90D8-0D4F-467E-817E-FE073B2B0CEC%40gmail.com
https://groups.google.com/d/msgid/lucee/DD1E90D8-0D4F-467E-817E-FE073B2B0CEC%40gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html


You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/fc840377-58e9-4492-a059-b819299e2075%40googlegroups.com
https://groups.google.com/d/msgid/lucee/fc840377-58e9-4492-a059-b819299e2075%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

Hi Zac,

Re. the differences between the ACF connector and mod_cfml:
The mod_cfml team has been working to automatically add front-end webserver mappings (Apache aliases / IIS virtual directories) to Lucee, by providing these mappings and their repective paths in a custom http header, x-vdirs.
The upcoming mod_cfml 1.1.08 can also add these mappings to a Tomcat 7+ web context. Unfortunately, Lucee does not check these mappings yet :frowning:
See enhancement request https://luceeserver.atlassian.net/browse/LDEV-694 https://luceeserver.atlassian.net/browse/LDEV-694 for this issue, which I created yesterday.

Kind regards,

Paul Klinkenberg

@nando looking into the MG framework code, hard coded paths look like an option

@mark I do have mappings in place, but that didn’t help

it’s still quite a frustrating clusterf*ck with lucee compared to ACF which just works,
I’m aware that ACF uses some custom AJP extensions to make this seamless,
has there been any motion to update AJP to standardise them?

Zac,

I have an old MG app, getting the paths set up correctly is always a pain when shifting it to a new server. I really dislike the spaghetti nature of the configuration settings. Trips me up every time.

In index.cfm, I set both ModelGlue_LOCAL_COLDSPRING_PATH to point to the location of ColdSpring.xml, and ModelGlue_CORE_COLDSPRING_PATH to point to the location of ModelGlue/unity/config/Configuration.xml (within which the relative path to ModelGlue.xml is configured).

Hard coded paths work just fine for those MG _PATH variables. No need to depend on ExpandPath(). That said, this code fragment is one I’ve used to back down out of the webroot from index.cfm and into the application directory:

<cfset ModelGlue_LOCAL_COLDSPRING_PATH = expandPath( ‘…/’ ) & ‘appdir/config/ColdSpring.xml’ />

… and this works for me in my Lucee dev environment. I just tested it to make sure.

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

Set up a mapping. Lucee (unlike Cf) probably has no idea what your Apache paths are.

Mark Drew

  • Sent by typing with my thumbs.Op 13 jan. 2016, om 11:40 heeft Zac Spitzer <@Zac_Spitzer> het volgende geschreven:
    On Wednesday, 13 January 2016 20:53:46 UTC+11, Nando Breiter wrote:
    On Wed, Jan 13, 2016 at 8:53 AM, Mark Drew <mark…@ <>gmail.com http://gmail.com/> wrote:

On 13 Jan 2016, at 07:48, Zac Spitzer <zac.s…@ <>gmail.com http://gmail.com/> wrote:

I have an moduleglue app I’m trying to port over to Lucee from CF8 and I’m having
some problems with ExpandPath and the current 4.5.2 build.

I have an Apache 2.4 virtual server setup which points to the wwwroot directory,
as I don’t want to expose any files which don’t need to be web accessible

It all works fine if I set the apache documentRoot to the app root directory (c:\inetpub\appdir)
and then access the http://localhost/wwwroot/index.cfm http://localhost/wwwroot/index.cfm directory, which is obviously sub optimal

but when I set the document root to c:\inetpub\appdir\wwwroot, it falls over because
the expandPath for the moduleglue file then resolves to

C:\inetpub\appdir\wwwroot\appdir\config\ModelGlue.xml
instead of
C:\inetpub\appdir\config\ModelGlue.xml

any ideas?


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un…@ <>googlegroups.com http://googlegroups.com/.
To post to this group, send email to lu…@ <>googlegroups.com http://googlegroups.com/.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/96fd2935-a9af-4e4d-bc0d-3f47edf4aa98%40googlegroups.com https://groups.google.com/d/msgid/lucee/96fd2935-a9af-4e4d-bc0d-3f47edf4aa98%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un…@ <>googlegroups.com http://googlegroups.com/.
To post to this group, send email to lu…@ <>googlegroups.com http://googlegroups.com/.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/DD1E90D8-0D4F-467E-817E-FE073B2B0CEC%40gmail.com https://groups.google.com/d/msgid/lucee/DD1E90D8-0D4F-467E-817E-FE073B2B0CEC%40gmail.com?utm_medium=email&utm_source=footer.

For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/fc840377-58e9-4492-a059-b819299e2075%40googlegroups.com https://groups.google.com/d/msgid/lucee/fc840377-58e9-4492-a059-b819299e2075%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

thanks Paul, that sounds great, thanks for all your work on thisOn Fri, Jan 15, 2016 at 11:39 PM, Paul Klinkenberg <@Paul_Klinkenberg wrote:

Hi Zac,

Re. the differences between the ACF connector and mod_cfml:
The mod_cfml team has been working to automatically add front-end
webserver mappings (Apache aliases / IIS virtual directories) to Lucee, by
providing these mappings and their repective paths in a custom http header,
x-vdirs.
The upcoming mod_cfml 1.1.08 can also add these mappings to a Tomcat 7+
web context. Unfortunately, Lucee does not check these mappings yet :frowning:
See enhancement request https://luceeserver.atlassian.net/browse/LDEV-694 for
this issue, which I created yesterday.

Kind regards,

Paul Klinkenberg

Op 13 jan. 2016, om 11:40 heeft Zac Spitzer <@Zac_Spitzer> het
volgende geschreven:

@nando looking into the MG framework code, hard coded paths look like an
option

@mark I do have mappings in place, but that didn’t help

it’s still quite a frustrating clusterf*ck with lucee compared to ACF
which just works,
I’m aware that ACF uses some custom AJP extensions to make this seamless,
has there been any motion to update AJP to standardise them?

On Wednesday, 13 January 2016 20:53:46 UTC+11, Nando Breiter wrote:

Zac,

I have an old MG app, getting the paths set up correctly is always a pain
when shifting it to a new server. I really dislike the spaghetti nature of
the configuration settings. Trips me up every time.

In index.cfm, I set both ModelGlue_LOCAL_COLDSPRING_PATH to point to
the location of ColdSpring.xml, and *ModelGlue_CORE_COLDSPRING_PATH *to
point to the location of ModelGlue/unity/config/Configuration.xml (within
which the relative path to ModelGlue.xml is configured).

Hard coded paths work just fine for those MG _PATH variables. No need to
depend on ExpandPath(). That said, this code fragment is one I’ve used to
back down out of the webroot from index.cfm and into the application
directory:

<cfset ModelGlue_LOCAL_COLDSPRING_PATH = expandPath( ‘…/’ ) &
‘appdir/config/ColdSpring.xml’ />

… and this works for me in my Lucee dev environment. I just tested it
to make sure.

Aria Media Sagl
Via Rompada 40
6987 Caslano
Switzerland

+41 (0)91 600 9601
+41 (0)76 303 4477 cell
skype: ariamedia

On Wed, Jan 13, 2016 at 8:53 AM, Mark Drew mark...@gmail.com wrote:

Set up a mapping. Lucee (unlike Cf) probably has no idea what your
Apache paths are.

Mark Drew

  • Sent by typing with my thumbs.

On 13 Jan 2016, at 07:48, Zac Spitzer zac.s...@gmail.com wrote:

I have an moduleglue app I’m trying to port over to Lucee from CF8 and
I’m having
some problems with ExpandPath and the current 4.5.2 build.

I have an Apache 2.4 virtual server setup which points to the wwwroot
directory,
as I don’t want to expose any files which don’t need to be web accessible

It all works fine if I set the apache documentRoot to the app root
directory (c:\inetpub\appdir)
and then access the http://localhost/wwwroot/index.cfm directory, which
is obviously sub optimal

but when I set the document root to c:\inetpub\appdir\wwwroot, it falls
over because
the expandPath for the moduleglue file then resolves to

C:\inetpub\appdir\wwwroot\appdir\config\ModelGlue.xml
instead of
C:\inetpub\appdir\config\ModelGlue.xml

any ideas?


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/96fd2935-a9af-4e4d-bc0d-3f47edf4aa98%40googlegroups.com
https://groups.google.com/d/msgid/lucee/96fd2935-a9af-4e4d-bc0d-3f47edf4aa98%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google
Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/DD1E90D8-0D4F-467E-817E-FE073B2B0CEC%40gmail.com
https://groups.google.com/d/msgid/lucee/DD1E90D8-0D4F-467E-817E-FE073B2B0CEC%40gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/fc840377-58e9-4492-a059-b819299e2075%40googlegroups.com
https://groups.google.com/d/msgid/lucee/fc840377-58e9-4492-a059-b819299e2075%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/8525149D-1758-4728-8F73-E0ABFA996336%40ongevraagdadvies.nl
https://groups.google.com/d/msgid/lucee/8525149D-1758-4728-8F73-E0ABFA996336%40ongevraagdadvies.nl?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.


Zac Spitzer
+61 405 847 168