I am having some issues with SES. Typically, I use TinyFCK (http://p4a.crealabsfoundation.org/tinyfck) for CMS applications so that clients can upload their own images and insert them into the form. Unfortunately, with the 2.5 RC2 when I browse for a file and click upload I get the following error in the AJAX response (looking at Net->Response in Firebug):
Framework Initialization/Configuration Exception
Error Type: interceptors.ses.executingConfigException : [N/A]
Error Messages: Error including config file: The filename, directory name, or volume label syntax is incorrect
When I select ColdFusion and then try and upload an image I get the same error as before with tinyFCK. You may want to replicate this setup and check this bug for yourself.
I changed configAutoReload to false and now the page is coming up as expected. Unfortunately, however, I am getting the following error message:
Error creating folder “C:\JRun4\bin\redirect:\index.cfm\userfiles\image\image” (The specified directory attribute value C:\JRun4\bin\redirect:\index.cfm\userfiles\image\image\ could not be created.)
I’m using “/userfiles/images” as the path. This should place it in the root and would work fine except that the SES is doing something else.
I have tried several paths including some system functions but I cannot get it to work unless I hard code the physical path “c:\wwwroot\northeast\userfiles\images”
If anything jumps out at you please let me know, I’m out of guesses.
The error I am now getting is very much like the error I was getting before when trying to access /admin with the default .htaccess settings (before I removed a line from it). I have tried putting my modified .htaccess file in every directory of fckeditor but that is not working. I have also tried the same thing with the default .htaccess file but that does not work (when I do I get the same error as before when trying to go to /admin).
Why is the path “/userfiles/images” trying to prepend “index.cfm” to it? I know it has to do with the SES URLs.
I just noticed that you removed the line in the cbSESGuide as I had done. Cool.
Is there a function or combination of functions that will get me the physical path to the root of my app? That would make it work I think. All I can think of (and tried just for kicks) was GetDirectoryFromPath(GetBaseTemplatePath()) which gets me the physical path to the current template. I just need it to the app root.
<cffunction name="getApplicationRootPath" returntype="string" hint="Returns the root path of the acting
Application.cfm file." output="false" access="public">
<cfargument name="base_path" default="./" hint="Normally you want to leave this as default" required="false">
<cfset var actual_path = ExpandPath(arguments.base_path)>
<cfif FileExists(ExpandPath(arguments.base_path & "Application.cfm"))>
<cfreturn actual_path>
<cfelseif REFind(".*[/\\].*[/\\].*", actual_path)>
<cfreturn getApplicationRootPath("../#arguments.base_path#")>
<cfelse>
<!--- we have reached the root dir, so throw an error not found --->
<cfthrow message="Unable to determine Application Root Path" detail="#actual_path#">
</cfif>
</cffunction>
The method to use is “controller.getAppRootPath()”
As always, look in the API, the controller is the overseer of your app, so it has several methods that you can use as metadata of your running app. If not, you can also look in the framework settings structure, which should also have the path to your root.
I cannot use any framework specific code because the template is not a view, handler, controller, layout, etc. The file is located in /admin/includes/fckeditor/editor/filemanager/connectors/cfm/config.cfm
I have installed FCKEditor in my admin app under /admin/includes/fckeditor
I am using this for a CMS I’m building that uses FCKEditor for WYSIWYG functionality. In the /admin/includes/fckeditor
/editor/filemanager/connectors/cfm/config.cfm file you have to set the path to the location you would like user uploaded files to be saved to. By default it is set to “’/userfiles/” but that keeps throwing an error because " index.cfm" is being prepended to it. In other words, it is trying to create the files in “index.cfm/userfiles/” which it cannot.
That wouldn’t work. FCKEditor looks for config.cfm in that directory. Also, it would add more complexity then to just add the function from Pete in the config.cfm and use that. However, all of this is kind of missing the point.
While there are ways of working around the problem, it would be better to fix the problem itself. The problem is that “index.cfm” is being prepended to the path when “/” is used. This has something to do with SES. Unfortunately, I don’t know enough about rewrite rules and such.
Since you know more about .htaccess rules I would request that you download FCKEditor and install it in /admin/includes/fckeditor in an app that is in a virtual directory (Apache host). Perhaps you can determine why " index.cfm" is being prepended to the path.
Do you care to test it and work out what I think may be a bug or incompleteness in the .httaccess rule?
Could you tell me how to use these rewrite rules? Should I add them in the .htaccess file located in the /admin directory? If so, do I add them just below RewriteEngine On or below all of the existing rules? Or do I create a new .htaccess file located in /admin/includes/fckeditor/editor/filemanager/connectors/cfm/
Also, that RewriteCond looks specific to my setup as it is checking for a directory called “userfiles”. I am wondering how to make the existing .htaccess file work for all contexts and applications and not just my particular setup of FCKEditor.
What was your experience installing FCKEditor? Did the default setup give you the same errors that I experienced when trying to upload and insert an image into the editor?