?
Solved

Configuration of cffm-Coldfusion File Manager

Posted on 2010-11-14
27
Medium Priority
?
748 Views
Last Modified: 2013-12-16
Hello experts.
I need help to configure the cffm.cfm (download url:http://www.opensourcecf.com/cffm/)file to work with my website.

My cffm root folder is:C:\Inetpub\wwwroot\test\Admin\cffm.
What are the right settings to have access to all the test files folder?
below the help file and the cffm.cfm code README.TXT cffm.cfm.txt
0
Comment
Question by:Panos
  • 11
  • 6
  • 5
22 Comments
 
LVL 16

Expert Comment

by:duncancumming
ID: 34134107
Not sure what you mean by the test files folder, but presumably you could just amend this line:

<cfinvokeargument name="includeDir" value="#expandPath(".")#/custom">

Open in new window


and also the argument for includeDirWeb at the same time.
0
 
LVL 2

Author Comment

by:Panos
ID: 34134398
Hi duncancumming
It is working using this:<cfinvokeargument name="includeDir" value="C:\Inetpub\wwwroot\test">

Because i m testing this on my pc i need something like expandpath or request.homeURL if it is possible because i don't know the folder name of the hoster i will have in the future.

0
 
LVL 16

Expert Comment

by:duncancumming
ID: 34134547
In that case I'd suggest:
<cfinvokeargument name="includeDir" value="#expandPath(".")#/test">

Open in new window


Which will work as long as you have a /test/ folder in the root of your webdirectory.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:Panos
ID: 34134639
This is not working because my cffm.cfm page is in the:
C:\Inetpub\wwwroot\test\Admin\cffm  folder

i ave the error:
Directory Not Found: C:\Inetpub\wwwroot\test\Admin\cffm/test
0
 
LVL 16

Expert Comment

by:duncancumming
ID: 34134798
Sorry, try this instead.

<cfinvokeargument name="includeDir" value="#GetDirectoryFromPath(GetBaseTemplatePath())#/test">

Open in new window


You might need to append "/Admin" on the end of that path.
0
 
LVL 2

Author Comment

by:Panos
ID: 34134828
New error:
Directory Not Found: C:\Inetpub\wwwroot\test\Admin\cffm\/test
0
 
LVL 16

Expert Comment

by:duncancumming
ID: 34135004
Did you also update includeDirWeb ?  What line of code is throwing the error?
0
 
LVL 2

Author Comment

by:Panos
ID: 34135042
I set
<cfset request.homeURL = "mytestdomain">
And
<cfinvokeargument name="includeDir" value="#GetDirectoryFromPath(GetBaseTemplatePath())#/test">
      <!--- includeDirWeb = web path to the directory specified above.
            FOR RAM DRIVE:  use "/" (CF9+)
      --->
      <cfinvokeargument name="includeDirWeb" value="#request.homeURL#">

It is not a Coldfusion error but a message on the browser.

Directory Not Found: C:\Inetpub\wwwroot\test\Admin\cffm\/test
0
 
LVL 16

Expert Comment

by:duncancumming
ID: 34135567
In your CF Admin, turn on 'Enable Robust Exception Information' on the Debugging Settings.  This will then give you exactly where in the code the error then happens.
0
 
LVL 2

Author Comment

by:Panos
ID: 34135754
Here is the debugging information
 test.txt
0
 
LVL 13

Expert Comment

by:srikanthmadishetti
ID: 34277238
can you change this to

<cfinvokeargument name="includeDir" value="#GetDirectoryFromPath(GetBaseTemplatePath())#/test">

to

<cfinvokeargument name="includeDir" value="#GetDirectoryFromPath(GetBaseTemplatePath())#test">


remove the "/" before test as GetDirectoryFromPath gets you this C:\Inetpub\wwwroot\test\Admin\cffm\ and when you are trying to add /test it is breaking just add test and see
0
 
LVL 2

Author Comment

by:Panos
ID: 34308534
Sorry.
I did not see the last post.
To make this work i did this changes:
<cfset request.homeURL = "mytestdomain/">
<cfinvokeargument name="includeDir" value="C:\Inetpub\wwwroot\test">
      <!--- includeDirWeb = web path to the directory specified above.
            FOR RAM DRIVE:  use "/" (CF9+)
      --->
      <cfinvokeargument name="includeDirWeb" value="#request.homeurl#">
This :<cfinvokeargument name="includeDir" value="#GetDirectoryFromPath(GetBaseTemplatePath())#test">

does not work.
message:Directory Not Found: C:\Inetpub\wwwroot\test\Admin\cffm\test
0
 
LVL 13

Expert Comment

by:srikanthmadishetti
ID: 34308818
where is ur test folder , "C:\Inetpub\wwwroot\test\Admin\cffm\test" does this folder exist . can u give path to ur test folder
0
 
LVL 13

Expert Comment

by:srikanthmadishetti
ID: 34308848
and also where are you calling this file from .?
0
 
LVL 2

Author Comment

by:Panos
ID: 34309082
I'm calling from:
domain/admin/admin.cfm
to
domain/admin/cffm/cffm.cfm

The "test" is the root folder of my site.
0
 
LVL 2

Author Comment

by:Panos
ID: 34309114
If i use <cfinvokeargument name="includeDir" value="#GetDirectoryFromPath(GetBaseTemplatePath())#">
 i have no error message ang i get in the cffm folder.

root of cffm folder:
C:\Inetpub\wwwroot\test\Admin\cffm
0
 
LVL 13

Expert Comment

by:srikanthmadishetti
ID: 34310344
If i am guessing correct all you want is to point to the root folder test isn't it?

can you confirm me if ur using application.cfm or application.cfc and do u have only one application,cfm for you test folder and it's subfolder
0
 
LVL 13

Accepted Solution

by:
srikanthmadishetti earned 2000 total points
ID: 34310470
If you are looking for your application root path of your site , in your root application,cfm use this

<cfset request.approotPath =  left(getdirectoryfrompath(GetCurrentTemplatePath()),len(getdirectoryfrompath(GetCurrentTemplatePath()))-1)>

in that request.approotpath variable u will get the absolute root path value

if ur using application.cfc set this variable in onrequeststart function .


as it is in application.cfc or application.cfm you can access this variable from any where
0
 
LVL 2

Author Comment

by:Panos
ID: 34312345
I don't know if i have done it in the right way.
I have one application.cfm file in the site root folder and one in the admin folder
site/application.cfm
site/admin/application.cfm

the cffm.cfm file is in the admin folder:
site/admin/cffm/cffm.cfm.

I did add :
<cfset request.approotPath =  left(getdirectoryfrompath(GetCurrentTemplatePath()),len(getdirectoryfrompath(GetCurrentTemplatePath()))-6)> in the application.cfm in the admin folder and it is working.
Is it OK?
0
 
LVL 13

Assisted Solution

by:srikanthmadishetti
srikanthmadishetti earned 2000 total points
ID: 34312877
Are you able to access all the files you want  ? ,

Actually you can create a folder called files and place it in admin folder and then set

<cfset request.approotPath =  getdirectoryfrompath(GetCurrentTemplatePath()) & "files">

so all the files you want you can push this to folder and even file management too can be pointed to this folder .

I think right now all files will be point to root folder admin with your settings

0
 
LVL 2

Author Comment

by:Panos
ID: 34313277
Thank you for your help srikanthmadishetti.
It really took a lot of time to get a working solution.But at least all is working now.
Thank you a lot for your help.
0
 
LVL 2

Author Closing Comment

by:Panos
ID: 34313288
Thank you.
regards
panos
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question