2 Replies Latest reply on Dec 5, 2010 10:08 AM by Dave Watts

    Why does cfide need to be in webroot when using form tag bind on apache with virtual hosts?




      First, if this thread is ignorant let me excuse myself.  I haven't really programmed in Cold Fusion since the DBML days and it was a CGI interpretter running under O'Reilly webserver.  I have been busy in the Java and PHP world.


      But I digress, I have returned and I am extremely excited about the features and easy of use in Cold Fusion.  I can do a lot more, a lot faster, with a lot less code = more money and more time.


      But,  I just spent almost 3 sleepless days figuring this out and I was wondering if someone could help educate me on this one.  Apologies in advance if this is well documented in the Cold Fusion docs, but I don't read docs, I dive in head first, and usually break my neck.


      I am using interdependent <cfselects> with the bind feature to cfcs to populate them.  I have based it on the <cfselect> tutorial, example 2. 


      For reference it is here: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7a fe.html

      or in your local /cfdocs/


      I am using CF under Apache with virtual hosts.  CF 9.  All setup as a dev machine. 


      For some reason the <cfselect> binding example 2 worked fine in my apache web root. 


      But every time I tried to use the example under a virtual host the test page would find the bindFCNS.cfc but the html <selects> in the output would not populate.  No errors, just no data. 


      Copying the /CFIDE/ to the virtual hosts web root solved the problem.  This did not seem like the inductive reason at the time, which is why I spent 3 days thinking it might be the way I was implementing Request Handlers in the Application.cfc or how I was handling OnError as well as other errata and other programming customizations.


      So, last ditch I just copied the /CFIDE/ to my virtual webroot on two different apache test/dev virtual hosts/domains and these <cfselect> bind examples are working.


      My question is WHY?  Because honestly this seems extremely arbitrary and when I go to production I really don't want to have to deploy the CFIDE in my webroots for each installation of these application.


      So, why?


      Is there another solution?


      How are people managing this?




        • 1. Re: Why does cfide need to be in webroot when using form tag bind on apache with virtual hosts?
          Owain North Level 4

          Hi there


          Apologies if I've missed anything in your post, but as far as I can see this is no different to a Windows server - each Virtual Server in IIS needs a mapping to the CFIDE directory where all the javascript for many ColdFusion ajax functions are stored.


          On our Linux webserver, we have this line in the httpd.conf:


          <IfModule alias_module>
            Alias /CFIDE "/usr/local/apache2/htdocs/CFIDE"


          Which should automatically create this virtual mapping for you, meaning you shouldn't have to copy the directory.


          Again, apologies if I've misunderstood.



          • 2. Re: Why does cfide need to be in webroot when using form tag bind on apache with virtual hosts?
            Dave Watts Adobe Community Professional

            If you look in the source code of your generated document, you'll see URLs that point to /CFIDE/scripts/. There are JavaScript files needed to make the client-side functionality work. You don't have to allow access to all of the CFIDE directory, but those scripts have to be available. You may be able to simply use CFFORM's SCRIPTSRC attribute to point to another location, but I honestly don't know if that will work for bindings - I assume it does, though.


            For proper deployment of the CFIDE directory, you should read the CF 9 lockdown guide available from Adobe - this describes how to prevent access to /CFIDE/administrator and /CFIDE/adminapi/.


            Dave Watts, CTO, Fig Leaf Software




            Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on

            GSA Schedule, and provides the highest caliber vendor-authorized

            instruction at our training centers, online, or onsite.


            Read this before you post: