Setting up a CF8 and CF7 MX testing environment
Posted in ColdFusion |
Jun 05, 2007 10:33:PM |
So first and for most this is for Windows environments I don't have a Mac or the time to install on my Linux box. The process is pretty easy first download ColdFusion 8 "http://labs.adobe.com/technologies/coldfusion8/", save it to your desktop or your favorite download spot.
Now on to the fun, first right click My Computer on your desk top (or type "services.msc" in the run command) and click manage. Click on the Service and Applications, then Services. Find the 4 services running for CF7 MX and stop each one, you also need to set the Startup to Manual. Once all are stopped you can now install CF8.
The best way to run your code on both without having to move files back and forth, since CF8 and CF7 run in different folders is to set up a virtual path.
To setup a virtual path open C:\CFusionMX7\wwwroot\WEB-INF\jrun-web.xml
This is the default location, at line 29 you will see
Code
<virtual-mapping>
<resource-path>/WEB-INF</resource-path>
<system-path>C:/CFusionMX7/wwwroot/WEB-INF</system-path>
</virtual-mapping>
Below if add this code
Code
<virtual-mapping>
<resource-path>/*</resource-path>
<system-path>e:/</system-path>
</virtual-mapping>
The system path is the location where all your test sites will be located, do the same thing at C:\ColdFusion8\wwwroot\WEB-INF\jrun-web.xml. Now if you add the test.cfm file included in the download below and run http://localhost:8500/test.cfm it will tell you which server you're running.
There are 2 other files in the zip file one called "CF8_to_CF7.bat" if you place this on your desktop and double click it will stop CF8 and start CF7. Once the DOS window closes refresh the test.cfm page and the server number should change to 7. To switch back to CF8 run the CF7_to_CF8.bat file
I would love to create an Apollo app that would switch between the 2 and display the current one running but that's beyond my Apollo skills.
In the test if you haven't noticed yet I added a time output. On my server CF8 displays the current time from my Server but CF7 displays GMT. Let me know what you all find on that.
Print