Configuration of cffm-Coldfusion File Manager

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
LVL 2
PanosAsked:
Who is Participating?
 
srikanthmadishettiConnect With a Mentor Commented:
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
 
duncancummingCommented:
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
 
PanosAuthor Commented:
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
Get expert help—faster!

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

 
duncancummingCommented:
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
 
PanosAuthor Commented:
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
 
duncancummingCommented:
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
 
PanosAuthor Commented:
New error:
Directory Not Found: C:\Inetpub\wwwroot\test\Admin\cffm\/test
0
 
duncancummingCommented:
Did you also update includeDirWeb ?  What line of code is throwing the error?
0
 
PanosAuthor Commented:
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
 
duncancummingCommented:
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
 
PanosAuthor Commented:
Here is the debugging information
 test.txt
0
 
srikanthmadishettiCommented:
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
 
PanosAuthor Commented:
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
 
srikanthmadishettiCommented:
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
 
srikanthmadishettiCommented:
and also where are you calling this file from .?
0
 
PanosAuthor Commented:
I'm calling from:
domain/admin/admin.cfm
to
domain/admin/cffm/cffm.cfm

The "test" is the root folder of my site.
0
 
PanosAuthor Commented:
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
 
srikanthmadishettiCommented:
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
 
PanosAuthor Commented:
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
 
srikanthmadishettiConnect With a Mentor Commented:
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
 
PanosAuthor Commented:
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
 
PanosAuthor Commented:
Thank you.
regards
panos
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.