Hi Chris,
you're correct that i don't want to use a relative path, as i always want to
determine my config directory as one level above the webroot. I do not hard
code my mapping paths into app.cfc, i use a convention in all my apps that
the config directory is one level above the webroot - this works fine for me
in many other apps on my server, and others. However i seem to be getting
odd results from expandpath on just one vhost.
... i've just found the problem, a recent update to my control panel
software (virtualmin) has it adding some apache rewriterule directives in
the config (for admin and webmail) removing these has fixed the issue. As
this was a newly created vhost its the only site it was affecting. I'll
file a bug report with them
sorry to disturb :)
2008/10/14 Chris Peterson <[EMAIL PROTECTED]>
> You would not use ../ as the path with a mapping, you would point a mapping
> to a file system location (ie: c:\hosting\mappings\coldspring), then you
> would name it '/coldspring', then your expandPath would look like this:
> expandPath("/coldspring/config"). When you /../ from the application.cfc
> file, you back up into the coldfusion server root, which is what you are
> seeing with the /opt/coldfusion/runtime/bin/config path being returned.
>
> Chris Peterson
>
>
> On Tue, Oct 14, 2008 at 6:03 AM, Chris Blackwell <[EMAIL PROTECTED]>wrote:
>
>> I know this isn't really MG related, but i'm trying to setup mappings on a
>> dev site to move, MG, CS config etc out of the webroot.
>>
>> heres a test case App.cfc thats causing me a problem, this file is located
>> at /home/testapp.dev/public_html/Application.cfc
>>
>> <cfcomponent output="false">
>> <cfset this.name = "testapp.dev" />
>> <cfset config1 = expandpath("/../config") />
>> <cfset config2 = expandpath("../config") />
>> <cfdump var="#config1#"><br />
>> <cfdump var="#config2#">
>> <cfabort>
>> </cfcomponent>
>>
>> if i call /index.cfm the expected output would be
>>
>> /home/testapp.dev/config
>> /home/testapp.dev/config
>>
>> however what i'm getting is
>>
>> /opt/coldfusion8/runtime/bin/config
>> /home/testapp.dev/config
>>
>> now, the really odd thing is this only happens on 1 vhost, and works as
>> expected on others. I'm running cf as a single server on apache, so all
>> vhosts share the server-wide cf process.
>>
>> anyone come accross this behaviour before ?
>>
>> Chris
>>
>>
>>
>>
>>
>
>
> --
> Hey! I dont tell you how to tell me what to do, so dont tell me how to do
> what you tell me to do! ~ Bender (Futurama)
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---