Solved

Configuration of cffm-Coldfusion File Manager

Posted on 2010-11-14
27
719 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
27 Comments
 
LVL 16

Expert Comment

by:duncancumming
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 2

Author Comment

by:Panos
Comment Utility
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
Comment Utility
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
Comment Utility
New error:
Directory Not Found: C:\Inetpub\wwwroot\test\Admin\cffm\/test
0
 
LVL 16

Expert Comment

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

Author Comment

by:Panos
Comment Utility
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
Comment Utility
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
Comment Utility
Here is the debugging information
 test.txt
0
 
LVL 13

Expert Comment

by:srikanthmadishetti
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 2

Author Comment

by:Panos
Comment Utility
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
Comment Utility
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
Comment Utility
and also where are you calling this file from .?
0
 
LVL 2

Author Comment

by:Panos
Comment Utility
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
Comment Utility
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
Comment Utility
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 500 total points
Comment Utility
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
Comment Utility
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 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thank you.
regards
panos
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now