Solved

Configuration of cffm-Coldfusion File Manager

Posted on 2010-11-14
27
735 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 6
  • 5
27 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
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 500 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 500 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

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

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

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Simple Linear Regression

717 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