Hi Russ,

Yes that's correct and I thought I had it right:
dev server
d:\myApp and have my app set up in IIS and host file set, so in the
browser I have:
http://myApp and everything works fine

in  prod
d:\domain is the webRoot and myApp is a folder bellow like this:
d:\domain\myApp\utils\ and  call it like http://www.domain.com/myApp
and I get the error.

A dump of mappings show /domain which in my mind should work fine but
it doesn't (with
absolute path) so obviously I misunderstand something but cant figure
out what :(

Thanks
Victor

On Sat, Apr 2, 2011 at 12:07 PM, Russ Michaels <[email protected]> wrote:
>
> if you want to use absolute paths then the path needs to be same on both
> live and dev. If they are not then the path will of course point to the
> wrong folder.
> This is very straight forward to achieve, as the path only needs to be same
> from the website root, anything above this is local to your dev environment
> and is not important and not part of the calculated path.
>
> You also need to remember that when calculating paths dynamically, some
> functions calculate relative tot he calling template and not the the
> application.cfm/cfc, so you may want to check that this is not the case.
> I know ExpandPath() does the latter, but do not recall if
> getCurrentTemplatePath()
> does the same.
>
> Just dump out the mapping to see what it looks like and you will see where
> it has gone wrong.
> Russ
>
> On Sat, Apr 2, 2011 at 4:45 AM, Victor Moore <[email protected]> wrote:
>
>>
>> Hi,
>>
>> After moving a site to a new sever I start receiving errors:
>> Could not find the included template /utils/lib.cfm. Note: If you wish
>> to use an absolute template path (for example,
>> template="/mypath/index.cfm") with CFINCLUDE, you must create a
>> mapping for the path using the ColdFusion Administrator. Or, you can
>> use per-application settings to specify mappings specific to this
>> application by specifying a mappings struct to THIS.mappings in
>> Application.cfc.
>>
>> I have set up the mappings in the application.cfc like:
>> this.name = listLast (getDirectoryFromPath (getCurrentTemplatePath ()),
>> "\");
>> this.mappings["/"&this.name] =
>> getDirectoryFromPath(getCurrentTemplatePath());
>>
>> the application structure is like this :
>> myApp
>>   utils
>>        lib.cfm
>>   views
>>       subModule
>>            user.cfm
>>
>> and it's deployed like this:
>> webRoot
>>     myApp
>>
>> on my dev box I have set it up so the webroot points to myApp and it's
>> working fin
>>
>> It's also working fine (in both environments) if I use relative path.
>>
>> Any idea how to set it up so it will work in both environments with
>> absolute path?
>>
>> Thanks
>> Victor
>> PS environment CF9.01 and Windows Server 2003, IIS
>>
>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:343494
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to