<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.hostek.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jakeh</id>
		<title>Hostek.com Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.hostek.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jakeh"/>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/Special:Contributions/Jakeh"/>
		<updated>2026-04-14T19:39:07Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2727</id>
		<title>ColdFusion Tips &amp; Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2727"/>
				<updated>2015-10-09T17:27:22Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* ColdFusion 10 */  indicateded this solution works for versions of CF higher than 10 as well&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Converting Application.cfm to Application.cfc==&lt;br /&gt;
Using an '''Application.cfc''' configuration file offers some advantages over the older style '''Application.cfm''' configuration files. Some of the main features that an Application.cfc file give you are &amp;quot;functions triggered by Application, Session, Request, and Error events&amp;quot; and &amp;quot;Application-Level Mappings and Custom Tag Paths&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are only a few steps required to convert an application to use an Application.cfc file:&lt;br /&gt;
&lt;br /&gt;
NOTE: You should ensure that you have a backup of any files before making changes to them.&lt;br /&gt;
&lt;br /&gt;
===Create an '''Application.cfc''' file===&lt;br /&gt;
&lt;br /&gt;
Below is an example '''Application.cfc''' file with the minimum requirements:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Setup '''onRequest''' function in '''Application.cfc''' to include the '''Application.cfm''' file&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if an Application.cfm file already exists in the root of the application. Below is what the Application.cfc file will look like after this addition:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Copy application settings from the '''cfapplication''' tag and remove the '''cfapplication''' tag===&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if a cfapplication tag is used within the application. Each attribute of the cfapplication tag will need to be copied into the cfscript section at the top of the Application.cfc with the pattern [this.attributeName = &amp;quot;value&amp;quot;;].&lt;br /&gt;
&lt;br /&gt;
For example. The below cfapplication tag would be converted into our Application.cfc example as follows:&lt;br /&gt;
&lt;br /&gt;
'''cfapplication''' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication&lt;br /&gt;
	name = &amp;quot;my_app_name&amp;quot;&lt;br /&gt;
	sessionManagement = &amp;quot;Yes&amp;quot;&lt;br /&gt;
	sessionTimeout = &amp;quot;#createTimeSpan(0,0,20,0)#&amp;quot;&lt;br /&gt;
	setClientCookies = &amp;quot;Yes&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Application.cfc''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = &amp;quot;my_app_name&amp;quot;; // app name from old cfapplication tag&lt;br /&gt;
		this.sessionManagement = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
		this.sessionTimeout = CreateTimeSpan(0,0,20,0);&lt;br /&gt;
		this.setClientCookies = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Do not forget to remove the '''cfapplication''' tag after copying the settings into the '''Application.cfc''' file.&lt;br /&gt;
&lt;br /&gt;
Now that the change is complete, this is a good time to test the application to ensure everything is working correctly with the new setup.&lt;br /&gt;
&lt;br /&gt;
==Per-Application ColdFusion Mappings==&lt;br /&gt;
In ColdFusion 8 and above, it is possible to create per-application mappings through your site's Application.cfc file. If you wish to convert to using an Application.cfc file, follow the steps [[ColdFusion_Tips_%26_Tricks#Converting_Application.cfm_to_Application|here]]. &lt;br /&gt;
&lt;br /&gt;
Once you have your Application.cfc created, you will insert the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.mappings[&amp;quot;/test&amp;quot;]=&amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On your site though, you would change &amp;quot;/test&amp;quot; to the name of your mapping. IMPORTANT: You need to include the forward slash before the name of your mapping. Also, change &amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot; to the full physical path to the folder you wish to map. &lt;br /&gt;
'''Note''': The physical path to your FTP root is listed in the &amp;quot;Site Settings&amp;quot; of your control panel at wcp.hostek.com.&lt;br /&gt;
&lt;br /&gt;
To call a template named &amp;quot;testing.cfm&amp;quot; in the &amp;quot;test&amp;quot; directory we just mapped, you would use this line: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;/test/testing.cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-Application Custom Tag Paths==&lt;br /&gt;
Starting in ColdFusion 8, ColdFusion allows creation of Custom Tag Paths in each site's Application.cfc file. This allows you to create and manage your Custom Tag Paths without having to use CF Administrator (ie. submit a support ticket). The following steps will help you create a Custom Tag Path:&lt;br /&gt;
&lt;br /&gt;
If you do not already have an Application.cfc file in your site's Web root, create one now.&lt;br /&gt;
Place the following code in the Application.cfc file and save:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=&amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you'd replace &amp;quot;yourdomain.com&amp;quot; with your domain name, and &amp;quot;customtagfolder&amp;quot; with the name of the folder you created for your custom tags. &lt;br /&gt;
&lt;br /&gt;
Now you have successfully added your custom tag path. If you have multiple tag paths to add, try using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=ListAppend(THIS.customtagpaths, &amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Per-application Robust Exception Information Settings==&lt;br /&gt;
To enable Robust Exception Information on a ColdFusion application, you will need to add the following to the top of the site's ''Application.cfc'' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = true /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Alternatively, if you wish to ensure Robust Exception Information is ''always'' disabled for an application, add this to the site's ''Application.cfc'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = false /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-application JSON Prefix==&lt;br /&gt;
To enable the JSON Prefix for your application add the following to the site's '''Application.cfc''' file, and adjust the '''secureJSONPrefix''' as desired:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = true&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSONPrefix = &amp;quot;//&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can disable this feature using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = false&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Restart a ColdFusion Application==&lt;br /&gt;
If you ever need to restart your site's ColdFusion application (to pick up a setting change, etc), you can do so via the ApplicationStop() function in ColdFusion 9+. &lt;br /&gt;
&lt;br /&gt;
To use this you can create a file (ex: restart.cfm) containing the following code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset ApplicationStop() /&amp;gt;&lt;br /&gt;
&amp;lt;cflocation url=&amp;quot;index.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When you run the file containing that code your ColdFusion Application will be stopped (flushing your application scope), and when the browser is redirected to the index page the application will start again.&lt;br /&gt;
==CFHTTP Connection Failures over HTTPS==&lt;br /&gt;
===Fixing cfhttp Failures on Shared Hosting===&lt;br /&gt;
If you try to use &amp;lt;cfhttp&amp;gt; to connect to a secure site (over HTTPS), you may receive the following error: &amp;quot;Connection Failure: Status code unavailable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this add the following code to your site's &amp;quot;Application.cfm&amp;quot; file (below the 'cfapplication' tag):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- fix for HTTPS connection failures ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif NOT isDefined(&amp;quot;Application.sslfix&amp;quot;)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity = createObject(&amp;quot;java&amp;quot;, &amp;quot;java.security.Security&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity.removeProvider(&amp;quot;JsafeJCE&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset Application.sslfix = true /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If your site uses an &amp;quot;Application.cfc&amp;quot; file instead, then just place that code in the &amp;quot;'onApplicationStart()&amp;quot; method of that file. After making that adjustment you'll need to restart your ColdFusion application as [[ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application|shown here]]. If you still run into issues though, you will need to [https://support.hostek.com/ submit a support ticket] asking our team to install the remote site's SSL certificate into ColdFusion's Java Certificate Store.&lt;br /&gt;
&lt;br /&gt;
===Fixing cfhttp Failures on VPS Hosting===&lt;br /&gt;
If you are having issues connecting to a site or file from with ColdFusion over HTTPS, you can import the remote site's SSL certificate into the the Java SSL Certificate Store used by ColdFusion.&lt;br /&gt;
====Fixing cfhttp Connection Failures with Keytool====&lt;br /&gt;
'''1) Set Java environment'''&amp;lt;br&amp;gt;&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable in the next command. For '''example''', you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
In that case, you would use '''C:\ColdFusion10\jre''' as the value of JAVA_HOME as shown below. Open a command prompt and issue the following commands:&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set JAVA_HOME=C:\ColdFusion10\jre&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set PATH=%PATH%;%JAVA_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, use the following commands (case-sensitive) in your terminal:&lt;br /&gt;
This '''example''' assumes that the JRE is located at ''/opt/coldfusion10/jre''&lt;br /&gt;
    export JAVA_HOME=/opt/coldfusion10/jre&lt;br /&gt;
    export PATH=$PATH:/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
'''2) List the Keystore Contents'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Java installation is at ''C:\ColdFusion10\jre'', then navigate to '''C:\ColdFusion10\jre\bin''':&lt;br /&gt;
    cd C:\ColdFusion10\jre\bin&lt;br /&gt;
If you're using a '''Linux/cPanel''' server, use this command instead:&lt;br /&gt;
    cd /opt/coldfusion10/jre/bin&lt;br /&gt;
&lt;br /&gt;
Now you can list the keystore contents ''(Windows &amp;amp; Linux)'':&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 76 entries&lt;br /&gt;
&lt;br /&gt;
'''3) Import certificate in to keystore and list to check added '''&amp;lt;br&amp;gt;&lt;br /&gt;
''(assumes you've downloaded the certificate to '''c:\temp\inet.cer''' (Windows) or '''/temp/inet.cer''' (Linux/cPanel)''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file c:\temp\inet.cer&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file /temp/inet.cer&lt;br /&gt;
    Trust this certificate? [no]: y&lt;br /&gt;
    Certificate was added to keystore&lt;br /&gt;
&lt;br /&gt;
Now verify the keystore contains your new certificate&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 77 entries&lt;br /&gt;
&lt;br /&gt;
'''4) Restart the ColdFusion application service so the keystore is re-read.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''5) Run your cfhttp request - HTTPS works now!'''&lt;br /&gt;
&lt;br /&gt;
====Fixing cfhttp Connection Failures with Portecle====&lt;br /&gt;
If you'd rather import certificates into the Java SSL Keystore through a GUI, follow these directions to use a tool named Portecle to do so:&lt;br /&gt;
&lt;br /&gt;
#Ensure your JAVA_HOME variable is set correctly as described above.&lt;br /&gt;
#Download Portecle from Sourceforge: [http://sourceforge.net/projects/portecle/ Portecle Project Homepage]&lt;br /&gt;
#Extract the files&lt;br /&gt;
#Open a Command Prompt and navigate to the extracted directory&lt;br /&gt;
#Issue this command to launch Portecle: &amp;lt;pre&amp;gt;java -jar portecle.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#In Notepad, open your jvm.config file to find the JVM PATH for ColdFusion's JVM; look for '''java.home={path here}'''&lt;br /&gt;
#In Portecle click ''File'', ''Open Keystore File''&lt;br /&gt;
#Browse to {JVM PATH}\jre\lib\security to the path, and open the cacerts file; Enter Password: '''changeit'''&lt;br /&gt;
#Click on '''Tools''', '''Import Trusted Certificate''', select the certificate you wish to import.&lt;br /&gt;
#*To obtain the certificate, you can navigate in a browser to the site where the certificate resides, then download the certificate to a .CER file, in the '''DER''' format (or the '''X.509''' format) through the browser.&lt;br /&gt;
#*#In IE on the server where you will import the certificate into ColdFusion, browse to the site where you will import the cert from.&lt;br /&gt;
#*#Click on the lock, then view the certificate. &lt;br /&gt;
#*#Click the details, click &amp;quot;Copy to file&amp;quot; click through.&lt;br /&gt;
#*#Select DER format, then save to &amp;quot;D:\certs&amp;quot; or &amp;quot;C:\certs&amp;quot; (if the folder isn't there, simply create it). &lt;br /&gt;
#Click '''OK''' to import and '''YES''' to accept the certificate as ''trusted''.&lt;br /&gt;
#Click '''OK''' again, usually you won't need to change the Alias name; click '''OK''' to finish.&lt;br /&gt;
#Click '''File''', '''Save Keystore'''.&lt;br /&gt;
#Close Portecle.&lt;br /&gt;
*'''Important:''' A ColdFusion Restart is necessary for this to take effect.&lt;br /&gt;
&lt;br /&gt;
====Fixing CFHTTP Failures Related to Cached DNS Records====&lt;br /&gt;
This solution will prevent Java from caching DNS records for the life of the ColdFusion process. Instead, Java will refresh its records periodically.&lt;br /&gt;
&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable to find the location of the Java installation used by ColdFusion. &lt;br /&gt;
&lt;br /&gt;
For '''example''', on '''Windows''' you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
On '''Linux''' you may see this:&lt;br /&gt;
    java.home=/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
Navigate to the '''security''' folder within the Java installation used by ColdFusion. For '''example''':&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows''' ''(open in Windows Explorer)''&lt;br /&gt;
    C:\ColdFusion10\jre\lib\security\&lt;br /&gt;
'''Linux\cPanel'''&lt;br /&gt;
    cd /opt/coldfusion10/jre/lib/security/&lt;br /&gt;
&lt;br /&gt;
Back-up, then edit the '''java.security''' file within that folder and change the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
'''From'''&lt;br /&gt;
    #networkaddress.cache.ttl=-1&lt;br /&gt;
'''To'''&lt;br /&gt;
    networkaddress.cache.ttl=600&lt;br /&gt;
&lt;br /&gt;
''Note:'' The above value refreshes DNS records every 600 seconds ''(10 minutes)''. You may adjust it to whatever you feel is appropriate for your server.&lt;br /&gt;
&lt;br /&gt;
Now '''Save''' the file then '''Restart ColdFusion''', and the new DNS caching setting will take effect.&lt;br /&gt;
&lt;br /&gt;
==CFMAIL Multi-Part Emails==&lt;br /&gt;
Sending emails with both Text and HTML parts helps reduce the chance of your messages getting caught by a mail server's spam filter. It also helps ensure your recipients can read the message regardless of the mail client being used. The easiest way to do this is to store your message in a variable using &amp;lt;cfsavecontent&amp;gt; then adding it to &amp;lt;cfmail&amp;gt; using &amp;lt;cfmailpart&amp;gt; as shown in the example below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Store your message in a variable ---&amp;gt;&lt;br /&gt;
&amp;lt;cfsavecontent variable=&amp;quot;myemailcontent&amp;quot;&amp;gt;&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
This is some plain text. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;And this is some more text in HTML. It will appear in plain-text for anyone who views the Text part of this email, though.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/cfsavecontent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- Function to strip HTML from message while preserving line breaks ---&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name= &amp;quot;textMessage&amp;quot; access= &amp;quot;public&amp;quot; returntype= &amp;quot;string&amp;quot; hint= &amp;quot;Converts an html email message into a nicely formatted with line breaks plain text message&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfargument name= &amp;quot;string&amp;quot; required= &amp;quot;true&amp;quot; type= &amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfscript&amp;gt;&lt;br /&gt;
      var pattern = &amp;quot; &amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
      var CRLF = chr( 13) &amp;amp; chr( 10);&lt;br /&gt;
      var message = ReplaceNoCase(arguments.string, pattern, CRLF , &amp;quot;ALL&amp;quot;);&lt;br /&gt;
      pattern = &amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;;&lt;br /&gt;
    &amp;lt;/cfscript&amp;gt;&lt;br /&gt;
    &amp;lt;cfreturn REReplaceNoCase(message, pattern, &amp;quot;&amp;quot; , &amp;quot;ALL&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!--- Now send the email. When adding the Text part, we'll use the textMessage() function we just created to strip out HTML tags. ---&amp;gt;&lt;br /&gt;
&amp;lt;cfmail from=&amp;quot;sender@domain.com&amp;quot; to=&amp;quot;recipient@anotherdomain.com&amp;quot; subject=&amp;quot;Multi-part Email with CFMAIL&amp;quot; type=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/plain&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#textmessage(myemailcontent)#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/html&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#myemailcontent#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: [http://cookbooks.adobe.com/post_CFMAIL_the_right_way-17875.html CFMAIL the right way]&lt;br /&gt;
&lt;br /&gt;
==Scheduling Tasks in ColdFusion==&lt;br /&gt;
On occasion shared ColdFusion hosting customers need to setup Scheduled Task to run files on a cycle. &lt;br /&gt;
&lt;br /&gt;
This can be done with the following steps, making use of ColdFusion's &amp;lt;cfschedule&amp;gt; tag:&lt;br /&gt;
&lt;br /&gt;
#Create a file locally using any text editor, save the file with the .CFM extension (example: setschedule_example.cfm).&lt;br /&gt;
#Copy and past in the code example below taken from ''ColdFusion's Documentation'' and save.&lt;br /&gt;
#Replace the data in the example note the following recommendations.&amp;lt;br /&amp;gt;!- Name each file made for creating a schedule with the name of the task so you can reference the task later if needed. Specific naming will also make it more difficult for someone to randomly run the file.&amp;lt;br /&amp;gt;!- If you need to schedule a job to run monthly on any date in the range 28-31, read about how ColdFusion will handle the scheduling in the ColdFuison8 documentation referenced below.&lt;br /&gt;
#Working example, the code example below is a working tested solution for getting the weather for a specific zip code and the task to email the results.&lt;br /&gt;
&lt;br /&gt;
'''Scheduled Task'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- This sets the initial task, if your just wanting to set the schedule --&amp;gt;&lt;br /&gt;
&amp;lt;cfschedule action = &amp;quot;update&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot; &lt;br /&gt;
    operation = &amp;quot;HTTPRequest&amp;quot;&lt;br /&gt;
    url = &amp;quot;http://test.hostek.net/weather_send.cfm&amp;quot;&lt;br /&gt;
    startDate = &amp;quot;7/6/09&amp;quot;&lt;br /&gt;
    startTime = &amp;quot;09:30 AM&amp;quot;&lt;br /&gt;
    interval = &amp;quot;3600&amp;quot;&lt;br /&gt;
    resolveURL = &amp;quot;Yes&amp;quot;&lt;br /&gt;
    requestTimeOut = &amp;quot;600&amp;quot;&lt;br /&gt;
    mode = &amp;quot;application&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task created to be deleted, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;delete&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task to be paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;pause&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task resumed if paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;resume&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Weather Collector'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;CF External Weather Checker&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfset zip=&amp;quot;12345&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;cfinvoke webservice=&amp;quot;http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl&amp;quot; method=&amp;quot;getCityWeatherByZIP&amp;quot; returnvariable=&amp;quot;aWeatherReturn&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cfinvokeargument name=&amp;quot;ZIP&amp;quot; value=&amp;quot;#zip#&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aWeatherReturn.temperature EQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt; I cannot get the weather for #zip# external http connections must be DOWN.&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;cfset message=&amp;quot;The temperature for #zip# (Your city) is #aWeatherReturn.temperature# degrees.&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif message NEQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfmail from = &amp;quot;weather.server@test.com&amp;quot; to = &amp;quot;test@test.com&amp;quot; subject = &amp;quot;Weather checker&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#message#&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note''': We highly recommend setting the ''mode'' attribute of cfschedule to ''application''. This will ensure your site's application is the only one allowed to modify the task. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''More information on using CFSchedule'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/cfschedule Adobe ColdFusion Documentation - CFSchedule]&lt;br /&gt;
*[http://www.isummation.com/blog/configuring-coldfusion-scheduled-tasks-using-the-cfschedule-tag/ iSummation Blog - Configuring ColdFusion Scheduled Tasks using the CFSCHEDULE tag]&lt;br /&gt;
&lt;br /&gt;
==Session Management - Handling Bots and Spiders==&lt;br /&gt;
===Robots.txt File===&lt;br /&gt;
First and foremost we suggest creating a robots.txt file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time. Second to prevent specific bots from crawling the website. &lt;br /&gt;
&lt;br /&gt;
Please see our [[Robots|robots.txt article]] for more information on implementing a robots.txt on your site.&lt;br /&gt;
&lt;br /&gt;
===Lower Session Timeouts for Bots and Spiders===&lt;br /&gt;
Next we suggest setting your session timeout specifically lower for bots and spiders. These spiders and bots will crawl a page and when a session (ColdFusion) is created, it will persist during then entire page load. The page fully loaded allows the bot or spider to get the information from the Web page AND allows the session to expire quickly protecting ColdFusion from effects similar to a memory leak. &lt;br /&gt;
&lt;br /&gt;
To do this, implement the appropriate solution for your site below:&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfm'''====&lt;br /&gt;
Place this code at the top of your Application.cfm file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then use the '''REQUEST.sessionTimeout''' variable to specify the session timeout period in your '''cfapplication''' tag: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication name=&amp;quot;myawesomeapp&amp;quot;&lt;br /&gt;
     sessionmanagement=&amp;quot;Yes&amp;quot;&lt;br /&gt;
     sessiontimeout=&amp;quot;#REQUEST.sessionTimeout#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (tag-based)====&lt;br /&gt;
If you primarily use cfml tags in your Application.cfc, you can set the Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
 &amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (cfscript)====&lt;br /&gt;
If instead, you're using cfscipt in your Application.cfc, you'll set the custom Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
// This checks if a cookie is created, for bots this will return false and use the low session timeout&lt;br /&gt;
if (StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) || StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)){&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,30,0);&lt;br /&gt;
} else {&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,0,2);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.bennadel.com/blog/1083-ColdFusion-Session-Management-And-Spiders-Bots.htm Session Management code examples for the Application.cfm]&lt;br /&gt;
&lt;br /&gt;
==Creating Client Variables Tables for MySQL Databases==&lt;br /&gt;
If you need your datasource set up as a ColdFusion Client Variables Store, you can enable the '''Client Variables'' option in your ColdFusion datasource within the WCP control panel. &lt;br /&gt;
&lt;br /&gt;
Please note, if your datasource MySQL DSN, you'll need to create the necessary tables prior to using the Client Variable Store. To do this you would need to create two tables, one named &amp;quot;cdata&amp;quot; and one named &amp;quot;cglobal&amp;quot;. The SQL you'd use to create those tables is below:&lt;br /&gt;
&lt;br /&gt;
Table: '''cdata'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
 CREATE TABLE IF NOT EXISTS cdata (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          app varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          PRIMARY KEY (cfid,app)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Table: '''cglobal'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS cglobal (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          lvisit timestamp,&lt;br /&gt;
          KEY cfid (cfid),&lt;br /&gt;
          KEY lvisit (lvisit)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Output CF Error details without CFDump==&lt;br /&gt;
It is common in an error handler that you want to output all of the error details to the screen, a file, or an email. Therefore, the cfdump tag is commonly used for this; and, while this works well in development, it is not always the best practice on a production site because of the performance of the cfdump tag due to its use of reflection (Runtime type introspection).&lt;br /&gt;
&lt;br /&gt;
A better performing alternative is to output the information you want directly from the Error/Exception struct within a 'cfoutput' tag. This can be done by looking up the cferror structure or the cfcatch structure in the ColdFusion docs to see what is available and what values you might want to output:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Error''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cferror&amp;lt;br /&amp;gt;&lt;br /&gt;
'''CFCatch''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cfcatch&lt;br /&gt;
&lt;br /&gt;
===Cfdump Custom Tag Alternative===&lt;br /&gt;
You can also use the following link to download an example CF custom tag that will give a similar error output as when using the cfdump tag on an error variable:&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the custom tag's usage:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the error handler specified in your 'cferror' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cf_OutputError Error=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code would replace:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfdump var=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in a cfcatch block:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cftry&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;cfcatch&amp;gt;&lt;br /&gt;
   &amp;lt;cf_OutputCFCatch CFCatch=&amp;quot;#CFCatch#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/cfcatch&amp;gt;&lt;br /&gt;
&amp;lt;/cftry&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configure ColdFusion to Handle html and htm Files==&lt;br /&gt;
===Enable HTML/HTM as CFML on Shared Accounts===&lt;br /&gt;
On our ColdFusion servers, the best way to process HTML files (.html, .htm) as ColdFusion/CFML (.cfm files) is by using a set of rewrite rules that route the HTML files through a ColdFusion &amp;quot;controller&amp;quot; script. The main benefits of this approach are that it is easy to implement on a site-by-site basis, and it works with any version of ColdFusion. To implement this approach on your site, follow the steps below:&lt;br /&gt;
====Step 1: Add Rewrite Rules to Route HTML Files through the CFM Controller====&lt;br /&gt;
If you have a '.htaccess' file in your webroot, add the rules below to the top of that file. Otherwise, create a file named '.htaccess' in your site's web root and place these rules within it:&lt;br /&gt;
=====For Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.html htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====For Sites Using .HTM Files=====&lt;br /&gt;
'''NOTE:''' If your site uses ''.htm'' files instead of ''.html'' files, use this set of rules instead. The only difference is ''html'' is replaced with ''.htm''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.htm htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 2: Create the ColdFusion Controller Script (htmlcontrol.cfm)====&lt;br /&gt;
Now we just need to create a ColdFusion script that will process the HTML files. To do this, create a file named '''htmlcontrol.cfm''' within your site's web root. Place this CFML code within the file:&lt;br /&gt;
=====CFML for Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.html&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====CFML for Sites Using .HTM Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.htm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you save the controller script, your site will begin processing any ColdFusion/CFML code within your HTML files.&lt;br /&gt;
===Enable HTML/HTM as CFML on a VPS===&lt;br /&gt;
In case you need to process ColdFusion code in your .htm or .html files, here is what you will need to do to get this to work. This is based on using ColdFusion on one of our dedicated server hosting accounts on a Windows server.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This will affect every site on the server, so use cautiously.&lt;br /&gt;
&lt;br /&gt;
First, you will need to edit the web.xml file located generally at C:\ColdFusion10\cfusion\wwwroot\WEB-INF&lt;br /&gt;
&lt;br /&gt;
Open this file and look for '''coldfusion_mapping_1'''.&lt;br /&gt;
&lt;br /&gt;
Scroll down the file until you see the last number increment like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;servlet-mapping id=&amp;quot;macromedia_mapping_15&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then add the following right below the closing &amp;lt;/servlet-mapping&amp;gt; of the last number increment item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_16&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_17&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_18&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_19&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save this file and exit.&lt;br /&gt;
&lt;br /&gt;
Now in IIS, setup a mapping for the site:&lt;br /&gt;
#In IIS 7+ click the server name section (right below the '''Start Page''' in the left-hand navigation), then double-click the '''Handler Mappings''' icon.&lt;br /&gt;
#Select and &amp;quot;edit&amp;quot; the '''*.cfm''' record and copy the value of &amp;quot;executable&amp;quot;. Now hit Cancel and then click '''Add Script Map'''. &lt;br /&gt;
#Paste the executable value copied from the '''*.cfm''' record and type '''*.htm''' into the '''Request Path''' and hit OK. &lt;br /&gt;
#Repeat the above steps to add a handler for '''*.html''' &lt;br /&gt;
&lt;br /&gt;
Lastly, open the '''uriworkermap.properties''' file for your ColdFusion 10 IIS Connector in a text editor such as Notepad. On a standard ColdFusion installation this is located at: &amp;lt;pre&amp;gt;C:\ColdFusion10\config\wsconfig\1\uriworkermap.properties&amp;lt;/pre&amp;gt;&lt;br /&gt;
Copy the following lines, paste them at the bottom of the file, then save and close the file: &amp;lt;pre&amp;gt;/*.html = cfusion&lt;br /&gt;
/*.htm = cfusion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the ColdFusion service and IIS. ColdFusion should begin processing CFML within htm/html files now.&lt;br /&gt;
&lt;br /&gt;
==Increase the ColdFusion Post Parameters Limit==&lt;br /&gt;
===ColdFusion 10+===&lt;br /&gt;
In ColdFusion 10 and higher, you can easily increase the value of ColdFusion's '''postParametersLimit''' via the ColdFusion Administrator. Once logged into the ColdFusion Administrator, click the '''Settings''' link then scroll to the bottom of the page. Set the value for the Post Parameters Limit to the desired limit and click the submit button.&lt;br /&gt;
&lt;br /&gt;
===ColdFusion 9 and below===&lt;br /&gt;
To adjust the Post Parameters Limit setting in ColdFusion 9 and below, you will have to edit the server's '''neo-runtime.xml''' file which is located here on a standard installation: &amp;lt;pre&amp;gt;C:\ColdFusion9\lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open that file in a text editor such as Notepad, then search for the '''postSizeLimit''' tag. It will look similar to this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postSizeLimit'&amp;gt;&amp;lt;number&amp;gt;100.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediately after that set of tags, paste this chunk of text: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postParametersLimit'&amp;gt;&amp;lt;number&amp;gt;1000.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once you've adjusted the file, you'll just need to save your changes and restart ColdFusion for the new setting to go into effect. '''Note''': The value of '''1000''' is just an example, so you can increase it as needed. &lt;br /&gt;
&lt;br /&gt;
==Loading custom Java library or Java Libraries (jar or class files) in ColdFusion 10==&lt;br /&gt;
ColdFusion 10 makes it easy to load Java libraries into your ColdFusion application without having to restart ColdFusion. All that's required is your application define the 'THIS.javaSettings' attribute within the site's Application.cfc like below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.javaSettings = {LoadPaths = [&amp;quot;/javafiles/&amp;quot;], loadColdFusionClassPath = true, reloadOnChange=false}/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will check the ''javafiles'' directory in your Web root for 'jar' and 'class' files and make any libraries within the directory accessible from your ColdFusion application. If you modify the JAR files in your ''javafiles'' directory though, ColdFusion will need to be restarted to load the new versions of the JAR files. &lt;br /&gt;
&lt;br /&gt;
'''References''': &lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/Enhanced+Java+integration+in+ColdFusion+10 Adobe ColdFusion Documentation - Enhanced Java Integration in ColdFusion]&lt;br /&gt;
*[http://www.raymondcamden.com/2014/6/16/Issue-with-ColdFusion-JavaSettings-and-ReloadOnChange Ray Camden's Blog - Issue with ColdFusion JavaSettings and ReloadOnChange]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Permission denied for creating Java object: coldfusion.server.ServiceFactory''==&lt;br /&gt;
===When using Mura or using Transfer ORM===&lt;br /&gt;
====Issue====&lt;br /&gt;
If you are using '''Mura''' or using '''Transfer ORM''' and you get this error, ''Permission denied for creating Java object: coldfusion.server.ServiceFactory'', you are likely using an outdated version of Mura and also are probably on a ColdFusion 9 server. The Transfer ORM component causing this issue has not been updated to work with ColdFusion 9. There is a quick fix though:&lt;br /&gt;
====Solution====&lt;br /&gt;
Find the file named CFMLVersion.cfc which should be at '''/wwwroot/requirements/transfer/com/factory'''.&lt;br /&gt;
&lt;br /&gt;
Edit that file and find the line that has:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And change that to:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;) OR server.coldfusion.productversion.startsWith(&amp;quot;9&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save the file and it should now work.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Since this is likely running an outdated version of Mura, we highly recommend updating Mura to the latest version to take advantage of numerous performance and security enhancements.&lt;br /&gt;
===When using DataMgr===&lt;br /&gt;
If you get this error while using DataMgr.cfc, the changes described below will solve this problem:&lt;br /&gt;
&lt;br /&gt;
Here is the section of code from the original DataMgr.cfc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection = getConnection()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset db = connection.getMetaData().getDatabaseProductName()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection.close()&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = db2&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is what the modified code should look like (this sample assume MySQL)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of changes''':&lt;br /&gt;
&lt;br /&gt;
These 3 lines were commented out:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line needed quotes around db2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And lastly, this line needed added:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you are using an ''MS Access'' database instead of ''MySQL'', replace '''MYSQL''' with '''msaccessjet''' on the line that is added.&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Security: The requested template has been denied access to {file/directory}''==&lt;br /&gt;
===Issue===&lt;br /&gt;
Our shared servers have ColdFusion Sandbox Security enabled, which requires absolute filesystem paths to be provided to tags and functions that interact with the filesystem. If you receive an error that starts with ''Security: The requested template has been denied access to ...'', then it is followed by a relative path, you'll need to replace the relative path with a full path.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
One way to do this is to hard-code the path (''d:\home\sitename.com\wwwroot\filename.jpg''), but that can cause portability problems if your site is ever moved to a different environment. &lt;br /&gt;
&lt;br /&gt;
A better way to do this would be to &amp;quot;wrap&amp;quot; your relative path with the '''ExpandPath()''' function. The ''ExpandPath()'' function will automatically detect the absolute filesystem path to the file, and ColdFusion will no longer give you a permissions error. &lt;br /&gt;
&lt;br /&gt;
'''More info''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/ExpandPath Adobe Documentation - ExpandPath]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion COM Object Error ''java.lang.RuntimeException: Can not use native code: Initialisation failed''==&lt;br /&gt;
The error ''java.lang.RuntimeException: Can not use native code: Initialisation failed'' is related to calling a 32-bit COM object from within a 64-bit ColdFusion installation. &lt;br /&gt;
&lt;br /&gt;
The simplest way to bypass this error is to write a small ASP Webservice to proxy the call to the COM object as shown in '''Option 2''' of this blog post: [http://coldfusion9.blogspot.com/2010/05/32-bit-components-on-64-bit-coldfusion.html 32-bit Components on 64-bit ColdFusion]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can [https://support.hostek.com/ ask Support] to move your site to a 32-bit ColdFusion server.&lt;br /&gt;
&lt;br /&gt;
==Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated Server==&lt;br /&gt;
To use Seefusion, visit the address mentioned in your server's Welcome email.&lt;br /&gt;
&lt;br /&gt;
Once loaded, you'll see a summary of memory consumption, average response time, number of requests processed by ColdFusion per second, and a view of currently running ColdFusion requests. &lt;br /&gt;
===Finding Scripts to Optimize===&lt;br /&gt;
When using Seefusion it is helpful to look at the '''Slow''' section of the request monitor. This will show you recent requests that took longer than 8 seconds to complete, giving you a good idea of what scripts need optimization. &lt;br /&gt;
===Stack Tracing with Seefusion===&lt;br /&gt;
Additionally, when a request is running in the '''Active''' section of Seefusion's request monitor, you can click the paper stack icon to the left of the request to view a stack trace of the request. A stack trace tells you what line of code is currently being processed by the request. &lt;br /&gt;
&lt;br /&gt;
Once the stack trace loads, start at the top and work your way down until you find a recognizable path to a ColdFusion template (''eg. c:\home\mysite.com\wwwroot\index.cfm: 47''). This tells you the template currently being executed followed by the line number being processed at that moment in time. If a request consistently shows the same line of code in subsequent stack traces, then you've found the main area to focus on optimizing.&lt;br /&gt;
&lt;br /&gt;
To make deciphering stack traces easier, you can also click the '''Seestack''' button at the top of the stack trace window. This will send the stack trace to a service that will analyze the trace and attempt to tell you where you need to focus.&lt;br /&gt;
&lt;br /&gt;
===Viewing Metrics over Time===&lt;br /&gt;
If you want to watch how response times and memory utilization in a more granular manner than the dashboard graphs show, you'll want to click the '''Counters''' button at the top of SeeFusion. Once on the Counters page you can select a time interval, then have Seefusion display performance metrics at the interval you selected. This is helpful to ensure requests are completing quickly and not exhausting ColdFusion's memory.&lt;br /&gt;
&lt;br /&gt;
==How to Wrap Your ColdFusion DSN with Seefusion==&lt;br /&gt;
If you wish to have Seefusion monitor your server's query activity, you'll need to &amp;quot;wrap&amp;quot; your DSN with SeeFusion's JDBC driver so Seefusion can monitor the DSN's activity. &lt;br /&gt;
===Install SeeDSN===&lt;br /&gt;
SeeDSN is a plugin for ColdFusion Administrator that makes it easy to wrap a DSN with Seefusion. Follow these directions to install SeeDSN:&lt;br /&gt;
#Download the SeeDSN archive [http://www.seefusion.com/seedsn_v1.1.zip here].&lt;br /&gt;
#Extract the '''seedsn''' folder within the archive to your '''/CFIDE/Administrator/''' folder. This means it will be located at ''/CFIDE/Administrator/seedsn'' once extracted. &lt;br /&gt;
#Move ''/CFIDE/Administrator/seedsn/custommenu.xml'' to ''/CFIDE/Administrator/custommenu.xml''&lt;br /&gt;
===Add Seefusion.jar to the ColdFusion Classpath===&lt;br /&gt;
In order for ColdFusion to use Seefusion's JDBC driver, you'll need to ensure '''seefusion.jar''' is on your ColdFusion class path. Follow these directions to add seefusion.jar to the Coldfusion class path:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Click the '''Java and JVM''' link on the left, under Server Settings.&lt;br /&gt;
#In the box labeled '''ColdFusion Class Path''' add the path to your '''seefusion.jar''' file and click ''Submit Changes''. For example, if it is located in ColdFusion's &amp;quot;WEB-INF\lib&amp;quot; folder, you can add this to the Class Path: '''{application.home}/wwwroot/WEB-INF/lib/seefusion.jar'''. &lt;br /&gt;
#*Each path in the ColdFusion Class Path is separated by a comma, so be sure to add a comma right before the path to seefusion.jar (do not add any spaces).&lt;br /&gt;
#Restart ColdFusion after modifying the class path&lt;br /&gt;
&lt;br /&gt;
===Wrap a DSN using SeeDSN===&lt;br /&gt;
Once you've installed SeeDSN and restarted ColdFusion, you can wrap a DSN with the SeeFusion JDBC driver. Follow these instructions to do so: &lt;br /&gt;
#Log into ColdFusion Administrator&lt;br /&gt;
#Expand the ''SeeFusion'' navigation menu on the left and click '''Datasource Wrapper'''&lt;br /&gt;
#On the ''Datasource Wrapper'' page, you'll see a list of DSNs on your server. To wrap a DSN, click the ''Start'' [[File:Start.png]] icon next to your DSN. SeeDSN will automatically wrap your DSN with the SeeFusion driver and display '''OK''' if it is successful.&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/ WebApper Blog - Using SeeDSN JDBC Wrapping Tool]&lt;br /&gt;
&lt;br /&gt;
==Using fckEditor on ColdFusion 10 or Higher==&lt;br /&gt;
When getting the following error for fckEditor:&lt;br /&gt;
 '''&amp;quot;The server didn't reply with a proper XML data. Please check your configuration.&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
If you are on a ColdFusion 10+ server this will be cause by the '''FileUpload()''' function that is being used.&lt;br /&gt;
In ColdFusion 10+ ''FileUpload'' is a built-in function name, so you'll need to rename the ''FileUpload'' function used in fckeditor.&lt;br /&gt;
You can update the text for fckeditor by changing all instances of &amp;quot;FileUpload&amp;quot; to &amp;quot;fckFileUpload&amp;quot; to remove this conflict.&lt;br /&gt;
&lt;br /&gt;
==Optimze CFIMAGE Rendering in Three Steps==&lt;br /&gt;
===USE===&lt;br /&gt;
When full size images are required, re-sized images need to be used for displaying smaller images or thumbnails and the application needs to perform at optimal speed for displaying images in a browser. &lt;br /&gt;
&lt;br /&gt;
===KEY POINTS===&lt;br /&gt;
Except for during development cfimage '''action=&amp;quot;writeToBrowser&amp;quot;''' should not be used to display images.&lt;br /&gt;
Use CFIMAGE to resize images ''ONCE'', if possible during upload but if page timeouts make this impossible break up the task by using a CFC to check and re-size images as needed.&lt;br /&gt;
&lt;br /&gt;
===SUMMARY===&lt;br /&gt;
Those sites that display many images often times also upload many photos via form or via FTP and need to display both the FULL size images and smaller images for thumb nails or ''(small, med, large)'' optional sizes. The process of uploading images using CFFile can impose time constraints specifically for large files, or if the coldfusion page timeouts are set lower than is possible for large file upload and re-size jobs. To overcome this issue we can write a simple CFC for resizing the images after the upload is complete and the page is run for the first time. This will be ideal for either form based upload or FTP upload making this solution very versatile. &lt;br /&gt;
&lt;br /&gt;
====Step 1 - Create the CFC for re-sizing and writing images to disk====&lt;br /&gt;
&lt;br /&gt;
Create file &amp;quot;GetResizedImage.cfc&amp;quot; in the directory with the CFM files that display images.&lt;br /&gt;
Use the code below for the contents of this file and modify as needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;GetImage&amp;quot; hint=&amp;quot;Re-sizes images for display in album&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the image path where photos exist ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset imgpath = &amp;quot;imgdir/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the domain path, allows reuse resized images on other sites ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset domain = &amp;quot;domain.com&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Re-writes image extension if for alternates of JPG, and adds _resized to differentiate from fullsize images ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset rfile= &amp;quot;#REReplace(&amp;quot;#img#&amp;quot;,&amp;quot;.(jpg|JPG|JPEG|jpeg)&amp;quot;,&amp;quot;_resized.jpg&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Checks if file is already resized ---&amp;gt;&lt;br /&gt;
        &amp;lt;cfif FileExists(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp;&amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#rfile#&amp;quot;)&amp;gt;&lt;br /&gt;
           &amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;!--- Resizes image if it has not been done already ---&amp;gt;&lt;br /&gt;
            &amp;lt;cfset myImage=ImageNew(URLDecode(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp; &amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#img#&amp;quot;))&amp;gt;&lt;br /&gt;
                    &amp;lt;cfset ImageResize(myImage,&amp;quot;175&amp;quot;,&amp;quot;175&amp;quot;,&amp;quot;bilinear&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;!--- Saves image, and to eliminate problems with url friendly encoding when getting our images re-replace %20 with no-space ---&amp;gt;&lt;br /&gt;
                    &amp;lt;cfimage source=&amp;quot;#myImage#&amp;quot; action=&amp;quot;write&amp;quot; overwrite=true destination=&amp;quot;d:\home\#domain#\wwwroot\#imgpath##REReplace(&amp;quot;#rfile#&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot; &amp;quot;,&amp;quot;ALL&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the new path for the image for browser output ---&amp;gt;&lt;br /&gt;
			&amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;!--- Return the image variable ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfreturn myImage&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2 - Invoke the CFC====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Generate image name from query ---&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput query=&amp;quot;MyEvent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Invoke CFC to check if resized image exists, if not resize and output URL for resized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvoke component=&amp;quot;GetResizedImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare what part of the CFC handles checking / getting the image ---&amp;gt;&lt;br /&gt;
	method=&amp;quot;GetImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare variable that will pass back the new image name ---&amp;gt;&lt;br /&gt;
	returnvariable=&amp;quot;myImage&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvokeargument name=&amp;quot;img&amp;quot; value=&amp;quot;#event.Pic#&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&amp;lt;!--- Display re-sized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;img src=&amp;quot;#myImage#&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;     &lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 3 - Test====&lt;br /&gt;
The proposed solution cut page load times from 20+ seconds to below one second after the first page load. During the FIRST or FIRST FEW times the page loads all the re-sizing will be done.&lt;br /&gt;
&lt;br /&gt;
===Q and A===&lt;br /&gt;
'''Question''': Checking if a file exists each time the page loads is excessive.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Answer''': We agree but it's much better than resizing every image each time the page loads.&lt;br /&gt;
&lt;br /&gt;
==How to create Services for Additional ColdFusion Instances==&lt;br /&gt;
If you've created additional ColdFusion instances on your VPS/Dedicated Server, and ColdFusion was unable to create the Services for those instances just do the following:&lt;br /&gt;
&lt;br /&gt;
#Open a Command Prompt as Administrator&lt;br /&gt;
#Run this command, replacing INSTANCE with the actual name of your new ColdFusion instance: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;sc create &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; binPath= &amp;quot;C:\ColdFusion10\INSTANCE\bin\coldfusionsvc.exe&amp;quot; displayname= &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; start= auto&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start your instance through the Windows Services Manager. If you need to know how to create additional ColdFusion instances, please see this guide from Adobe: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSAB4367BA-6D91-4c69-8DBA-E2839394658A.html Defining Additional ColdFusion Instances]&lt;br /&gt;
&lt;br /&gt;
Once you've created the instances, you can attach them to your Web server as described here: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363a5d-7ffc.html Web Server Configuration]&lt;br /&gt;
&lt;br /&gt;
If you're using IIS, this video has a great walkthrough for using the ColdFusion Web Server Connector tool: [http://blogs.coldfusion.com/post.cfm/video-learn-about-iis-connectors-in-coldfusion10 Learn About ColdFusion IIS Connectors]&lt;br /&gt;
&lt;br /&gt;
==How to Fix Error: Value '0000-00-00' can not be represented as java.sql.Date==&lt;br /&gt;
If your application has null values in a MySQL datetime/date column you may encounter the error &amp;quot;Value '0000-00-00' can not be represented as java.sql.Date&amp;quot;. The easiest way to fix this is by adding the parameter '''zeroDateTimeBehavior=convertToNull''' to your site's DSN [http://helpx.adobe.com/coldfusion/kb/mysql-error-java-sql-sqlexception.html as recommended by Adobe].&lt;br /&gt;
===How to Fix Null DateTime Error - '''Shared Hosting'''===&lt;br /&gt;
#Log into your site's WCP control panel&lt;br /&gt;
#Click the ''DataSources (DSNs)'' button&lt;br /&gt;
#Click the ''Edit'' icon next to your DataSource (DSN)&lt;br /&gt;
#Add the following to the '''JDBC Query Parameters''' field: &amp;lt;pre&amp;gt;zeroDateTimeBehavior=convertToNull&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' To add multiple JDBC Query Parameters, separate each name/value pair by an ''''&amp;amp;''''. &lt;br /&gt;
''Example: zeroDateTimeBehavior=convertToNull&amp;amp;characterEncoding=UTF-8''&lt;br /&gt;
===How to Fix Null DateTime Error - '''VPS Hosting'''===&lt;br /&gt;
If your site uses WCP to manage its DSNs, you may utilize the Shared Hosting solution. Otherwise, follow the steps below:&lt;br /&gt;
#Log into ColdFusion Administrator on your VPS/Dedicated Server. &lt;br /&gt;
#Navigate to the &amp;quot;Data Sources&amp;quot; page and click your site's DSN name.&lt;br /&gt;
#On the page that opens add '''?zeroDateTimeBehavior=convertToNull''' to the end of the JDBC URL field.&lt;br /&gt;
#Click '''Submit''' and your site should no longer display the date representation error.&lt;br /&gt;
&lt;br /&gt;
==Find the Java Version Used by ColdFusion or Railo==&lt;br /&gt;
This CFML code will report the version of Java used by your ColdFusion or Railo server:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;#CreateObject(&amp;quot;java&amp;quot;, &amp;quot;java.lang.System&amp;quot;).getProperty(&amp;quot;java.version&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference:''' [http://www.petefreitag.com/item/743.cfm Pete Freitag's Blog - What Version of Java is ColdFusion Using?]&lt;br /&gt;
&lt;br /&gt;
==Reset ColdFusion Admin Password on CF 10+ VPS==&lt;br /&gt;
===Reset CF Admin Password - Windows VPS===&lt;br /&gt;
*On your VPS, open a command prompt window as Administrator&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.bat'' script: &amp;lt;pre&amp;gt;.\passwordreset.bat&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===Reset CF Admin Password - cPanel/Linux VPS===&lt;br /&gt;
*SSH into your VPS&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd /opt/ColdFusion10/cfusion/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.sh'' script: &amp;lt;pre&amp;gt;./passwordreset.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
==ColdFusion 11+ PDF Generation: How to Fix 'No Service Manager is Available' Error==&lt;br /&gt;
If you receive the error '''No Service Manager is Available''' when trying to generate PDFs or use the cfhtmltopdf tag on your ColdFusion 11+ VPS, do the following to fix it:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Expand ''Data &amp;amp; Services'', then click the '''PDF Service''' link&lt;br /&gt;
#On the next page, you should see an entry for ''localhost'' under the list of PDF Service Managers&lt;br /&gt;
#If the localhost service manager is not enabled, click the ''Enable'' button to the left of the manager name. (The button looks like a ''play'' button)&lt;br /&gt;
#Try using cfhtmlpdf now, and see if it works. &lt;br /&gt;
&lt;br /&gt;
If you still have any issues after enabling the service manager, try restarting the '''ColdFusion Addon Services''' Windows service and test again.&lt;br /&gt;
&lt;br /&gt;
==HTML5 Audio Player with ColdFusion==&lt;br /&gt;
This player uses an list named ''Tunes'' within the ''session'' scope to store a list of mp3 names. After populating the list, you can use this code as the foundation for an HTML audio player that plays each song in the list.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfif action is &amp;quot;play_next_tune&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfset myArray=ListtoArray(session.Tunes)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset T_max=Arraylen(myArray)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset session.track=session.track+1&amp;gt;&lt;br /&gt;
	&amp;lt;cfif session.track GT T_max&amp;gt;&lt;br /&gt;
		 &amp;lt;cfset session.track=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
		 &amp;lt;cflocation url=&amp;quot;tunespage.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
		&amp;lt;audio controls id=&amp;quot;myVideo&amp;quot; autoplay&amp;gt;&lt;br /&gt;
		&amp;lt;source src=&amp;quot;path/#myarray[session.track]#&amp;quot; type=&amp;quot;audio/mpeg&amp;quot;&amp;gt;&lt;br /&gt;
		Your browser does not support the audio element.&lt;br /&gt;
		&amp;lt;/audio&amp;gt;&lt;br /&gt;
	&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
		document.getElementById('myVideo').addEventListener(&amp;quot;ended&amp;quot;,function() {&lt;br /&gt;
		window.location.href=&amp;quot;tunespage.cfm?action=play_next_tune&amp;quot;;&lt;br /&gt;
		});&lt;br /&gt;
	&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cfchart error: Could not locate the style file ''style.xml''==&lt;br /&gt;
In ColdFusion 11 the ability to specify styles in an XML file was removed. As such, you will need to convert any XML stylesheets to json files. To do this, you'll need to do the following:&lt;br /&gt;
*Install a trial edition of ColdFusion 11 on your local computer&lt;br /&gt;
*Open a command prompt and run this command:&lt;br /&gt;
**&amp;lt;pre&amp;gt;C:\ColdFusion11\cfusion\bin\cfchart_xmltojson.bat C:\sites\mysite.com\cfchartstyle.xml&amp;lt;/pre&amp;gt;&lt;br /&gt;
**Be sure to replace the paths above with the actual path to &amp;quot;cfchart_xmltojson.bat&amp;quot; as well as the path to your XML stylesheet.&lt;br /&gt;
*When the conversion is done you will end up with a new file with the same name as the XML stylesheet, however there will not be a file extension. To simplify things, add a '''.json''' extension to the converted file. &lt;br /&gt;
*Update the path to the stylesheet in the ''cfchart'' tag to have a ''.json'' extension instead of ''.xml''.&lt;br /&gt;
*Update the path to the stylesheet to use relative paths instead of absolute paths from the webroot.&lt;br /&gt;
**Example: If the stylesheet file and the ''.cfm'' template with the ''cfchart'' code are in the webroot, change '''/cfchartstyle.json''' to '''../cfchartstyle.json'''&lt;br /&gt;
&lt;br /&gt;
More details on this are available in the [https://wikidocs.adobe.com/wiki/display/coldfusionen/cfchart Cfchart documentation]. Be sure to check the comments of the documentation for more helpful cfchart troubleshooting tips. &lt;br /&gt;
&lt;br /&gt;
==CGI.PATH_INFO is Empty After ColdFusion Upgrade==&lt;br /&gt;
If CGI.PATH_INFO is empty after you upgrade your server to ColdFusion 10 or higher, change the variable to CGI.SCRIPT_NAME. &lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_FAQs&amp;diff=2721</id>
		<title>ColdFusion FAQs</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_FAQs&amp;diff=2721"/>
				<updated>2015-10-06T17:51:56Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Is CFX_JpegResize allowed on your ColdFusion servers? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=ColdFusion Frequently Asked Questions (FAQ)=&lt;br /&gt;
==Do you support cfform?==&lt;br /&gt;
Yes, this is supported.&lt;br /&gt;
==Do you support ColdFusion Report Builder==&lt;br /&gt;
The ColdFusion Report Builder uses RDS for the Query Builder. We have RDS disabled for security purposes as recommended by Adobe / Macromedia.&lt;br /&gt;
&lt;br /&gt;
We suggest downloading the developer edition of ColdFusion and Report builder, installing locally. Build the reports with the local development environment and upload the ColdFusion Report Files (CFR files) to our servers. Specify the path to your pre-built report files from within the cfreport tag which is NOT disabled.&lt;br /&gt;
&lt;br /&gt;
==Do you support ColdFusion Builder / RDS==&lt;br /&gt;
You may use ColdFusion Builder to transfer files to your site via FTP as mentioned in the [[ColdFusion_Builder|ColdFusion Builder]] wiki. &lt;br /&gt;
&lt;br /&gt;
However, because RDS is disabled on our shared servers as mentioned above, you may not use ColdFusion's Remote Development Services with our shared servers. Instead, please either use the ColdFusion server shipped with ColdFusion Builder, a separate local ColdFusion installation, or one of our VPS/Dedicated servers to take advantage of advanced development features within ColdFusion Builder.&lt;br /&gt;
&lt;br /&gt;
==Do you support Custom Tags with your ColdFusion Hosting?==&lt;br /&gt;
We do support custom tags, but not all .cfx custom tags, which may require additional server installs of .dll's, etc. If it is a commercially available tag, we'll consider installing it.&lt;br /&gt;
&lt;br /&gt;
Standard .cfm custom tags, yes.&lt;br /&gt;
&lt;br /&gt;
Custom Tag directories for your site can be created through the site's Application.cfc file as shown in the [[ColdFusion_Tips_%26_Tricks#Per-Application_Custom_Tag_Paths|ColdFusion Tips &amp;amp; Tricks]] wiki.&lt;br /&gt;
==Do you support the tags CFFILE, CFDIRECTORY and CFOBJECT?==&lt;br /&gt;
Yes, these are supported.&lt;br /&gt;
==Do you Support CFSchedule for Scheduled Tasks in Coldfusion?==&lt;br /&gt;
Yes, ColdFusion Scheduled Tasks are supported.&lt;br /&gt;
&lt;br /&gt;
To setup a schedule task in ColdFusion, you can use the CFSCHEDULE tag to create the scheduled task the first time. The [[ColdFusion_Tips_%26_Tricks#Scheduling_Tasks_in_ColdFusion|ColdFusion Tips &amp;amp; Tricks]] wiki shows how to use the CFSCHEDULE tag.&lt;br /&gt;
&lt;br /&gt;
==Do you support the CFX_IMAGE tag?==&lt;br /&gt;
No, this tag is not supported. Instead you may use the built-in [https://wikidocs.adobe.com/wiki/display/coldfusionen/cfimage cfimage] tag, [http://www.kolumbus.fi/jukka.manner/cfx_openimage/ cfx_openimage], or Efflaire's [http://efflare.com/docs/CFX_ImageCR3/reference/index.html cfx_imagecr3].&lt;br /&gt;
&lt;br /&gt;
==How do I use the CFX_ImageCR3 tag?==&lt;br /&gt;
This article from Efflaire shows examples of how to use the CFX_ImageCR3 custom tag: https://web.archive.org/web/20150501054920/http://efflare.com/docs/CFX_ImageCR3/reference/examples/&lt;br /&gt;
&lt;br /&gt;
The full tag documentation is here: https://web.archive.org/web/20150501054920/http://efflare.com/docs/CFX_ImageCR3/&lt;br /&gt;
&lt;br /&gt;
==Do you support the CFX_Google API for ColdFusion?==&lt;br /&gt;
Yes, we support CFX_Google on our ColdFusion servers.&lt;br /&gt;
&lt;br /&gt;
''Note: This tag was written for Google's deprecated version 2 API. If you do not have a version 2 API key you can still obtain a console key that works with version 2. Information on getting a Console Key can be found here: [https://developers.google.com/maps/documentation/javascript/tutorial#api_key Google: Obtaining an API Key]''&lt;br /&gt;
==Do you support the CFCONTENT tag?==&lt;br /&gt;
Yes, we support CFCONTENT.&lt;br /&gt;
==Do you support CF Shopkart?==&lt;br /&gt;
Yes, we support CF Shopkart on our coldfusion servers.&lt;br /&gt;
==Do you support Flash Remoting?==&lt;br /&gt;
Yes, this is automatically enabled for all sites on our ColdFusion servers. &lt;br /&gt;
&lt;br /&gt;
Please use &amp;lt;nowiki&amp;gt;http://domainname.com/flex2gateway/&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://domainname.com/flashservices/gateway/&amp;lt;/nowiki&amp;gt; as the gateway URL for your application. &amp;lt;br /&amp;gt;''(replacing domainname.com with your actual domain)''&lt;br /&gt;
&lt;br /&gt;
==Do your ColdFusion servers support Verity and SOLR?==&lt;br /&gt;
Yes, both Verity (K2) and SOLR are supported on ColdFusion versions 7-9. Verity is not available in ColdFusion 10.&lt;br /&gt;
&lt;br /&gt;
==Are any ColdFusion tags/features restricted? What tags/features are allowed?==&lt;br /&gt;
Most tags and functions are allowed, however we disable the following ColdFusion features / tags on our shared hosting accounts:&lt;br /&gt;
&lt;br /&gt;
*Access To Internal ColdFusion Java Components*&lt;br /&gt;
*Remote Development Services (RDS)&lt;br /&gt;
*CFExecute&lt;br /&gt;
*CFRegistry&lt;br /&gt;
&lt;br /&gt;
All other tags are supported, including ''CreateObject()''. The only restriction on ''CreateObject'' is that it may not be used with Internal ColdFusion Java Objects as mentioned above. If you are experiencing any difficulty with another ColdFusion tag or feature, please contact our customer support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;''Prevents CFML code from accessing and creating Java objects that are part of the internal ColdFusion implementation. This prevents a non-authenticated CFML template from reading or modifying administration and configuration information for this server. [http://www.adobe.com/products/coldfusion-family.html Adobe] suggests these tags be disabled for production servers.''&lt;br /&gt;
&lt;br /&gt;
==May I Access the ColdFusion Administrator on my Shared Server==&lt;br /&gt;
No; we do not allow access to the ColdFusion Administrator on our shared servers. Our control panel allows our customers to add and edit DSNs, and the Windows Control Panel also allows you to view ColdFusion error logs. &lt;br /&gt;
&lt;br /&gt;
With our Shared Railo plans, though, each account has access to their site's Railo Web Administrator through the link in their Control Panel.&lt;br /&gt;
&lt;br /&gt;
==Do You Support .java or .jar files?==&lt;br /&gt;
No, we do not support .java or .jar files. The exception is with ColdFusion 10+ you may add .jar files to your application as shown here: [[ColdFusion_Tips_%26_Tricks#Loading_custom_Java_library_or_Java_Libraries_.28jar_or_class_files.29_in_ColdFusion_10|Loading Custom Java Libraries in ColdFusion 10]]&lt;br /&gt;
&lt;br /&gt;
==Can I use CFExecute?==&lt;br /&gt;
No, that tag is disabled.&lt;br /&gt;
==Is the CFMAIL tag enabled?==&lt;br /&gt;
Yes, the CFMAIL tag is enabled on all of our ColdFusion servers. See the [[Cfmail|cfmail]] wiki for details on how to use it in our environment.&lt;br /&gt;
==Is CFX_JpegResize allowed on your ColdFusion servers?==&lt;br /&gt;
We do not allow this tag on our shared servers anymore because it is incompatible with 64-bit ColdFusion installations.&lt;br /&gt;
&lt;br /&gt;
==Will you deploy my (CAR) file from the Coldfusion Administrator?==&lt;br /&gt;
We will not deploy it that way, as that is a default method that wouldn't benefit you on our shared servers. Instead, please deploy your application through FTP and create the datasource (DSN) through your control panel at wcp.hostek.com. Please see the [[WCP_(Windows_based_Control_Panel)#DataSources.28DSN.27s.29|WCP DataSources]] wiki for instructions on how to create a datasource.&lt;br /&gt;
&lt;br /&gt;
''Note'': If you have a VPS or Dedicated server at Hostek.com, you can deploy your application how you wish. Please see our [http://hostek.com/hosting/vps/best-vps-hosting.asp VPS Plans] page for more info on our VPS options, and our [http://hostek.com/hosting/dedicated/virtual-dedicated-hosting.asp Virtual Dedicated Plans] page for details on our virtual dedicated servers.&lt;br /&gt;
&lt;br /&gt;
==Can I use J2EE Session Variables?==&lt;br /&gt;
Yes, we are now supporting J2EE Session Variables.&lt;br /&gt;
&lt;br /&gt;
==With ColdFusion, how can I see the real error, while the visitor sees a page without the error?==&lt;br /&gt;
In this example error template, be sure to replace 123.123.123.123 with your IP. You can get your IP using our [http://hostek.com/ip/ IP lookup tool].&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&lt;br /&gt;
&amp;lt;cfset aIP = cgi.REMOTE_ADDR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aIP is &amp;quot;123.123.123.123&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;strong&amp;gt;#error.Diagnostics#&amp;lt;/strong&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
#TimeFormat(error.DateTime,&amp;quot;hh:mm tt&amp;quot;)# - #DateFormat(error.DateTime,&amp;quot;MMMM&lt;br /&gt;
D, YYYY&amp;quot;)#&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
#error.Browser#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
IP ADDRESS: &lt;br /&gt;
#error.RemoteAddress#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
TEMPLATE: #error.Template#?#error.QueryString#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.ValidationHeader#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.InvalidFields#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.ValidationFooter#&lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
Enter any text or formatting here that you want to display to your visitor instead of &lt;br /&gt;
them seeing the error.&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How do I get Google Maps to work with CFMAP?==&lt;br /&gt;
The common problem is placing your googlemapkey in your application.cfm file. Instead, place the googlemapkey in an application.cfc file. You can leave your application.cfm as it is, and just create an application.cfc if you don't have one, and take the googlemapkey out of your application.cfm file and place it in your application.cfc file.&lt;br /&gt;
&lt;br /&gt;
For example, this would go in your application.cfc file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;cfset this.googlemapkey=&amp;quot;abc123...your google key here...789xyz&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in your cfm template where the cfmap is called, you would add code to it like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;cfmap name=&amp;quot;themap&amp;quot; centeraddress=&amp;quot;Tulsa, OK&amp;quot; width=&amp;quot;400&amp;quot; height=&amp;quot;400&amp;quot; zoomlevel=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
==How do I enable the CFCHART tag?==&lt;br /&gt;
This is already enabled on all new accounts, but if CFCHART does not work on your site please do the following:&lt;br /&gt;
*Create a folder named CFIDE off of the root level.&lt;br /&gt;
*Create a blank file (0 bytes) named GraphData.cfm &lt;br /&gt;
*Create a directory called main off of CFIDE &lt;br /&gt;
*Navigate to the new directory at CFIDE/main &lt;br /&gt;
*Create a blank file (0 bytes) named ide.cfm&lt;br /&gt;
&lt;br /&gt;
The CFCHART tag should now work.&lt;br /&gt;
&lt;br /&gt;
==How do I enable / disable Robust Exception Information on my site?==&lt;br /&gt;
This can be accomplished through the code shown in this wiki: [[ColdFusion_Tips_%26_Tricks#Per-application_Robust_Exception_Information_Settings|Per-application Robust Exception Information Settings]]&lt;br /&gt;
&lt;br /&gt;
==Is Coldfusion Request Debug Output Available?==&lt;br /&gt;
On our shared servers this is not allowed, because this feature can have a negative performance impact for the entire server. This is only allowed in our VPS/Dedicated environment.&lt;br /&gt;
&lt;br /&gt;
==How do I adjust the JSON Prefix for my site==&lt;br /&gt;
If you wish to control ColdFusion JSON Prefix settings for your site, you can follow the guide here: [[ColdFusion_Tips_%26_Tricks#Per-application_JSON_Prefix|Per-Application ColdFusion JSON Prefix]]&lt;br /&gt;
&lt;br /&gt;
==What do I set as the &amp;quot;Destination&amp;quot; attribute for cffile?==&lt;br /&gt;
For the &amp;quot;Destination&amp;quot; attribute, you should use the FULL path to the folder to which you wish the documents to be uploaded. You can make use of the [http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c67.html expandpath] function to obtain the full path dynamically.&lt;br /&gt;
==How can I limit the tools available using the cftextarea FCKEditor toolbar?==&lt;br /&gt;
There are two variations of the toolbar which can be specified in the &amp;lt;cftextarea&amp;gt; tag. If the '''toolbar''' attribute is un-specified, the toolbar set is &amp;quot;Default&amp;quot;. If specified, you can use either &amp;quot;Default&amp;quot; or &amp;quot;Basic&amp;quot; this is case sensitive. See the tag options here for more information: [http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7afd.html cftextarea docs]&lt;br /&gt;
&lt;br /&gt;
The [http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7a01.html#WSc3ff6d0ea77859461172e0811cbec22c24-6f1b Using the rich text editor] article from Adobe has more info on its usage.&lt;br /&gt;
&lt;br /&gt;
==How do I install Mura (previously known as Sava) CMS on your servers?==&lt;br /&gt;
If your account uses our wcp.hostek.com control panel, you can install Mura through the Applications section of the control panel.&lt;br /&gt;
&lt;br /&gt;
If your account is on Linux, or you prefer to perform a manual installation you can follow the steps below:&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
*Must have a Coldfusion or Railo hosting plan. Blue River (the makers of Mura) recommend the Silver plan.&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
#Put the contents of &amp;quot;mura[version]\www&amp;quot; directory into your webroot, (should be ''wwwroot'' on Windows and ''public_html'' on Linux). This includes the following directories and files: admin, config, default, fckeditor, requirements, tasks, Application.cfc, contentServer.cfm, index.cfm.&lt;br /&gt;
#Create a database (MySQL or MSSQL) using Helm either MS SQL or MySQL named &amp;quot;SomethingUnique_muraDB&amp;quot; and run then import/run the appropriate script (found in /db) against the database you created.&amp;lt;br /&amp;gt;For MySQL use PHPMyAdmin (Available in WCP and cPanel.)&amp;lt;br /&amp;gt;For MSSQL use Query Analyzer, SQL Management Studio or sqlcmd.&lt;br /&gt;
#Create a Datasource (DSN) for connecting to the database you created in the step above. &lt;br /&gt;
#Navigate to your domain name, and you should see the auto-installer form appear.&amp;lt;br /&amp;gt;''Note: The email settings are not required to get mura up and running but you may get errors when running mura if they are not set. These, of course, pertain only to functionality that uses email.''&lt;br /&gt;
#In your browser go to http://[domain]/admin/ and login.&amp;lt;br /&amp;gt;- Username: admin&amp;lt;br /&amp;gt;- Password: admin&lt;br /&gt;
#You're done installing mura. Enjoy!&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
If you receive the message &amp;quot;Application Starting. This site is currently loading.&amp;quot;, mura needs to be reloaded by appending &amp;quot;?appreload&amp;amp;override&amp;quot; to the url. For example: &amp;lt;pre&amp;gt;http://[domain]/admin/index.cfm?appreload&amp;amp;override&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have any questions regarding installation, please visit our Support Forum at the [http://http://getmura.com/forum/ Mura Forum].&lt;br /&gt;
&lt;br /&gt;
Mura can be downloaded at: [http://getmura.com/download/mura-downloads/ getmura.com]&lt;br /&gt;
&lt;br /&gt;
==How can I disable ScriptProtect?==&lt;br /&gt;
ColdFusion versions MX7 and higher support a feature called ScriptProtect which helps prevent XSS (cross site scripting) attacks. This feature is helpful as it strips certain HTML entities from user input, but it can also affect your Web app's functionality. A common example of this is &amp;quot;&amp;lt;embed&amp;gt;&amp;quot; tags being removed when a user tries to post a YouTube video to their blog.&lt;br /&gt;
&lt;br /&gt;
This feature is enabled on our servers, but its value can be modified in your &amp;quot;Application.cfc&amp;quot; or &amp;quot;Application.cfm&amp;quot; file. &lt;br /&gt;
===If Using Application.cfm===&lt;br /&gt;
Add the following attribute to your '''&amp;lt;cfapplication&amp;gt;''' tag: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scriptProtect = &amp;quot;none&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===If Using Application.cfc===&lt;br /&gt;
Place the following code within the '''&amp;lt;cfcomponent&amp;gt;''' section of your Application.cfc&lt;br /&gt;
====If using tag-based Application.cfc====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.scriptProtect = &amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====If using &amp;lt;cfscript&amp;gt; Application.cfc====&lt;br /&gt;
&amp;lt;pre&amp;gt;this.scriptProtect = &amp;quot;false&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Settings you should enable within your local ColdFusion Administrator==&lt;br /&gt;
When developing on a local ColdFusion server, most developers accept the default Coldfusion Administrator settings that are set by the ColdFusion installer. This is fine for development servers, but it can cause some problems when moving a ColdFusion application into production in a shared hosting enviroment. To ensure your code runs well when you move it to our servers, we recommend you make the following adjustments within your local ColdFusion Administrator:&lt;br /&gt;
&lt;br /&gt;
First, on the Settings page make sure you enable the setting that says: &amp;quot;Disable access to internal ColdFusion Java components&amp;quot; (pictured below)&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Second, under the Security Tab click the Sandbox Security link then click the box to &amp;quot;Enable ColdFusion Security&amp;quot;. (pictured below)&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once Sandbox Security is enabled, you'll need to create a sandbox for your local site. To do this, add the full path to your site below where it says &amp;quot;Add Security Sandbox&amp;quot;, then click &amp;quot;Add&amp;quot;. For example if you are using the default site location for IIS, you would use 'C:\inetpub\wwwroot' as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings4.jpg]]&lt;br /&gt;
&lt;br /&gt;
The last thing to do is add the correct paths and permissions. By default, ColdFusion will add the path to your site, but you'll also want to make sure the following paths/permissions are added too (permissions are listed in parentheses next to path):&lt;br /&gt;
&lt;br /&gt;
    C:\ColdFusion10\cache\- (Read,Write,Delete)&lt;br /&gt;
    C:\WINDOWS\Fonts\- (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\wwwroot\WEB-INF\cfclasses\- (Read,Write)&lt;br /&gt;
    C:\ColdFusion10\cfusion\wwwroot\WEB-INF\cftags\interface.cfc (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache\- (Read,Write,Delete)&lt;br /&gt;
    C:\ColdFusion10\cfusion\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\- (Read,Write,Delete)&lt;br /&gt;
    C:\ColdFusion10\cfusion\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache\CFFileServlet\_cf_image\- (Read,Write,Delete)&lt;br /&gt;
    C:\Users\USERNAME\AppData\Local\Temp\- (Read,Write,Delete)*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note, this assumes you're using a recent version of Windows (Vista or newer), and that ColdFusion is installed to 'C:\ColdFusion10'. If on an earlier version of Windows, the only thing you'll do differently is replace 'C:\Users\USERNAME\AppData\Local\Temp\-'* above with this path: 'C:\DOCUME~1\USERNAME\LOCALS~1\Temp\-'*&lt;br /&gt;
&lt;br /&gt;
*Replace USERNAME with the actual name of your ColdFusion runtime user.&lt;br /&gt;
&lt;br /&gt;
==How do I disable / enable Sandbox Security on my ColdFusion VPS?==&lt;br /&gt;
Sandbox Security is great for development or multi-site servers, but it causes ColdFusion requests to run a bit slower than they normally would. If you’re not actively using this security feature, you can disable it within the '''Security &amp;gt; Sandbox Security''' page within your server’s ''ColdFusion Administrator''.&lt;br /&gt;
&lt;br /&gt;
''Important'': You must restart ColdFusion after disabling or enabling Sandbox Security for it to take effect. &lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings2.jpg]]&lt;br /&gt;
&lt;br /&gt;
''Reference: [https://wikidocs.adobe.com/wiki/display/coldfusionen/Administering+ColdFusion+Security#AdministeringColdFusionSecurity-Usingsandboxsecurity Adobe - Using Sandbox Security]''&lt;br /&gt;
==Using ColdFusion Builder to Syncronize Files via FTP==&lt;br /&gt;
===Creating the FTP connection===&lt;br /&gt;
Open ColdFusion Builder&lt;br /&gt;
#From the left lower panel right-click on the world icon labeled '''FTP'''&lt;br /&gt;
#Select '''Add New FTP Site'''&lt;br /&gt;
#Enter the ''Server'', ''Username'', and ''Password'', click '''Test''' to confirm settings are correct&lt;br /&gt;
#Enter the ''Remote Path'', this can either be the root '''/''' or the webroot (either '''/wwwroot''' for Windows servers or '''/public_html''' for Linux servers)&lt;br /&gt;
#Click '''OK'''&lt;br /&gt;
&lt;br /&gt;
===To configure a project to Synchronize===&lt;br /&gt;
#Right click on any project you wish to synchronize with over FTP. Hover over ''Synchronize'' and select '''Create New Synchronize Connection'''&lt;br /&gt;
#Make sure the path for the local project files is correct. For '''Remote''' select the newly created FTP Connection.&lt;br /&gt;
#Click ''OK''&lt;br /&gt;
&lt;br /&gt;
===To Synchronize Files: Remote-to-Local or Local-to-Remote===&lt;br /&gt;
#Right click on any project you wish to synchronize with over FTP. &lt;br /&gt;
#Hover over Synchronize and select '''Synchronize''' and follow the prompts to confirm which files should be synchronized.&lt;br /&gt;
&lt;br /&gt;
===Notes About Using Advanced ColdFusion Builder Development Features===&lt;br /&gt;
In order to use advanced development features within ColdFusion Builder, it should be used with a ColdFusion server that has RDS (''Remote Development Services'') enabled. Our shared servers do not have this feature enabled because it poses a security risk within production servers. As such, it is recommended to either [https://wikidocs.adobe.com/wiki/display/coldfusionen/Installing+the+Server+Configuration install a local copy of ColdFusion] or use one of our [http://hostek.com/hosting/coldfusion/vps/coldfusion-vps-hosting.htm ColdFusion VPS plans] for your development. If you install a local development ColdFusion installation, be sure to enable RDS during the install process. If you're using a ColdFusion VPS, you can enable RDS within the '''Security &amp;gt; RDS''' section of your ColdFusion Administrator.&lt;br /&gt;
&lt;br /&gt;
Once you have RDP enabled on a local development installation of ColdFusion or your own VPS, you can enable RDS support within ColdFusion Builder as shown here: [https://wikidocs.adobe.com/wiki/display/coldfusionen/Eclipse+RDS+Support ColdFusion Builder RDS Support]&lt;br /&gt;
&lt;br /&gt;
''Note:'' If you wish to have your local development ColdFusion server match our shared server settings, read the above entry for [[ColdFusion_FAQs#Settings you should enable within your local ColdFusion Administrator|Settings you should enable within your local ColdFusion Administrator]].&lt;br /&gt;
[[Category:ColdFusion]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=MS_SQL_Express_-_How_to_install_on_your_Windows_VPS&amp;diff=2720</id>
		<title>MS SQL Express - How to install on your Windows VPS</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=MS_SQL_Express_-_How_to_install_on_your_Windows_VPS&amp;diff=2720"/>
				<updated>2015-10-06T16:26:00Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Installing MS SQL Express on your Windows VPS */ Updated version to 2014 and download link too&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Installing MS SQL Express on your Windows VPS==&lt;br /&gt;
&lt;br /&gt;
Here are the steps to install MS SQL Express on your Windows VPS.  It is a free software provided by Microsoft.  For web edition, you will need licensing.&lt;br /&gt;
&lt;br /&gt;
#Download MS SQL Server Express 2014 from Microsoft: http://www.microsoft.com/en-us/download/details.aspx?id=42299&lt;br /&gt;
#Go to Start--Administrative Tools--Computer Management&lt;br /&gt;
#Click on Local Users and Groups&lt;br /&gt;
#Double-Click on Users&lt;br /&gt;
#Right click on the screen and select &amp;quot;New User&amp;quot;&lt;br /&gt;
#Enter a user name for the database engine to use (your choice) and fill in a strong password(at least 8 characters, capital, lower-case, number, and a symbol)&lt;br /&gt;
#Un-check user must change password at login.  Check User cannot change password and password never expires and then click create&lt;br /&gt;
#For security, right click on the user and select &amp;quot;Properties&amp;quot; &lt;br /&gt;
#Click on the &amp;quot;Member Of&amp;quot; tab and remove the user from the Users group by selecting Users and clicking remove&lt;br /&gt;
#Click on the &amp;quot;Remote Desktop Services Profile&amp;quot;.  Check the box for &amp;quot;Deny this user permission&amp;quot;.  Click apply then OK.&lt;br /&gt;
#Run the install file you downloaded&lt;br /&gt;
#Select New Installation&lt;br /&gt;
#Click next through the prompts to install &amp;quot;Setup Support Files&amp;quot;&lt;br /&gt;
#For the MS SQL Feature selection, you will need &amp;quot;Database Engine Services&amp;quot;, &amp;quot;Full-Text Search&amp;quot;, &amp;quot;Client Tools Connectivity&amp;quot; and &amp;quot;Management Tools Basic and Complete&amp;quot;.  Other options are at your discretion&lt;br /&gt;
#In the instance configuration screen, leave at the Default Instance or MSSQL Express and click next&lt;br /&gt;
#In the service accounts screen, enter in the account you created above and the password&lt;br /&gt;
#On the next screen, select Mixed Authentication mode and enter in a strong password for the SA user.  Save this password&lt;br /&gt;
#Click on &amp;quot;Add current user&amp;quot; at the bottom to add the Administrator if it is not already there to allowed users&lt;br /&gt;
#Leave &amp;quot;Install the native mode default configuration&amp;quot; checked and click next through the remaining screens&lt;br /&gt;
#Once installed, please submit a support ticket at http://support.hostek.com giving us the SA user password and request we integrate MS SQL Express with your control panel&lt;br /&gt;
&lt;br /&gt;
These are the steps to install MS SQL Express on your VPS if you did not order it initially.  It is important that you do let us know you installed it so we can integrate it with the control panel for ease of use.&lt;br /&gt;
&lt;br /&gt;
[[category:Windows-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Mura&amp;diff=2715</id>
		<title>Mura</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Mura&amp;diff=2715"/>
				<updated>2015-09-28T16:25:45Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Mura loading incorrect URL */ Added steps to fix domain via Mura Admin too&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Here you'll find a compilation of issues or tips related to the Mura content management system.&lt;br /&gt;
&lt;br /&gt;
To fix many Mura issues, upgrading Mura itself may be your best solution. Find more on that below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrading Mura==&lt;br /&gt;
&lt;br /&gt;
If your ColdFusion site runs Mura CMS, you should ensure it's &amp;quot;Core Files&amp;quot; are always up-to-date. This is easy to do from the Mura Admin section and will help improve performance and security. Follow the directions below to update your Mura Core Files:&lt;br /&gt;
&lt;br /&gt;
'''Update/Upgrade Mura by running the auto-aupdate feature from your admin section''':&lt;br /&gt;
*Click the '''Settings''' link at the very top of the Mura admin page.&lt;br /&gt;
*Click '''Update Mura Core''' in the dropdown menu that appears&lt;br /&gt;
*In the popup that appears, click '''Yes''' to proceed with the automatic upgrade.&lt;br /&gt;
&lt;br /&gt;
Mura will confirm when the update completes. Please note, this will not update your site files. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For more info on this topic, see the '''[http://docs.getmura.com/index.cfm/developer-guides/best-practices/ Mura Best Practices Guide]'''.&lt;br /&gt;
&lt;br /&gt;
=Editing Mura SEO SEF URLs - Overview=&lt;br /&gt;
&lt;br /&gt;
How to enable different SEO/SEF URL settings for Mura&lt;br /&gt;
&lt;br /&gt;
The URLs used by Mura are controlled by two settings in the configuration file '''/config/settings.ini.cfm''':&lt;br /&gt;
 siteidinurls=0&lt;br /&gt;
 indexfileinurls=0&lt;br /&gt;
&lt;br /&gt;
A settings of''' '0' '''disables the option, and a setting of''' '1' '''enables the option.&lt;br /&gt;
&lt;br /&gt;
===siteidinurls===&lt;br /&gt;
&lt;br /&gt;
This option tells Mura to put the '''siteid''' in the URLs for links.  Enable this option if you would like the name of the site to appear in the URL.  Otherwise, disable it.&lt;br /&gt;
&lt;br /&gt;
===indexfileinurls===&lt;br /&gt;
&lt;br /&gt;
This option controls whether Mura puts '''index.cfm''' in the URLs for links.  Enable this option if you want '''index.cfm''' to appear in the URL or do not want to use URL rewriting.  Disable this option if you would like to use URL rewriting or do not want '''index.cfm''' shown in the URL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Site ID and index.cfm in URLs==&lt;br /&gt;
&lt;br /&gt;
This option is easy to enable.  Simply configure both URL settings in the '''/config/settings.ini.cfm''' as follows:&lt;br /&gt;
 siteidinurls=1&lt;br /&gt;
 indexfileinurls=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Remove Site ID and index.cfm from URLs==&lt;br /&gt;
&lt;br /&gt;
This is the most common SEO/SEF setting.  Configure both URL settings in the '''/config/settings.ini.cfm''' as follows:&lt;br /&gt;
 siteidinurls=0&lt;br /&gt;
 indexfileinurls=0&lt;br /&gt;
&lt;br /&gt;
Then, do one of the following:&lt;br /&gt;
&lt;br /&gt;
'''IIS 6:'''&lt;br /&gt;
&lt;br /&gt;
Rename the file '''htaccess.txt''' to '''.htaccess'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IIS 7+:'''&lt;br /&gt;
&lt;br /&gt;
Rename the file '''web.config.txt''' to '''web.config'''.&lt;br /&gt;
&lt;br /&gt;
==Remove Site ID from URLs but include index.cfm in URLs==&lt;br /&gt;
&lt;br /&gt;
This option is easy to enable.  Simply configure both URL settings in the '''/config/settings.ini.cfm''' as follows:&lt;br /&gt;
 siteidinurls=0&lt;br /&gt;
 indexfileinurls=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Include Site IDs in URLs but remove index.cfm from URLs==&lt;br /&gt;
&lt;br /&gt;
Configure both URL settings in the '''/config/settings.ini.cfm''' as follows:&lt;br /&gt;
 siteidinurls=1&lt;br /&gt;
 indexfileinurls=0&lt;br /&gt;
&lt;br /&gt;
Then, do one of the following:&lt;br /&gt;
&lt;br /&gt;
'''IIS 6:'''&lt;br /&gt;
&lt;br /&gt;
Rename the file '''htaccess.txt''' to '''.htaccess'''.  Then, edit the '''.htaccess''' file and follow the instructions in the file for enabling SiteIDs in URLs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IIS 7+:'''&lt;br /&gt;
&lt;br /&gt;
Rename the file '''web.config.txt''' to '''web.config'''.  Then, edit the '''.htaccess''' file and follow the instructions in the file for enabling SiteIDs in URLs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Mura Problems and Solutions=&lt;br /&gt;
==Fixing Mura links with Hyphens in the URL==&lt;br /&gt;
&lt;br /&gt;
When enabling SEO-friendly URLs, sometimes you run into pages that need multiple words in the URL. This requires the use of a hyphen, which often breaks Mura's redirection system. Below is an overview on the problem.&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
Example situation:&lt;br /&gt;
&lt;br /&gt;
http://www.example.com/ has a few pages on their Mura site that look like this:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
http://www.example.com/mura-page&amp;lt;br /&amp;gt;&lt;br /&gt;
http://www.example.com/links-and-examples&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
With the default Mura redirection rules, these links will cause IIS to parse the links instead of the Mura CMS, which takes the user to a 404 page. The fix is simple, but can be tricky to implement if you're unfamiliar with .htaccess files.&lt;br /&gt;
&lt;br /&gt;
===.htaccess Fix===&lt;br /&gt;
&lt;br /&gt;
The hyphen has to be the last character in the .htaccess character expression. Otherwise, it signifies a range between two characters.&lt;br /&gt;
&lt;br /&gt;
So, you just have to move the hyphen to the end of the character expression in your .htaccess rewrite rules. Below is what the .htaccess file should look like with the change:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This is for rewriting urls &amp;quot;WITHOUT&amp;quot; siteIDs&lt;br /&gt;
# To remove the Mura siteID directory and index.cfm from urls you must also set both siteIDInURLS and indexFileInURLs to 0 in your /config/setting.ini.cfm and reload Mura.&lt;br /&gt;
Options +FollowSymLinks&lt;br /&gt;
RewriteEngine On &lt;br /&gt;
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
RewriteRule ^([a-zA-Z0-9/-]+/tag/.+|tag/.+)$ /index.cfm%{REQUEST_URI} [PT]&lt;br /&gt;
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
RewriteRule ^([a-zA-Z0-9/-\s-]+)$ /index.cfm%{REQUEST_URI} [PT]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last line has a hyphen added right after the 's':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteRule ^([a-zA-Z0-9/-\s-]+)$ ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this change has been made your URLs with hyphens should now be functional! Below is a full, fixed .htaccess file. Make sure to remove the single #'s for whichever rewrite is currently enabled on your site:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## This is for rewriting urls &amp;quot;WITHOUT&amp;quot; siteIDs&lt;br /&gt;
## To remove the Mura siteID directory and index.cfm from urls you must also set both siteIDInURLS and indexFileInURLs to 0 in your /config/setting.ini.cfm and reload Mura.&lt;br /&gt;
# Options +FollowSymLinks&lt;br /&gt;
# RewriteEngine On &lt;br /&gt;
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
# RewriteRule ^([a-zA-Z0-9/-]+/tag/.+|tag/.+)$ /index.cfm%{REQUEST_URI} [PT]&lt;br /&gt;
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
# RewriteRule ^([a-zA-Z0-9/-\s-]+)$ /index.cfm%{REQUEST_URI} [PT]&lt;br /&gt;
&lt;br /&gt;
## This is for rewriting urls &amp;quot;WITH&amp;quot; siteIDs&lt;br /&gt;
## To remove the Mura siteID directory and index.cfm from urls you must also set siteIDInURLS to 1 and indexFileInURLs to 0 in your /config/setting.ini.cfm and reload Mura.&lt;br /&gt;
# RewriteEngine On&lt;br /&gt;
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
# RewriteRule ^([a-zA-Z0-9-]{1,})/^([a-zA-Z0-9/-]+/tag/.+|tag/.+)$ /$1/index.cfm/$2 [PT]&lt;br /&gt;
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
# RewriteRule ^([a-zA-Z0-9-]{1,})/([a-zA-Z0-9/-\s-]+)$ /$1/index.cfm/$2 [PT]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Mura loading incorrect URL==&lt;br /&gt;
If your Mura site redirects to an invalid URL or the wrong domain, use the steps below to correct the issue. &lt;br /&gt;
===How to Change Domain Via Mura Admin===&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
#Log into your site's Mura Admin&lt;br /&gt;
#Hover over the ''Site Config'' icon, then click the ''Site Settings'' link&lt;br /&gt;
#In the '''Primary Domain''' field, enter the correct domain ''(without the http:// prefix or trailing slash)''&lt;br /&gt;
#Scroll to the bottom of the page and click the ''Update'' button.&lt;br /&gt;
#Hover over the ''Settings'' link at the very top of the page, and click the ''Reload Application'' link&lt;br /&gt;
&lt;br /&gt;
Mura should respond as expected when you visit the correct domain now. &lt;br /&gt;
===How to Change Domain When Mura Admin Won't Load===&lt;br /&gt;
If your Mura Admin site won't load because of this issue, you can change the domain in the database. Mura stores its domain name in the ‘tsettings’ table of its database.&lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
#Log into phpMyAdmin ''(mysql)'' or myLittleAdmin ''(ms sql)''&lt;br /&gt;
#Find the '''tsettings''' table and edit it&lt;br /&gt;
#Edit the '''domain''' field and change its value to the correct domain name ''(don't put the http:// prefix or trailing slash)''&lt;br /&gt;
#After saving your changes reload Mura ''(hit the URL with /?appreload at the end)''&lt;br /&gt;
&lt;br /&gt;
The site should now load from the correct domain.&lt;br /&gt;
&lt;br /&gt;
==Mura 404 Errors==&lt;br /&gt;
===Ensure the Page Exists Within Mura Site Manager===&lt;br /&gt;
If you encounter a 404 error on a Mura site, the first thing to check is that the page giving the error is actually created in Mura. A common example of this is some links on Mura's default site (the sample site loaded upon installation) such as the Sitemap link will give a 404 error. This is because the page needs to be created within Mura's Site Manager.&lt;br /&gt;
===Check the Site's Rewrite Rules===&lt;br /&gt;
If you've already made sure the URL giving the 404 has a corresponding page within Mura's Site Manager, then you'll need to make sure your rewrite rules are correct. If the page giving a 404 consists of two words, then you may just need to implement the &amp;quot;.htaccess&amp;quot; fix described above to ensure Mura rewrites the dashes between words properly.&lt;br /&gt;
&lt;br /&gt;
==Mura Error - Element SERVICEFACTORY is undefined in APPLICATION==&lt;br /&gt;
When this error occurs, you'll need to manually update your Mura files for the version running on your site.&lt;br /&gt;
===Finding your site's Mura version===&lt;br /&gt;
To find the version of Mura running on your site, open the '''/requirements/mura/configBean.cfc'''.&lt;br /&gt;
&lt;br /&gt;
Around line 51 of that file, you should see your site's version listed within a tag that looks like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;cfset variables.instance.version=&amp;quot;6.1&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line could read ''6.1'', ''6.0'', ''5.6'', ''etc''. This is your site's Mura version.&lt;br /&gt;
&lt;br /&gt;
===Manually update Mura 6.1+ files===&lt;br /&gt;
#[https://github.com/blueriver/MuraCMS/archive/master.zip Download the latest version of Mura]&lt;br /&gt;
#Back up your ''/config/settings.ini.cfm'' file&lt;br /&gt;
#Unzip the Mura Master zip then copy and paste everything '''except''' the ''default'' directory over your existing Mura install.&lt;br /&gt;
#Make a Reload/DBUpdate request to the Mura root ''(eg. http://yousite.com/?appreload&amp;amp;applydbupdates)''&lt;br /&gt;
===Manually update Mura 6.0 files===&lt;br /&gt;
#[https://github.com/blueriver/MuraCMS/archive/6.0.zip Download Mura 6.0]&lt;br /&gt;
#Back up your ''/config/settings.ini.cfm'' file&lt;br /&gt;
#Unzip the Mura 6.0 zip then copy and paste everything '''except''' the ''default'' directory over your existing Mura install.&lt;br /&gt;
#Make a Reload request to the Mura root ''(eg. http://yousite.com/?appreload)''&lt;br /&gt;
===Manually update Mura 5.x files===&lt;br /&gt;
#[https://github.com/blueriver/MuraCMS/archive/5.x.zip Download Mura 5.x]&lt;br /&gt;
#Back up your ''/config/settings.ini.cfm'' file&lt;br /&gt;
#Unzip the Mura 5.x zip then copy and paste everything '''except''' the ''default'' directory over your existing Mura install.&lt;br /&gt;
#Make a Reload request to the Mura root ''(eg. http://yousite.com/?appreload)''&lt;br /&gt;
&lt;br /&gt;
After performing those steps you should no longer see the ''Element SERVICEFACTORY is undefined in APPLICATION'' error.&lt;br /&gt;
==Mura Error - key [FIELDNAMES] doesn't exist in struct (keys)==&lt;br /&gt;
When uploading items through the Mura file uploader, you may encounter the error: '''''key [FIELDNAMES] doesn't exist in struct (keys)'''''&lt;br /&gt;
&lt;br /&gt;
This error means that the buffer size for your Web server connector is larger than the buffer size for your servlet container (''Tomcat in Railo and ColdFusion 10+''). This means that the Web server sends more data in a POST request than Railo/ColdFusion can handle, and the POST request fails. &lt;br /&gt;
&lt;br /&gt;
Our shared servers have been configured to prevent this from happening, but if your VPS has custom settings for its Web server connector and Tomcat AJP connector, check the following:&lt;br /&gt;
===Railo VPS and Dedicated Servers===&lt;br /&gt;
*Open the open the configuration file for the BonCode IIS/Tomcat connector which ships with Railo. This is located at '''''C:\Windows\BonCodeAJP13.settings'''''&lt;br /&gt;
*Check for a '''PacketSize''' setting. It may look like this: ''&amp;lt;PacketSize&amp;gt;'''65536'''&amp;lt;/PacketSize&amp;gt;''&lt;br /&gt;
*Now open the Tomcat '''server.xml''' configuration file located here: '''''{Railo Install Dir}/tomcat/conf/server.xml'''''&lt;br /&gt;
*Find the line for the AJP/1.3 connector. Ensure the '''packetSize''' attribute is present and that it is set to the same value as the Boncode connector.&lt;br /&gt;
*;Example: ''&amp;lt;Connector port=&amp;quot;8009&amp;quot; protocol=&amp;quot;AJP/1.3&amp;quot; redirectPort=&amp;quot;8443&amp;quot; maxThreads=&amp;quot;250&amp;quot; connectionTimeout=&amp;quot;120001&amp;quot; '''packetSize=&amp;quot;65536&amp;quot;'''/&amp;gt;''&lt;br /&gt;
*After making the packet size the same within the Boncode connector and Tomcat, restart IIS and Railo for the new settings to take effect&lt;br /&gt;
===ColdFusion 10+ VPS and Dedicated Servers===&lt;br /&gt;
*Open the open the configuration file for the JK IIS/Tomcat connector which ships with ColdFusion 10+. By default, this is located at '''''{CF Install Dir}/config/wsconfig/1/workers.properties'''''&lt;br /&gt;
*Check for a '''max_packet_size''' setting. It may look like this: ''max_packet_size='''65536'''''&lt;br /&gt;
*Now open the Tomcat '''server.xml''' configuration file located here: '''''{CF Install Dir}/cfusion/runtime/conf/server.xml'''''&lt;br /&gt;
*Find the line for the AJP/1.3 connector. Ensure the '''packetSize''' attribute is present and that it is set to the same value as the JK connector.&lt;br /&gt;
*;Example: ''&amp;lt;Connector port=&amp;quot;8012&amp;quot; protocol=&amp;quot;AJP/1.3&amp;quot; redirectPort=&amp;quot;8445&amp;quot; maxThreads=&amp;quot;250&amp;quot; '''packetSize=&amp;quot;65536&amp;quot;'''/&amp;gt;''&lt;br /&gt;
*After making the packet size the same within the JK connector and Tomcat, restart IIS and ColdFusion for the new settings to take effect&lt;br /&gt;
&lt;br /&gt;
[[Category:Mura]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:VPS]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;br /&gt;
[[Category:Railo-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Mura&amp;diff=2714</id>
		<title>Mura</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Mura&amp;diff=2714"/>
				<updated>2015-09-28T16:14:43Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Mura Problems and Solutions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Here you'll find a compilation of issues or tips related to the Mura content management system.&lt;br /&gt;
&lt;br /&gt;
To fix many Mura issues, upgrading Mura itself may be your best solution. Find more on that below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrading Mura==&lt;br /&gt;
&lt;br /&gt;
If your ColdFusion site runs Mura CMS, you should ensure it's &amp;quot;Core Files&amp;quot; are always up-to-date. This is easy to do from the Mura Admin section and will help improve performance and security. Follow the directions below to update your Mura Core Files:&lt;br /&gt;
&lt;br /&gt;
'''Update/Upgrade Mura by running the auto-aupdate feature from your admin section''':&lt;br /&gt;
*Click the '''Settings''' link at the very top of the Mura admin page.&lt;br /&gt;
*Click '''Update Mura Core''' in the dropdown menu that appears&lt;br /&gt;
*In the popup that appears, click '''Yes''' to proceed with the automatic upgrade.&lt;br /&gt;
&lt;br /&gt;
Mura will confirm when the update completes. Please note, this will not update your site files. &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
For more info on this topic, see the '''[http://docs.getmura.com/index.cfm/developer-guides/best-practices/ Mura Best Practices Guide]'''.&lt;br /&gt;
&lt;br /&gt;
=Editing Mura SEO SEF URLs - Overview=&lt;br /&gt;
&lt;br /&gt;
How to enable different SEO/SEF URL settings for Mura&lt;br /&gt;
&lt;br /&gt;
The URLs used by Mura are controlled by two settings in the configuration file '''/config/settings.ini.cfm''':&lt;br /&gt;
 siteidinurls=0&lt;br /&gt;
 indexfileinurls=0&lt;br /&gt;
&lt;br /&gt;
A settings of''' '0' '''disables the option, and a setting of''' '1' '''enables the option.&lt;br /&gt;
&lt;br /&gt;
===siteidinurls===&lt;br /&gt;
&lt;br /&gt;
This option tells Mura to put the '''siteid''' in the URLs for links.  Enable this option if you would like the name of the site to appear in the URL.  Otherwise, disable it.&lt;br /&gt;
&lt;br /&gt;
===indexfileinurls===&lt;br /&gt;
&lt;br /&gt;
This option controls whether Mura puts '''index.cfm''' in the URLs for links.  Enable this option if you want '''index.cfm''' to appear in the URL or do not want to use URL rewriting.  Disable this option if you would like to use URL rewriting or do not want '''index.cfm''' shown in the URL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Site ID and index.cfm in URLs==&lt;br /&gt;
&lt;br /&gt;
This option is easy to enable.  Simply configure both URL settings in the '''/config/settings.ini.cfm''' as follows:&lt;br /&gt;
 siteidinurls=1&lt;br /&gt;
 indexfileinurls=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Remove Site ID and index.cfm from URLs==&lt;br /&gt;
&lt;br /&gt;
This is the most common SEO/SEF setting.  Configure both URL settings in the '''/config/settings.ini.cfm''' as follows:&lt;br /&gt;
 siteidinurls=0&lt;br /&gt;
 indexfileinurls=0&lt;br /&gt;
&lt;br /&gt;
Then, do one of the following:&lt;br /&gt;
&lt;br /&gt;
'''IIS 6:'''&lt;br /&gt;
&lt;br /&gt;
Rename the file '''htaccess.txt''' to '''.htaccess'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IIS 7+:'''&lt;br /&gt;
&lt;br /&gt;
Rename the file '''web.config.txt''' to '''web.config'''.&lt;br /&gt;
&lt;br /&gt;
==Remove Site ID from URLs but include index.cfm in URLs==&lt;br /&gt;
&lt;br /&gt;
This option is easy to enable.  Simply configure both URL settings in the '''/config/settings.ini.cfm''' as follows:&lt;br /&gt;
 siteidinurls=0&lt;br /&gt;
 indexfileinurls=1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Include Site IDs in URLs but remove index.cfm from URLs==&lt;br /&gt;
&lt;br /&gt;
Configure both URL settings in the '''/config/settings.ini.cfm''' as follows:&lt;br /&gt;
 siteidinurls=1&lt;br /&gt;
 indexfileinurls=0&lt;br /&gt;
&lt;br /&gt;
Then, do one of the following:&lt;br /&gt;
&lt;br /&gt;
'''IIS 6:'''&lt;br /&gt;
&lt;br /&gt;
Rename the file '''htaccess.txt''' to '''.htaccess'''.  Then, edit the '''.htaccess''' file and follow the instructions in the file for enabling SiteIDs in URLs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''IIS 7+:'''&lt;br /&gt;
&lt;br /&gt;
Rename the file '''web.config.txt''' to '''web.config'''.  Then, edit the '''.htaccess''' file and follow the instructions in the file for enabling SiteIDs in URLs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Mura Problems and Solutions=&lt;br /&gt;
==Fixing Mura links with Hyphens in the URL==&lt;br /&gt;
&lt;br /&gt;
When enabling SEO-friendly URLs, sometimes you run into pages that need multiple words in the URL. This requires the use of a hyphen, which often breaks Mura's redirection system. Below is an overview on the problem.&lt;br /&gt;
&lt;br /&gt;
===Overview===&lt;br /&gt;
&lt;br /&gt;
Example situation:&lt;br /&gt;
&lt;br /&gt;
http://www.example.com/ has a few pages on their Mura site that look like this:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
http://www.example.com/mura-page&amp;lt;br /&amp;gt;&lt;br /&gt;
http://www.example.com/links-and-examples&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
With the default Mura redirection rules, these links will cause IIS to parse the links instead of the Mura CMS, which takes the user to a 404 page. The fix is simple, but can be tricky to implement if you're unfamiliar with .htaccess files.&lt;br /&gt;
&lt;br /&gt;
===.htaccess Fix===&lt;br /&gt;
&lt;br /&gt;
The hyphen has to be the last character in the .htaccess character expression. Otherwise, it signifies a range between two characters.&lt;br /&gt;
&lt;br /&gt;
So, you just have to move the hyphen to the end of the character expression in your .htaccess rewrite rules. Below is what the .htaccess file should look like with the change:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# This is for rewriting urls &amp;quot;WITHOUT&amp;quot; siteIDs&lt;br /&gt;
# To remove the Mura siteID directory and index.cfm from urls you must also set both siteIDInURLS and indexFileInURLs to 0 in your /config/setting.ini.cfm and reload Mura.&lt;br /&gt;
Options +FollowSymLinks&lt;br /&gt;
RewriteEngine On &lt;br /&gt;
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
RewriteRule ^([a-zA-Z0-9/-]+/tag/.+|tag/.+)$ /index.cfm%{REQUEST_URI} [PT]&lt;br /&gt;
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
RewriteRule ^([a-zA-Z0-9/-\s-]+)$ /index.cfm%{REQUEST_URI} [PT]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The last line has a hyphen added right after the 's':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
RewriteRule ^([a-zA-Z0-9/-\s-]+)$ ...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this change has been made your URLs with hyphens should now be functional! Below is a full, fixed .htaccess file. Make sure to remove the single #'s for whichever rewrite is currently enabled on your site:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
## This is for rewriting urls &amp;quot;WITHOUT&amp;quot; siteIDs&lt;br /&gt;
## To remove the Mura siteID directory and index.cfm from urls you must also set both siteIDInURLS and indexFileInURLs to 0 in your /config/setting.ini.cfm and reload Mura.&lt;br /&gt;
# Options +FollowSymLinks&lt;br /&gt;
# RewriteEngine On &lt;br /&gt;
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
# RewriteRule ^([a-zA-Z0-9/-]+/tag/.+|tag/.+)$ /index.cfm%{REQUEST_URI} [PT]&lt;br /&gt;
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
# RewriteRule ^([a-zA-Z0-9/-\s-]+)$ /index.cfm%{REQUEST_URI} [PT]&lt;br /&gt;
&lt;br /&gt;
## This is for rewriting urls &amp;quot;WITH&amp;quot; siteIDs&lt;br /&gt;
## To remove the Mura siteID directory and index.cfm from urls you must also set siteIDInURLS to 1 and indexFileInURLs to 0 in your /config/setting.ini.cfm and reload Mura.&lt;br /&gt;
# RewriteEngine On&lt;br /&gt;
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
# RewriteRule ^([a-zA-Z0-9-]{1,})/^([a-zA-Z0-9/-]+/tag/.+|tag/.+)$ /$1/index.cfm/$2 [PT]&lt;br /&gt;
# RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d&lt;br /&gt;
# RewriteRule ^([a-zA-Z0-9-]{1,})/([a-zA-Z0-9/-\s-]+)$ /$1/index.cfm/$2 [PT]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Mura loading incorrect URL==&lt;br /&gt;
Mura stores its domain name in the ‘tsettings’ table of the database, so you'll need to edit that if the domain redirects to a bad or wrong URL. &lt;br /&gt;
&lt;br /&gt;
'''Steps:'''&lt;br /&gt;
#Log into phpMyAdmin ''(mysql)'' or myLittleAdmin ''(ms sql)''&lt;br /&gt;
#Find the '''tsettings''' table and edit it&lt;br /&gt;
#Edit the '''domain''' field and change its value to the correct domain name ''(don't put the http:// prefix or any trailing slashes)''&lt;br /&gt;
#After saving your changes reload Mura ''(hit the URL with /?appreload at the end)''&lt;br /&gt;
&lt;br /&gt;
The site should now load from the correct domain.&lt;br /&gt;
&lt;br /&gt;
==Mura 404 Errors==&lt;br /&gt;
===Ensure the Page Exists Within Mura Site Manager===&lt;br /&gt;
If you encounter a 404 error on a Mura site, the first thing to check is that the page giving the error is actually created in Mura. A common example of this is some links on Mura's default site (the sample site loaded upon installation) such as the Sitemap link will give a 404 error. This is because the page needs to be created within Mura's Site Manager.&lt;br /&gt;
===Check the Site's Rewrite Rules===&lt;br /&gt;
If you've already made sure the URL giving the 404 has a corresponding page within Mura's Site Manager, then you'll need to make sure your rewrite rules are correct. If the page giving a 404 consists of two words, then you may just need to implement the &amp;quot;.htaccess&amp;quot; fix described above to ensure Mura rewrites the dashes between words properly.&lt;br /&gt;
&lt;br /&gt;
==Mura Error - Element SERVICEFACTORY is undefined in APPLICATION==&lt;br /&gt;
When this error occurs, you'll need to manually update your Mura files for the version running on your site.&lt;br /&gt;
===Finding your site's Mura version===&lt;br /&gt;
To find the version of Mura running on your site, open the '''/requirements/mura/configBean.cfc'''.&lt;br /&gt;
&lt;br /&gt;
Around line 51 of that file, you should see your site's version listed within a tag that looks like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;cfset variables.instance.version=&amp;quot;6.1&amp;quot;/&amp;gt; &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The line could read ''6.1'', ''6.0'', ''5.6'', ''etc''. This is your site's Mura version.&lt;br /&gt;
&lt;br /&gt;
===Manually update Mura 6.1+ files===&lt;br /&gt;
#[https://github.com/blueriver/MuraCMS/archive/master.zip Download the latest version of Mura]&lt;br /&gt;
#Back up your ''/config/settings.ini.cfm'' file&lt;br /&gt;
#Unzip the Mura Master zip then copy and paste everything '''except''' the ''default'' directory over your existing Mura install.&lt;br /&gt;
#Make a Reload/DBUpdate request to the Mura root ''(eg. http://yousite.com/?appreload&amp;amp;applydbupdates)''&lt;br /&gt;
===Manually update Mura 6.0 files===&lt;br /&gt;
#[https://github.com/blueriver/MuraCMS/archive/6.0.zip Download Mura 6.0]&lt;br /&gt;
#Back up your ''/config/settings.ini.cfm'' file&lt;br /&gt;
#Unzip the Mura 6.0 zip then copy and paste everything '''except''' the ''default'' directory over your existing Mura install.&lt;br /&gt;
#Make a Reload request to the Mura root ''(eg. http://yousite.com/?appreload)''&lt;br /&gt;
===Manually update Mura 5.x files===&lt;br /&gt;
#[https://github.com/blueriver/MuraCMS/archive/5.x.zip Download Mura 5.x]&lt;br /&gt;
#Back up your ''/config/settings.ini.cfm'' file&lt;br /&gt;
#Unzip the Mura 5.x zip then copy and paste everything '''except''' the ''default'' directory over your existing Mura install.&lt;br /&gt;
#Make a Reload request to the Mura root ''(eg. http://yousite.com/?appreload)''&lt;br /&gt;
&lt;br /&gt;
After performing those steps you should no longer see the ''Element SERVICEFACTORY is undefined in APPLICATION'' error.&lt;br /&gt;
==Mura Error - key [FIELDNAMES] doesn't exist in struct (keys)==&lt;br /&gt;
When uploading items through the Mura file uploader, you may encounter the error: '''''key [FIELDNAMES] doesn't exist in struct (keys)'''''&lt;br /&gt;
&lt;br /&gt;
This error means that the buffer size for your Web server connector is larger than the buffer size for your servlet container (''Tomcat in Railo and ColdFusion 10+''). This means that the Web server sends more data in a POST request than Railo/ColdFusion can handle, and the POST request fails. &lt;br /&gt;
&lt;br /&gt;
Our shared servers have been configured to prevent this from happening, but if your VPS has custom settings for its Web server connector and Tomcat AJP connector, check the following:&lt;br /&gt;
===Railo VPS and Dedicated Servers===&lt;br /&gt;
*Open the open the configuration file for the BonCode IIS/Tomcat connector which ships with Railo. This is located at '''''C:\Windows\BonCodeAJP13.settings'''''&lt;br /&gt;
*Check for a '''PacketSize''' setting. It may look like this: ''&amp;lt;PacketSize&amp;gt;'''65536'''&amp;lt;/PacketSize&amp;gt;''&lt;br /&gt;
*Now open the Tomcat '''server.xml''' configuration file located here: '''''{Railo Install Dir}/tomcat/conf/server.xml'''''&lt;br /&gt;
*Find the line for the AJP/1.3 connector. Ensure the '''packetSize''' attribute is present and that it is set to the same value as the Boncode connector.&lt;br /&gt;
*;Example: ''&amp;lt;Connector port=&amp;quot;8009&amp;quot; protocol=&amp;quot;AJP/1.3&amp;quot; redirectPort=&amp;quot;8443&amp;quot; maxThreads=&amp;quot;250&amp;quot; connectionTimeout=&amp;quot;120001&amp;quot; '''packetSize=&amp;quot;65536&amp;quot;'''/&amp;gt;''&lt;br /&gt;
*After making the packet size the same within the Boncode connector and Tomcat, restart IIS and Railo for the new settings to take effect&lt;br /&gt;
===ColdFusion 10+ VPS and Dedicated Servers===&lt;br /&gt;
*Open the open the configuration file for the JK IIS/Tomcat connector which ships with ColdFusion 10+. By default, this is located at '''''{CF Install Dir}/config/wsconfig/1/workers.properties'''''&lt;br /&gt;
*Check for a '''max_packet_size''' setting. It may look like this: ''max_packet_size='''65536'''''&lt;br /&gt;
*Now open the Tomcat '''server.xml''' configuration file located here: '''''{CF Install Dir}/cfusion/runtime/conf/server.xml'''''&lt;br /&gt;
*Find the line for the AJP/1.3 connector. Ensure the '''packetSize''' attribute is present and that it is set to the same value as the JK connector.&lt;br /&gt;
*;Example: ''&amp;lt;Connector port=&amp;quot;8012&amp;quot; protocol=&amp;quot;AJP/1.3&amp;quot; redirectPort=&amp;quot;8445&amp;quot; maxThreads=&amp;quot;250&amp;quot; '''packetSize=&amp;quot;65536&amp;quot;'''/&amp;gt;''&lt;br /&gt;
*After making the packet size the same within the JK connector and Tomcat, restart IIS and ColdFusion for the new settings to take effect&lt;br /&gt;
&lt;br /&gt;
[[Category:Mura]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:VPS]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;br /&gt;
[[Category:Railo-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2703</id>
		<title>Lucee</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2703"/>
				<updated>2015-09-02T19:03:33Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* How do I create a datasource within Lucee? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
[[File:Luceelogo.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://lucee.org/ Lucee] is an open-source CFML engine and the successor of Railo. We proudly support Lucee in our environment, and more info about its background and usage is below.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The Lucee project was forked from Railo 4.2 in January 2015 and is owned by Lucee Association Switzerland. Though development on Railo has halted, Lucee will eventually inherit the enhancements planned for Railo 5. Currently Lucee operates the same as the latest available version of Railo, so you can migrate your Railo codebase to it without any surprises. &lt;br /&gt;
&lt;br /&gt;
See these blogs for more info on the switch from Railo to Lucee:&lt;br /&gt;
*[http://blog.adamcameron.me/2015/01/lucee.html Lucee - Adam Cameron's Dev Blog]&lt;br /&gt;
*[http://www.codersrevolution.com/blog/railo-and-lucee-hunka-hunka-burning-questions Railo and Lucee ... - Coder's Revolution]&lt;br /&gt;
&lt;br /&gt;
==Usage / Resources==&lt;br /&gt;
For information about Lucee please reference [https://bitbucket.org/lucee/lucee/wiki/ the Lucee wiki]. Specifically, the [https://bitbucket.org/lucee/lucee/wiki/Cookbook Lucee Cookbook] has lots of good info about getting started. &lt;br /&gt;
&lt;br /&gt;
If you're new to CFML in general, the following resources will help you get learn the basics:&lt;br /&gt;
*[http://www.trycf.com/tutorials TryCF.com Tutorials]&lt;br /&gt;
*[http://bittersweetryan.github.io/ColdFusion-Koans/ ColdFusion Koans]&lt;br /&gt;
*[https://github.com/cfjedimaster/ColdFusion-UI-the-Right-Way ColdFusion UI the Right Way]&lt;br /&gt;
*[https://github.com/daccfml/cfscript/blob/master/cfscript.md CFScript Documentation]&lt;br /&gt;
&lt;br /&gt;
==How do I access my Lucee Web Administator page?==&lt;br /&gt;
The preferred way to access your site's Lucee Web Administrator is by clicking the '''''Web Administrator''''' link within your control panel. Alternatively, you may access it by appending '''''/lucee/admin/web.cfm''''' to the end of your site's domain name or testing URL.&lt;br /&gt;
===I'm redirected to another page on my site when accessing the Lucee Web Administrator===&lt;br /&gt;
If your site uses rewrite rules to make your site's links search-engine-friendly, then you'll need to make a small adjustment to your rewrite rules. Add the following line to your site's ''.htacess'' file to allow your Lucee Web Administrator to load properly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
 &lt;br /&gt;
RewriteCond %{REQUEST_URI} !^.*/(lucee)($|/.*$) [NC]&lt;br /&gt;
RewriteRule ^(.*)$ - [NC,L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That code will tell the rewrite engine to ignore requests that contain the word ''lucee''. If your site already has a similar ''RewriteCond'' in its .htacess file ''(common with CF Wheels or ColdBox)'', then just add ''lucee'' to the list of URIs to bypass.&lt;br /&gt;
&lt;br /&gt;
==How do I create a datasource within Lucee?==&lt;br /&gt;
You may create Lucee datasources (DSNs) either withing your site's Lucee Web Administrator or within the site's Application.cfc. More info on creating Lucee datasources is in this Lucee Cookbook entry: [https://bitbucket.org/lucee/lucee/wiki/Cookbook_Datasource_Define_Datasource How to define a Datasource]&lt;br /&gt;
&lt;br /&gt;
==How do I apply updates to Lucee?==&lt;br /&gt;
On a VPS you would apply updates to Lucee through your Lucee Server Administrator. This can be accessed via the shortcut on your server's desktop (Windows), or by visiting http://ServerIP/lucee/admin/server.cfm. ''(replace '''ServerIP''' with your server's public IP address)''&lt;br /&gt;
&lt;br /&gt;
*Once logged-in, click the '''Update''' link under '''Services'''. &lt;br /&gt;
*If an update is available, it will be displayed under the ''Info'' section of that page. &lt;br /&gt;
*To apply the update, scroll to the bottom of the page and click the '''Execute Update''' button. &lt;br /&gt;
**Once finished, you will be logged-out of the Lucee Server Administrator. &lt;br /&gt;
**Once you log-in again, you should see the new version number listed. &lt;br /&gt;
&lt;br /&gt;
If the update breaks part of your site, you can remove it from within the '''Services--&amp;gt;Update''' page as well. Just scroll to the bottom of that page and click the '''Remove Latest Patch''' button.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting Lucee Errors==&lt;br /&gt;
===Lucee Web Admin - The DNS for this domain is not pointed to this server===&lt;br /&gt;
'''Error:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When accessing the Lucee Web Admin via the cPanel plugin, you receive this error: &lt;br /&gt;
    The DNS for this domain is not pointed to this server. Please check the DNS settings to make sure it is pointed to the correct IP. &lt;br /&gt;
&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Wait for a moment then reload the page in your browser. This error happens when your Web Admin takes longer than expected to initialize, but reloading the page will allow the Lucee Web Admin to load as expected.&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_FAQs&amp;diff=2698</id>
		<title>ColdFusion FAQs</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_FAQs&amp;diff=2698"/>
				<updated>2015-08-17T20:42:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: Forgot to preview the post earlier...sorry about that&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=ColdFusion Frequently Asked Questions (FAQ)=&lt;br /&gt;
==Do you support cfform?==&lt;br /&gt;
Yes, this is supported.&lt;br /&gt;
==Do you support ColdFusion Report Builder==&lt;br /&gt;
The ColdFusion Report Builder uses RDS for the Query Builder. We have RDS disabled for security purposes as recommended by Adobe / Macromedia.&lt;br /&gt;
&lt;br /&gt;
We suggest downloading the developer edition of ColdFusion and Report builder, installing locally. Build the reports with the local development environment and upload the ColdFusion Report Files (CFR files) to our servers. Specify the path to your pre-built report files from within the cfreport tag which is NOT disabled.&lt;br /&gt;
&lt;br /&gt;
==Do you support ColdFusion Builder / RDS==&lt;br /&gt;
You may use ColdFusion Builder to transfer files to your site via FTP as mentioned in the [[ColdFusion_Builder|ColdFusion Builder]] wiki. &lt;br /&gt;
&lt;br /&gt;
However, because RDS is disabled on our shared servers as mentioned above, you may not use ColdFusion's Remote Development Services with our shared servers. Instead, please either use the ColdFusion server shipped with ColdFusion Builder, a separate local ColdFusion installation, or one of our VPS/Dedicated servers to take advantage of advanced development features within ColdFusion Builder.&lt;br /&gt;
&lt;br /&gt;
==Do you support Custom Tags with your ColdFusion Hosting?==&lt;br /&gt;
We do support custom tags, but not all .cfx custom tags, which may require additional server installs of .dll's, etc. If it is a commercially available tag, we'll consider installing it.&lt;br /&gt;
&lt;br /&gt;
Standard .cfm custom tags, yes.&lt;br /&gt;
&lt;br /&gt;
Custom Tag directories for your site can be created through the site's Application.cfc file as shown in the [[ColdFusion_Tips_%26_Tricks#Per-Application_Custom_Tag_Paths|ColdFusion Tips &amp;amp; Tricks]] wiki.&lt;br /&gt;
==Do you support the tags CFFILE, CFDIRECTORY and CFOBJECT?==&lt;br /&gt;
Yes, these are supported.&lt;br /&gt;
==Do you Support CFSchedule for Scheduled Tasks in Coldfusion?==&lt;br /&gt;
Yes, ColdFusion Scheduled Tasks are supported.&lt;br /&gt;
&lt;br /&gt;
To setup a schedule task in ColdFusion, you can use the CFSCHEDULE tag to create the scheduled task the first time. The [[ColdFusion_Tips_%26_Tricks#Scheduling_Tasks_in_ColdFusion|ColdFusion Tips &amp;amp; Tricks]] wiki shows how to use the CFSCHEDULE tag.&lt;br /&gt;
&lt;br /&gt;
==Do you support the CFX_IMAGE tag?==&lt;br /&gt;
No, this tag is not supported. Instead you may use the built-in [https://wikidocs.adobe.com/wiki/display/coldfusionen/cfimage cfimage] tag, [http://www.kolumbus.fi/jukka.manner/cfx_openimage/ cfx_openimage], or Efflaire's [http://efflare.com/docs/CFX_ImageCR3/reference/index.html cfx_imagecr3].&lt;br /&gt;
&lt;br /&gt;
==How do I use the CFX_ImageCR3 tag?==&lt;br /&gt;
This article from Efflaire shows examples of how to use the CFX_ImageCR3 custom tag: http://efflare.com/docs/CFX_ImageCR3/reference/examples/&lt;br /&gt;
&lt;br /&gt;
The full tag documentation is here: http://efflare.com/docs/CFX_ImageCR3/&lt;br /&gt;
&lt;br /&gt;
==Do you support the CFX_Google API for ColdFusion?==&lt;br /&gt;
Yes, we support CFX_Google on our ColdFusion servers.&lt;br /&gt;
&lt;br /&gt;
''Note: This tag was written for Google's deprecated version 2 API. If you do not have a version 2 API key you can still obtain a console key that works with version 2. Information on getting a Console Key can be found here: [https://developers.google.com/maps/documentation/javascript/tutorial#api_key Google: Obtaining an API Key]''&lt;br /&gt;
==Do you support the CFCONTENT tag?==&lt;br /&gt;
Yes, we support CFCONTENT.&lt;br /&gt;
==Do you support CF Shopkart?==&lt;br /&gt;
Yes, we support CF Shopkart on our coldfusion servers.&lt;br /&gt;
==Do you support Flash Remoting?==&lt;br /&gt;
Yes, this is automatically enabled for all sites on our ColdFusion servers. &lt;br /&gt;
&lt;br /&gt;
Please use &amp;lt;nowiki&amp;gt;http://domainname.com/flex2gateway/&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://domainname.com/flashservices/gateway/&amp;lt;/nowiki&amp;gt; as the gateway URL for your application. &amp;lt;br /&amp;gt;''(replacing domainname.com with your actual domain)''&lt;br /&gt;
&lt;br /&gt;
==Do your ColdFusion servers support Verity and SOLR?==&lt;br /&gt;
Yes, both Verity (K2) and SOLR are supported on ColdFusion versions 7-9. Verity is not available in ColdFusion 10.&lt;br /&gt;
&lt;br /&gt;
==Are any ColdFusion tags/features restricted? What tags/features are allowed?==&lt;br /&gt;
Most tags and functions are allowed, however we disable the following ColdFusion features / tags on our shared hosting accounts:&lt;br /&gt;
&lt;br /&gt;
*Access To Internal ColdFusion Java Components*&lt;br /&gt;
*Remote Development Services (RDS)&lt;br /&gt;
*CFExecute&lt;br /&gt;
*CFRegistry&lt;br /&gt;
&lt;br /&gt;
All other tags are supported, including ''CreateObject()''. The only restriction on ''CreateObject'' is that it may not be used with Internal ColdFusion Java Objects as mentioned above. If you are experiencing any difficulty with another ColdFusion tag or feature, please contact our customer support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;''Prevents CFML code from accessing and creating Java objects that are part of the internal ColdFusion implementation. This prevents a non-authenticated CFML template from reading or modifying administration and configuration information for this server. [http://www.adobe.com/products/coldfusion-family.html Adobe] suggests these tags be disabled for production servers.''&lt;br /&gt;
&lt;br /&gt;
==May I Access the ColdFusion Administrator on my Shared Server==&lt;br /&gt;
No; we do not allow access to the ColdFusion Administrator on our shared servers. Our control panel allows our customers to add and edit DSNs, and the Windows Control Panel also allows you to view ColdFusion error logs. &lt;br /&gt;
&lt;br /&gt;
With our Shared Railo plans, though, each account has access to their site's Railo Web Administrator through the link in their Control Panel.&lt;br /&gt;
&lt;br /&gt;
==Do You Support .java or .jar files?==&lt;br /&gt;
No, we do not support .java or .jar files. The exception is with ColdFusion 10+ you may add .jar files to your application as shown here: [[ColdFusion_Tips_%26_Tricks#Loading_custom_Java_library_or_Java_Libraries_.28jar_or_class_files.29_in_ColdFusion_10|Loading Custom Java Libraries in ColdFusion 10]]&lt;br /&gt;
&lt;br /&gt;
==Can I use CFExecute?==&lt;br /&gt;
No, that tag is disabled.&lt;br /&gt;
==Is the CFMAIL tag enabled?==&lt;br /&gt;
Yes, the CFMAIL tag is enabled on all of our ColdFusion servers. See the [[Cfmail|cfmail]] wiki for details on how to use it in our environment.&lt;br /&gt;
==Is CFX_JpegResize allowed on your ColdFusion servers?==&lt;br /&gt;
Yes, this is installed and allowed on our 32-bit ColdFusion servers.&lt;br /&gt;
&lt;br /&gt;
==Will you deploy my (CAR) file from the Coldfusion Administrator?==&lt;br /&gt;
We will not deploy it that way, as that is a default method that wouldn't benefit you on our shared servers. Instead, please deploy your application through FTP and create the datasource (DSN) through your control panel at wcp.hostek.com. Please see the [[WCP_(Windows_based_Control_Panel)#DataSources.28DSN.27s.29|WCP DataSources]] wiki for instructions on how to create a datasource.&lt;br /&gt;
&lt;br /&gt;
''Note'': If you have a VPS or Dedicated server at Hostek.com, you can deploy your application how you wish. Please see our [http://hostek.com/hosting/vps/best-vps-hosting.asp VPS Plans] page for more info on our VPS options, and our [http://hostek.com/hosting/dedicated/virtual-dedicated-hosting.asp Virtual Dedicated Plans] page for details on our virtual dedicated servers.&lt;br /&gt;
&lt;br /&gt;
==Can I use J2EE Session Variables?==&lt;br /&gt;
Yes, we are now supporting J2EE Session Variables.&lt;br /&gt;
&lt;br /&gt;
==With ColdFusion, how can I see the real error, while the visitor sees a page without the error?==&lt;br /&gt;
In this example error template, be sure to replace 123.123.123.123 with your IP. You can get your IP using our [http://hostek.com/ip/ IP lookup tool].&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&lt;br /&gt;
&amp;lt;cfset aIP = cgi.REMOTE_ADDR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aIP is &amp;quot;123.123.123.123&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;strong&amp;gt;#error.Diagnostics#&amp;lt;/strong&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
#TimeFormat(error.DateTime,&amp;quot;hh:mm tt&amp;quot;)# - #DateFormat(error.DateTime,&amp;quot;MMMM&lt;br /&gt;
D, YYYY&amp;quot;)#&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
#error.Browser#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
IP ADDRESS: &lt;br /&gt;
#error.RemoteAddress#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
TEMPLATE: #error.Template#?#error.QueryString#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.ValidationHeader#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.InvalidFields#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.ValidationFooter#&lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
Enter any text or formatting here that you want to display to your visitor instead of &lt;br /&gt;
them seeing the error.&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How do I get Google Maps to work with CFMAP?==&lt;br /&gt;
The common problem is placing your googlemapkey in your application.cfm file. Instead, place the googlemapkey in an application.cfc file. You can leave your application.cfm as it is, and just create an application.cfc if you don't have one, and take the googlemapkey out of your application.cfm file and place it in your application.cfc file.&lt;br /&gt;
&lt;br /&gt;
For example, this would go in your application.cfc file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;cfset this.googlemapkey=&amp;quot;abc123...your google key here...789xyz&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in your cfm template where the cfmap is called, you would add code to it like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;cfmap name=&amp;quot;themap&amp;quot; centeraddress=&amp;quot;Tulsa, OK&amp;quot; width=&amp;quot;400&amp;quot; height=&amp;quot;400&amp;quot; zoomlevel=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
==How do I enable the CFCHART tag?==&lt;br /&gt;
This is already enabled on all new accounts, but if CFCHART does not work on your site please do the following:&lt;br /&gt;
*Create a folder named CFIDE off of the root level.&lt;br /&gt;
*Create a blank file (0 bytes) named GraphData.cfm &lt;br /&gt;
*Create a directory called main off of CFIDE &lt;br /&gt;
*Navigate to the new directory at CFIDE/main &lt;br /&gt;
*Create a blank file (0 bytes) named ide.cfm&lt;br /&gt;
&lt;br /&gt;
The CFCHART tag should now work.&lt;br /&gt;
&lt;br /&gt;
==How do I enable / disable Robust Exception Information on my site?==&lt;br /&gt;
This can be accomplished through the code shown in this wiki: [[ColdFusion_Tips_%26_Tricks#Per-application_Robust_Exception_Information_Settings|Per-application Robust Exception Information Settings]]&lt;br /&gt;
&lt;br /&gt;
==Is Coldfusion Request Debug Output Available?==&lt;br /&gt;
On our shared servers this is not allowed, because this feature can have a negative performance impact for the entire server. This is only allowed in our VPS/Dedicated environment.&lt;br /&gt;
&lt;br /&gt;
==How do I adjust the JSON Prefix for my site==&lt;br /&gt;
If you wish to control ColdFusion JSON Prefix settings for your site, you can follow the guide here: [[ColdFusion_Tips_%26_Tricks#Per-application_JSON_Prefix|Per-Application ColdFusion JSON Prefix]]&lt;br /&gt;
&lt;br /&gt;
==What do I set as the &amp;quot;Destination&amp;quot; attribute for cffile?==&lt;br /&gt;
For the &amp;quot;Destination&amp;quot; attribute, you should use the FULL path to the folder to which you wish the documents to be uploaded. You can make use of the [http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c67.html expandpath] function to obtain the full path dynamically.&lt;br /&gt;
==How can I limit the tools available using the cftextarea FCKEditor toolbar?==&lt;br /&gt;
There are two variations of the toolbar which can be specified in the &amp;lt;cftextarea&amp;gt; tag. If the '''toolbar''' attribute is un-specified, the toolbar set is &amp;quot;Default&amp;quot;. If specified, you can use either &amp;quot;Default&amp;quot; or &amp;quot;Basic&amp;quot; this is case sensitive. See the tag options here for more information: [http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7afd.html cftextarea docs]&lt;br /&gt;
&lt;br /&gt;
The [http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7a01.html#WSc3ff6d0ea77859461172e0811cbec22c24-6f1b Using the rich text editor] article from Adobe has more info on its usage.&lt;br /&gt;
&lt;br /&gt;
==How do I install Mura (previously known as Sava) CMS on your servers?==&lt;br /&gt;
If your account uses our wcp.hostek.com control panel, you can install Mura through the Applications section of the control panel.&lt;br /&gt;
&lt;br /&gt;
If your account is on Linux, or you prefer to perform a manual installation you can follow the steps below:&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
*Must have a Coldfusion or Railo hosting plan. Blue River (the makers of Mura) recommend the Silver plan.&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
#Put the contents of &amp;quot;mura[version]\www&amp;quot; directory into your webroot, (should be ''wwwroot'' on Windows and ''public_html'' on Linux). This includes the following directories and files: admin, config, default, fckeditor, requirements, tasks, Application.cfc, contentServer.cfm, index.cfm.&lt;br /&gt;
#Create a database (MySQL or MSSQL) using Helm either MS SQL or MySQL named &amp;quot;SomethingUnique_muraDB&amp;quot; and run then import/run the appropriate script (found in /db) against the database you created.&amp;lt;br /&amp;gt;For MySQL use PHPMyAdmin (Available in WCP and cPanel.)&amp;lt;br /&amp;gt;For MSSQL use Query Analyzer, SQL Management Studio or sqlcmd.&lt;br /&gt;
#Create a Datasource (DSN) for connecting to the database you created in the step above. &lt;br /&gt;
#Navigate to your domain name, and you should see the auto-installer form appear.&amp;lt;br /&amp;gt;''Note: The email settings are not required to get mura up and running but you may get errors when running mura if they are not set. These, of course, pertain only to functionality that uses email.''&lt;br /&gt;
#In your browser go to http://[domain]/admin/ and login.&amp;lt;br /&amp;gt;- Username: admin&amp;lt;br /&amp;gt;- Password: admin&lt;br /&gt;
#You're done installing mura. Enjoy!&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
If you receive the message &amp;quot;Application Starting. This site is currently loading.&amp;quot;, mura needs to be reloaded by appending &amp;quot;?appreload&amp;amp;override&amp;quot; to the url. For example: &amp;lt;pre&amp;gt;http://[domain]/admin/index.cfm?appreload&amp;amp;override&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have any questions regarding installation, please visit our Support Forum at the [http://http://getmura.com/forum/ Mura Forum].&lt;br /&gt;
&lt;br /&gt;
Mura can be downloaded at: [http://getmura.com/download/mura-downloads/ getmura.com]&lt;br /&gt;
&lt;br /&gt;
==How can I disable ScriptProtect?==&lt;br /&gt;
ColdFusion versions MX7 and higher support a feature called ScriptProtect which helps prevent XSS (cross site scripting) attacks. This feature is helpful as it strips certain HTML entities from user input, but it can also affect your Web app's functionality. A common example of this is &amp;quot;&amp;lt;embed&amp;gt;&amp;quot; tags being removed when a user tries to post a YouTube video to their blog.&lt;br /&gt;
&lt;br /&gt;
This feature is enabled on our servers, but its value can be modified in your &amp;quot;Application.cfc&amp;quot; or &amp;quot;Application.cfm&amp;quot; file. &lt;br /&gt;
===If Using Application.cfm===&lt;br /&gt;
Add the following attribute to your '''&amp;lt;cfapplication&amp;gt;''' tag: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scriptProtect = &amp;quot;none&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===If Using Application.cfc===&lt;br /&gt;
Place the following code within the '''&amp;lt;cfcomponent&amp;gt;''' section of your Application.cfc&lt;br /&gt;
====If using tag-based Application.cfc====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.scriptProtect = &amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====If using &amp;lt;cfscript&amp;gt; Application.cfc====&lt;br /&gt;
&amp;lt;pre&amp;gt;this.scriptProtect = &amp;quot;false&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Settings you should enable within your local ColdFusion Administrator==&lt;br /&gt;
When developing on a local ColdFusion server, most developers accept the default Coldfusion Administrator settings that are set by the ColdFusion installer. This is fine for development servers, but it can cause some problems when moving a ColdFusion application into production in a shared hosting enviroment. To ensure your code runs well when you move it to our servers, we recommend you make the following adjustments within your local ColdFusion Administrator:&lt;br /&gt;
&lt;br /&gt;
First, on the Settings page make sure you enable the setting that says: &amp;quot;Disable access to internal ColdFusion Java components&amp;quot; (pictured below)&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Second, under the Security Tab click the Sandbox Security link then click the box to &amp;quot;Enable ColdFusion Security&amp;quot;. (pictured below)&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once Sandbox Security is enabled, you'll need to create a sandbox for your local site. To do this, add the full path to your site below where it says &amp;quot;Add Security Sandbox&amp;quot;, then click &amp;quot;Add&amp;quot;. For example if you are using the default site location for IIS, you would use 'C:\inetpub\wwwroot' as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings4.jpg]]&lt;br /&gt;
&lt;br /&gt;
The last thing to do is add the correct paths and permissions. By default, ColdFusion will add the path to your site, but you'll also want to make sure the following paths/permissions are added too (permissions are listed in parentheses next to path):&lt;br /&gt;
&lt;br /&gt;
    C:\ColdFusion10\cache\- (Read,Write,Delete)&lt;br /&gt;
    C:\WINDOWS\Fonts\- (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\wwwroot\WEB-INF\cfclasses\- (Read,Write)&lt;br /&gt;
    C:\ColdFusion10\cfusion\wwwroot\WEB-INF\cftags\interface.cfc (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache\- (Read,Write,Delete)&lt;br /&gt;
    C:\ColdFusion10\cfusion\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\- (Read,Write,Delete)&lt;br /&gt;
    C:\ColdFusion10\cfusion\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache\CFFileServlet\_cf_image\- (Read,Write,Delete)&lt;br /&gt;
    C:\Users\USERNAME\AppData\Local\Temp\- (Read,Write,Delete)*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note, this assumes you're using a recent version of Windows (Vista or newer), and that ColdFusion is installed to 'C:\ColdFusion10'. If on an earlier version of Windows, the only thing you'll do differently is replace 'C:\Users\USERNAME\AppData\Local\Temp\-'* above with this path: 'C:\DOCUME~1\USERNAME\LOCALS~1\Temp\-'*&lt;br /&gt;
&lt;br /&gt;
*Replace USERNAME with the actual name of your ColdFusion runtime user.&lt;br /&gt;
&lt;br /&gt;
==How do I disable / enable Sandbox Security on my ColdFusion VPS?==&lt;br /&gt;
Sandbox Security is great for development or multi-site servers, but it causes ColdFusion requests to run a bit slower than they normally would. If you’re not actively using this security feature, you can disable it within the '''Security &amp;gt; Sandbox Security''' page within your server’s ''ColdFusion Administrator''.&lt;br /&gt;
&lt;br /&gt;
''Important'': You must restart ColdFusion after disabling or enabling Sandbox Security for it to take effect. &lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings2.jpg]]&lt;br /&gt;
&lt;br /&gt;
''Reference: [https://wikidocs.adobe.com/wiki/display/coldfusionen/Administering+ColdFusion+Security#AdministeringColdFusionSecurity-Usingsandboxsecurity Adobe - Using Sandbox Security]''&lt;br /&gt;
==Using ColdFusion Builder to Syncronize Files via FTP==&lt;br /&gt;
===Creating the FTP connection===&lt;br /&gt;
Open ColdFusion Builder&lt;br /&gt;
#From the left lower panel right-click on the world icon labeled '''FTP'''&lt;br /&gt;
#Select '''Add New FTP Site'''&lt;br /&gt;
#Enter the ''Server'', ''Username'', and ''Password'', click '''Test''' to confirm settings are correct&lt;br /&gt;
#Enter the ''Remote Path'', this can either be the root '''/''' or the webroot (either '''/wwwroot''' for Windows servers or '''/public_html''' for Linux servers)&lt;br /&gt;
#Click '''OK'''&lt;br /&gt;
&lt;br /&gt;
===To configure a project to Synchronize===&lt;br /&gt;
#Right click on any project you wish to synchronize with over FTP. Hover over ''Synchronize'' and select '''Create New Synchronize Connection'''&lt;br /&gt;
#Make sure the path for the local project files is correct. For '''Remote''' select the newly created FTP Connection.&lt;br /&gt;
#Click ''OK''&lt;br /&gt;
&lt;br /&gt;
===To Synchronize Files: Remote-to-Local or Local-to-Remote===&lt;br /&gt;
#Right click on any project you wish to synchronize with over FTP. &lt;br /&gt;
#Hover over Synchronize and select '''Synchronize''' and follow the prompts to confirm which files should be synchronized.&lt;br /&gt;
&lt;br /&gt;
===Notes About Using Advanced ColdFusion Builder Development Features===&lt;br /&gt;
In order to use advanced development features within ColdFusion Builder, it should be used with a ColdFusion server that has RDS (''Remote Development Services'') enabled. Our shared servers do not have this feature enabled because it poses a security risk within production servers. As such, it is recommended to either [https://wikidocs.adobe.com/wiki/display/coldfusionen/Installing+the+Server+Configuration install a local copy of ColdFusion] or use one of our [http://hostek.com/hosting/coldfusion/vps/coldfusion-vps-hosting.htm ColdFusion VPS plans] for your development. If you install a local development ColdFusion installation, be sure to enable RDS during the install process. If you're using a ColdFusion VPS, you can enable RDS within the '''Security &amp;gt; RDS''' section of your ColdFusion Administrator.&lt;br /&gt;
&lt;br /&gt;
Once you have RDP enabled on a local development installation of ColdFusion or your own VPS, you can enable RDS support within ColdFusion Builder as shown here: [https://wikidocs.adobe.com/wiki/display/coldfusionen/Eclipse+RDS+Support ColdFusion Builder RDS Support]&lt;br /&gt;
&lt;br /&gt;
''Note:'' If you wish to have your local development ColdFusion server match our shared server settings, read the above entry for [[ColdFusion_FAQs#Settings you should enable within your local ColdFusion Administrator|Settings you should enable within your local ColdFusion Administrator]].&lt;br /&gt;
[[Category:ColdFusion]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_FAQs&amp;diff=2697</id>
		<title>ColdFusion FAQs</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_FAQs&amp;diff=2697"/>
				<updated>2015-08-17T20:41:07Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Do you support the CFX_IMAGE tag? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=ColdFusion Frequently Asked Questions (FAQ)=&lt;br /&gt;
==Do you support cfform?==&lt;br /&gt;
Yes, this is supported.&lt;br /&gt;
==Do you support ColdFusion Report Builder==&lt;br /&gt;
The ColdFusion Report Builder uses RDS for the Query Builder. We have RDS disabled for security purposes as recommended by Adobe / Macromedia.&lt;br /&gt;
&lt;br /&gt;
We suggest downloading the developer edition of ColdFusion and Report builder, installing locally. Build the reports with the local development environment and upload the ColdFusion Report Files (CFR files) to our servers. Specify the path to your pre-built report files from within the cfreport tag which is NOT disabled.&lt;br /&gt;
&lt;br /&gt;
==Do you support ColdFusion Builder / RDS==&lt;br /&gt;
You may use ColdFusion Builder to transfer files to your site via FTP as mentioned in the [[ColdFusion_Builder|ColdFusion Builder]] wiki. &lt;br /&gt;
&lt;br /&gt;
However, because RDS is disabled on our shared servers as mentioned above, you may not use ColdFusion's Remote Development Services with our shared servers. Instead, please either use the ColdFusion server shipped with ColdFusion Builder, a separate local ColdFusion installation, or one of our VPS/Dedicated servers to take advantage of advanced development features within ColdFusion Builder.&lt;br /&gt;
&lt;br /&gt;
==Do you support Custom Tags with your ColdFusion Hosting?==&lt;br /&gt;
We do support custom tags, but not all .cfx custom tags, which may require additional server installs of .dll's, etc. If it is a commercially available tag, we'll consider installing it.&lt;br /&gt;
&lt;br /&gt;
Standard .cfm custom tags, yes.&lt;br /&gt;
&lt;br /&gt;
Custom Tag directories for your site can be created through the site's Application.cfc file as shown in the [[ColdFusion_Tips_%26_Tricks#Per-Application_Custom_Tag_Paths|ColdFusion Tips &amp;amp; Tricks]] wiki.&lt;br /&gt;
==Do you support the tags CFFILE, CFDIRECTORY and CFOBJECT?==&lt;br /&gt;
Yes, these are supported.&lt;br /&gt;
==Do you Support CFSchedule for Scheduled Tasks in Coldfusion?==&lt;br /&gt;
Yes, ColdFusion Scheduled Tasks are supported.&lt;br /&gt;
&lt;br /&gt;
To setup a schedule task in ColdFusion, you can use the CFSCHEDULE tag to create the scheduled task the first time. The [[ColdFusion_Tips_%26_Tricks#Scheduling_Tasks_in_ColdFusion|ColdFusion Tips &amp;amp; Tricks]] wiki shows how to use the CFSCHEDULE tag.&lt;br /&gt;
&lt;br /&gt;
==Do you support the CFX_IMAGE tag?==&lt;br /&gt;
 No, this tag is not supported. Instead you may use the built-in ''cfimage'' tag, [cfx_openimage http://www.kolumbus.fi/jukka.manner/cfx_openimage/], or Efflaire's [http://efflare.com/docs/CFX_ImageCR3/reference/index.html cfx_imagecr3].&lt;br /&gt;
&lt;br /&gt;
==How do I use the CFX_ImageCR3 tag?==&lt;br /&gt;
This article from Efflaire shows examples of how to use the CFX_ImageCR3 custom tag: http://efflare.com/docs/CFX_ImageCR3/reference/examples/&lt;br /&gt;
&lt;br /&gt;
The full tag documentation is here: http://efflare.com/docs/CFX_ImageCR3/&lt;br /&gt;
&lt;br /&gt;
==Do you support the CFX_Google API for ColdFusion?==&lt;br /&gt;
Yes, we support CFX_Google on our ColdFusion servers.&lt;br /&gt;
&lt;br /&gt;
''Note: This tag was written for Google's deprecated version 2 API. If you do not have a version 2 API key you can still obtain a console key that works with version 2. Information on getting a Console Key can be found here: [https://developers.google.com/maps/documentation/javascript/tutorial#api_key Google: Obtaining an API Key]''&lt;br /&gt;
==Do you support the CFCONTENT tag?==&lt;br /&gt;
Yes, we support CFCONTENT.&lt;br /&gt;
==Do you support CF Shopkart?==&lt;br /&gt;
Yes, we support CF Shopkart on our coldfusion servers.&lt;br /&gt;
==Do you support Flash Remoting?==&lt;br /&gt;
Yes, this is automatically enabled for all sites on our ColdFusion servers. &lt;br /&gt;
&lt;br /&gt;
Please use &amp;lt;nowiki&amp;gt;http://domainname.com/flex2gateway/&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://domainname.com/flashservices/gateway/&amp;lt;/nowiki&amp;gt; as the gateway URL for your application. &amp;lt;br /&amp;gt;''(replacing domainname.com with your actual domain)''&lt;br /&gt;
&lt;br /&gt;
==Do your ColdFusion servers support Verity and SOLR?==&lt;br /&gt;
Yes, both Verity (K2) and SOLR are supported on ColdFusion versions 7-9. Verity is not available in ColdFusion 10.&lt;br /&gt;
&lt;br /&gt;
==Are any ColdFusion tags/features restricted? What tags/features are allowed?==&lt;br /&gt;
Most tags and functions are allowed, however we disable the following ColdFusion features / tags on our shared hosting accounts:&lt;br /&gt;
&lt;br /&gt;
*Access To Internal ColdFusion Java Components*&lt;br /&gt;
*Remote Development Services (RDS)&lt;br /&gt;
*CFExecute&lt;br /&gt;
*CFRegistry&lt;br /&gt;
&lt;br /&gt;
All other tags are supported, including ''CreateObject()''. The only restriction on ''CreateObject'' is that it may not be used with Internal ColdFusion Java Objects as mentioned above. If you are experiencing any difficulty with another ColdFusion tag or feature, please contact our customer support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;''Prevents CFML code from accessing and creating Java objects that are part of the internal ColdFusion implementation. This prevents a non-authenticated CFML template from reading or modifying administration and configuration information for this server. [http://www.adobe.com/products/coldfusion-family.html Adobe] suggests these tags be disabled for production servers.''&lt;br /&gt;
&lt;br /&gt;
==May I Access the ColdFusion Administrator on my Shared Server==&lt;br /&gt;
No; we do not allow access to the ColdFusion Administrator on our shared servers. Our control panel allows our customers to add and edit DSNs, and the Windows Control Panel also allows you to view ColdFusion error logs. &lt;br /&gt;
&lt;br /&gt;
With our Shared Railo plans, though, each account has access to their site's Railo Web Administrator through the link in their Control Panel.&lt;br /&gt;
&lt;br /&gt;
==Do You Support .java or .jar files?==&lt;br /&gt;
No, we do not support .java or .jar files. The exception is with ColdFusion 10+ you may add .jar files to your application as shown here: [[ColdFusion_Tips_%26_Tricks#Loading_custom_Java_library_or_Java_Libraries_.28jar_or_class_files.29_in_ColdFusion_10|Loading Custom Java Libraries in ColdFusion 10]]&lt;br /&gt;
&lt;br /&gt;
==Can I use CFExecute?==&lt;br /&gt;
No, that tag is disabled.&lt;br /&gt;
==Is the CFMAIL tag enabled?==&lt;br /&gt;
Yes, the CFMAIL tag is enabled on all of our ColdFusion servers. See the [[Cfmail|cfmail]] wiki for details on how to use it in our environment.&lt;br /&gt;
==Is CFX_JpegResize allowed on your ColdFusion servers?==&lt;br /&gt;
Yes, this is installed and allowed on our 32-bit ColdFusion servers.&lt;br /&gt;
&lt;br /&gt;
==Will you deploy my (CAR) file from the Coldfusion Administrator?==&lt;br /&gt;
We will not deploy it that way, as that is a default method that wouldn't benefit you on our shared servers. Instead, please deploy your application through FTP and create the datasource (DSN) through your control panel at wcp.hostek.com. Please see the [[WCP_(Windows_based_Control_Panel)#DataSources.28DSN.27s.29|WCP DataSources]] wiki for instructions on how to create a datasource.&lt;br /&gt;
&lt;br /&gt;
''Note'': If you have a VPS or Dedicated server at Hostek.com, you can deploy your application how you wish. Please see our [http://hostek.com/hosting/vps/best-vps-hosting.asp VPS Plans] page for more info on our VPS options, and our [http://hostek.com/hosting/dedicated/virtual-dedicated-hosting.asp Virtual Dedicated Plans] page for details on our virtual dedicated servers.&lt;br /&gt;
&lt;br /&gt;
==Can I use J2EE Session Variables?==&lt;br /&gt;
Yes, we are now supporting J2EE Session Variables.&lt;br /&gt;
&lt;br /&gt;
==With ColdFusion, how can I see the real error, while the visitor sees a page without the error?==&lt;br /&gt;
In this example error template, be sure to replace 123.123.123.123 with your IP. You can get your IP using our [http://hostek.com/ip/ IP lookup tool].&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&lt;br /&gt;
&amp;lt;cfset aIP = cgi.REMOTE_ADDR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aIP is &amp;quot;123.123.123.123&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;strong&amp;gt;#error.Diagnostics#&amp;lt;/strong&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
#TimeFormat(error.DateTime,&amp;quot;hh:mm tt&amp;quot;)# - #DateFormat(error.DateTime,&amp;quot;MMMM&lt;br /&gt;
D, YYYY&amp;quot;)#&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
#error.Browser#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
IP ADDRESS: &lt;br /&gt;
#error.RemoteAddress#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
TEMPLATE: #error.Template#?#error.QueryString#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.ValidationHeader#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.InvalidFields#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.ValidationFooter#&lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
Enter any text or formatting here that you want to display to your visitor instead of &lt;br /&gt;
them seeing the error.&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How do I get Google Maps to work with CFMAP?==&lt;br /&gt;
The common problem is placing your googlemapkey in your application.cfm file. Instead, place the googlemapkey in an application.cfc file. You can leave your application.cfm as it is, and just create an application.cfc if you don't have one, and take the googlemapkey out of your application.cfm file and place it in your application.cfc file.&lt;br /&gt;
&lt;br /&gt;
For example, this would go in your application.cfc file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;cfset this.googlemapkey=&amp;quot;abc123...your google key here...789xyz&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in your cfm template where the cfmap is called, you would add code to it like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;cfmap name=&amp;quot;themap&amp;quot; centeraddress=&amp;quot;Tulsa, OK&amp;quot; width=&amp;quot;400&amp;quot; height=&amp;quot;400&amp;quot; zoomlevel=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
==How do I enable the CFCHART tag?==&lt;br /&gt;
This is already enabled on all new accounts, but if CFCHART does not work on your site please do the following:&lt;br /&gt;
*Create a folder named CFIDE off of the root level.&lt;br /&gt;
*Create a blank file (0 bytes) named GraphData.cfm &lt;br /&gt;
*Create a directory called main off of CFIDE &lt;br /&gt;
*Navigate to the new directory at CFIDE/main &lt;br /&gt;
*Create a blank file (0 bytes) named ide.cfm&lt;br /&gt;
&lt;br /&gt;
The CFCHART tag should now work.&lt;br /&gt;
&lt;br /&gt;
==How do I enable / disable Robust Exception Information on my site?==&lt;br /&gt;
This can be accomplished through the code shown in this wiki: [[ColdFusion_Tips_%26_Tricks#Per-application_Robust_Exception_Information_Settings|Per-application Robust Exception Information Settings]]&lt;br /&gt;
&lt;br /&gt;
==Is Coldfusion Request Debug Output Available?==&lt;br /&gt;
On our shared servers this is not allowed, because this feature can have a negative performance impact for the entire server. This is only allowed in our VPS/Dedicated environment.&lt;br /&gt;
&lt;br /&gt;
==How do I adjust the JSON Prefix for my site==&lt;br /&gt;
If you wish to control ColdFusion JSON Prefix settings for your site, you can follow the guide here: [[ColdFusion_Tips_%26_Tricks#Per-application_JSON_Prefix|Per-Application ColdFusion JSON Prefix]]&lt;br /&gt;
&lt;br /&gt;
==What do I set as the &amp;quot;Destination&amp;quot; attribute for cffile?==&lt;br /&gt;
For the &amp;quot;Destination&amp;quot; attribute, you should use the FULL path to the folder to which you wish the documents to be uploaded. You can make use of the [http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c67.html expandpath] function to obtain the full path dynamically.&lt;br /&gt;
==How can I limit the tools available using the cftextarea FCKEditor toolbar?==&lt;br /&gt;
There are two variations of the toolbar which can be specified in the &amp;lt;cftextarea&amp;gt; tag. If the '''toolbar''' attribute is un-specified, the toolbar set is &amp;quot;Default&amp;quot;. If specified, you can use either &amp;quot;Default&amp;quot; or &amp;quot;Basic&amp;quot; this is case sensitive. See the tag options here for more information: [http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7afd.html cftextarea docs]&lt;br /&gt;
&lt;br /&gt;
The [http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7a01.html#WSc3ff6d0ea77859461172e0811cbec22c24-6f1b Using the rich text editor] article from Adobe has more info on its usage.&lt;br /&gt;
&lt;br /&gt;
==How do I install Mura (previously known as Sava) CMS on your servers?==&lt;br /&gt;
If your account uses our wcp.hostek.com control panel, you can install Mura through the Applications section of the control panel.&lt;br /&gt;
&lt;br /&gt;
If your account is on Linux, or you prefer to perform a manual installation you can follow the steps below:&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
*Must have a Coldfusion or Railo hosting plan. Blue River (the makers of Mura) recommend the Silver plan.&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
#Put the contents of &amp;quot;mura[version]\www&amp;quot; directory into your webroot, (should be ''wwwroot'' on Windows and ''public_html'' on Linux). This includes the following directories and files: admin, config, default, fckeditor, requirements, tasks, Application.cfc, contentServer.cfm, index.cfm.&lt;br /&gt;
#Create a database (MySQL or MSSQL) using Helm either MS SQL or MySQL named &amp;quot;SomethingUnique_muraDB&amp;quot; and run then import/run the appropriate script (found in /db) against the database you created.&amp;lt;br /&amp;gt;For MySQL use PHPMyAdmin (Available in WCP and cPanel.)&amp;lt;br /&amp;gt;For MSSQL use Query Analyzer, SQL Management Studio or sqlcmd.&lt;br /&gt;
#Create a Datasource (DSN) for connecting to the database you created in the step above. &lt;br /&gt;
#Navigate to your domain name, and you should see the auto-installer form appear.&amp;lt;br /&amp;gt;''Note: The email settings are not required to get mura up and running but you may get errors when running mura if they are not set. These, of course, pertain only to functionality that uses email.''&lt;br /&gt;
#In your browser go to http://[domain]/admin/ and login.&amp;lt;br /&amp;gt;- Username: admin&amp;lt;br /&amp;gt;- Password: admin&lt;br /&gt;
#You're done installing mura. Enjoy!&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
If you receive the message &amp;quot;Application Starting. This site is currently loading.&amp;quot;, mura needs to be reloaded by appending &amp;quot;?appreload&amp;amp;override&amp;quot; to the url. For example: &amp;lt;pre&amp;gt;http://[domain]/admin/index.cfm?appreload&amp;amp;override&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have any questions regarding installation, please visit our Support Forum at the [http://http://getmura.com/forum/ Mura Forum].&lt;br /&gt;
&lt;br /&gt;
Mura can be downloaded at: [http://getmura.com/download/mura-downloads/ getmura.com]&lt;br /&gt;
&lt;br /&gt;
==How can I disable ScriptProtect?==&lt;br /&gt;
ColdFusion versions MX7 and higher support a feature called ScriptProtect which helps prevent XSS (cross site scripting) attacks. This feature is helpful as it strips certain HTML entities from user input, but it can also affect your Web app's functionality. A common example of this is &amp;quot;&amp;lt;embed&amp;gt;&amp;quot; tags being removed when a user tries to post a YouTube video to their blog.&lt;br /&gt;
&lt;br /&gt;
This feature is enabled on our servers, but its value can be modified in your &amp;quot;Application.cfc&amp;quot; or &amp;quot;Application.cfm&amp;quot; file. &lt;br /&gt;
===If Using Application.cfm===&lt;br /&gt;
Add the following attribute to your '''&amp;lt;cfapplication&amp;gt;''' tag: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scriptProtect = &amp;quot;none&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===If Using Application.cfc===&lt;br /&gt;
Place the following code within the '''&amp;lt;cfcomponent&amp;gt;''' section of your Application.cfc&lt;br /&gt;
====If using tag-based Application.cfc====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.scriptProtect = &amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====If using &amp;lt;cfscript&amp;gt; Application.cfc====&lt;br /&gt;
&amp;lt;pre&amp;gt;this.scriptProtect = &amp;quot;false&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Settings you should enable within your local ColdFusion Administrator==&lt;br /&gt;
When developing on a local ColdFusion server, most developers accept the default Coldfusion Administrator settings that are set by the ColdFusion installer. This is fine for development servers, but it can cause some problems when moving a ColdFusion application into production in a shared hosting enviroment. To ensure your code runs well when you move it to our servers, we recommend you make the following adjustments within your local ColdFusion Administrator:&lt;br /&gt;
&lt;br /&gt;
First, on the Settings page make sure you enable the setting that says: &amp;quot;Disable access to internal ColdFusion Java components&amp;quot; (pictured below)&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Second, under the Security Tab click the Sandbox Security link then click the box to &amp;quot;Enable ColdFusion Security&amp;quot;. (pictured below)&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once Sandbox Security is enabled, you'll need to create a sandbox for your local site. To do this, add the full path to your site below where it says &amp;quot;Add Security Sandbox&amp;quot;, then click &amp;quot;Add&amp;quot;. For example if you are using the default site location for IIS, you would use 'C:\inetpub\wwwroot' as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings4.jpg]]&lt;br /&gt;
&lt;br /&gt;
The last thing to do is add the correct paths and permissions. By default, ColdFusion will add the path to your site, but you'll also want to make sure the following paths/permissions are added too (permissions are listed in parentheses next to path):&lt;br /&gt;
&lt;br /&gt;
    C:\ColdFusion10\cache\- (Read,Write,Delete)&lt;br /&gt;
    C:\WINDOWS\Fonts\- (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\wwwroot\WEB-INF\cfclasses\- (Read,Write)&lt;br /&gt;
    C:\ColdFusion10\cfusion\wwwroot\WEB-INF\cftags\interface.cfc (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache\- (Read,Write,Delete)&lt;br /&gt;
    C:\ColdFusion10\cfusion\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\- (Read,Write,Delete)&lt;br /&gt;
    C:\ColdFusion10\cfusion\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache\CFFileServlet\_cf_image\- (Read,Write,Delete)&lt;br /&gt;
    C:\Users\USERNAME\AppData\Local\Temp\- (Read,Write,Delete)*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note, this assumes you're using a recent version of Windows (Vista or newer), and that ColdFusion is installed to 'C:\ColdFusion10'. If on an earlier version of Windows, the only thing you'll do differently is replace 'C:\Users\USERNAME\AppData\Local\Temp\-'* above with this path: 'C:\DOCUME~1\USERNAME\LOCALS~1\Temp\-'*&lt;br /&gt;
&lt;br /&gt;
*Replace USERNAME with the actual name of your ColdFusion runtime user.&lt;br /&gt;
&lt;br /&gt;
==How do I disable / enable Sandbox Security on my ColdFusion VPS?==&lt;br /&gt;
Sandbox Security is great for development or multi-site servers, but it causes ColdFusion requests to run a bit slower than they normally would. If you’re not actively using this security feature, you can disable it within the '''Security &amp;gt; Sandbox Security''' page within your server’s ''ColdFusion Administrator''.&lt;br /&gt;
&lt;br /&gt;
''Important'': You must restart ColdFusion after disabling or enabling Sandbox Security for it to take effect. &lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings2.jpg]]&lt;br /&gt;
&lt;br /&gt;
''Reference: [https://wikidocs.adobe.com/wiki/display/coldfusionen/Administering+ColdFusion+Security#AdministeringColdFusionSecurity-Usingsandboxsecurity Adobe - Using Sandbox Security]''&lt;br /&gt;
==Using ColdFusion Builder to Syncronize Files via FTP==&lt;br /&gt;
===Creating the FTP connection===&lt;br /&gt;
Open ColdFusion Builder&lt;br /&gt;
#From the left lower panel right-click on the world icon labeled '''FTP'''&lt;br /&gt;
#Select '''Add New FTP Site'''&lt;br /&gt;
#Enter the ''Server'', ''Username'', and ''Password'', click '''Test''' to confirm settings are correct&lt;br /&gt;
#Enter the ''Remote Path'', this can either be the root '''/''' or the webroot (either '''/wwwroot''' for Windows servers or '''/public_html''' for Linux servers)&lt;br /&gt;
#Click '''OK'''&lt;br /&gt;
&lt;br /&gt;
===To configure a project to Synchronize===&lt;br /&gt;
#Right click on any project you wish to synchronize with over FTP. Hover over ''Synchronize'' and select '''Create New Synchronize Connection'''&lt;br /&gt;
#Make sure the path for the local project files is correct. For '''Remote''' select the newly created FTP Connection.&lt;br /&gt;
#Click ''OK''&lt;br /&gt;
&lt;br /&gt;
===To Synchronize Files: Remote-to-Local or Local-to-Remote===&lt;br /&gt;
#Right click on any project you wish to synchronize with over FTP. &lt;br /&gt;
#Hover over Synchronize and select '''Synchronize''' and follow the prompts to confirm which files should be synchronized.&lt;br /&gt;
&lt;br /&gt;
===Notes About Using Advanced ColdFusion Builder Development Features===&lt;br /&gt;
In order to use advanced development features within ColdFusion Builder, it should be used with a ColdFusion server that has RDS (''Remote Development Services'') enabled. Our shared servers do not have this feature enabled because it poses a security risk within production servers. As such, it is recommended to either [https://wikidocs.adobe.com/wiki/display/coldfusionen/Installing+the+Server+Configuration install a local copy of ColdFusion] or use one of our [http://hostek.com/hosting/coldfusion/vps/coldfusion-vps-hosting.htm ColdFusion VPS plans] for your development. If you install a local development ColdFusion installation, be sure to enable RDS during the install process. If you're using a ColdFusion VPS, you can enable RDS within the '''Security &amp;gt; RDS''' section of your ColdFusion Administrator.&lt;br /&gt;
&lt;br /&gt;
Once you have RDP enabled on a local development installation of ColdFusion or your own VPS, you can enable RDS support within ColdFusion Builder as shown here: [https://wikidocs.adobe.com/wiki/display/coldfusionen/Eclipse+RDS+Support ColdFusion Builder RDS Support]&lt;br /&gt;
&lt;br /&gt;
''Note:'' If you wish to have your local development ColdFusion server match our shared server settings, read the above entry for [[ColdFusion_FAQs#Settings you should enable within your local ColdFusion Administrator|Settings you should enable within your local ColdFusion Administrator]].&lt;br /&gt;
[[Category:ColdFusion]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2605</id>
		<title>ColdFusion Tips &amp; Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2605"/>
				<updated>2015-07-16T04:03:12Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Converting Application.cfm to Application.cfc==&lt;br /&gt;
Using an '''Application.cfc''' configuration file offers some advantages over the older style '''Application.cfm''' configuration files. Some of the main features that an Application.cfc file give you are &amp;quot;functions triggered by Application, Session, Request, and Error events&amp;quot; and &amp;quot;Application-Level Mappings and Custom Tag Paths&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are only a few steps required to convert an application to use an Application.cfc file:&lt;br /&gt;
&lt;br /&gt;
NOTE: You should ensure that you have a backup of any files before making changes to them.&lt;br /&gt;
&lt;br /&gt;
===Create an '''Application.cfc''' file===&lt;br /&gt;
&lt;br /&gt;
Below is an example '''Application.cfc''' file with the minimum requirements:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Setup '''onRequest''' function in '''Application.cfc''' to include the '''Application.cfm''' file&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if an Application.cfm file already exists in the root of the application. Below is what the Application.cfc file will look like after this addition:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Copy application settings from the '''cfapplication''' tag and remove the '''cfapplication''' tag===&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if a cfapplication tag is used within the application. Each attribute of the cfapplication tag will need to be copied into the cfscript section at the top of the Application.cfc with the pattern [this.attributeName = &amp;quot;value&amp;quot;;].&lt;br /&gt;
&lt;br /&gt;
For example. The below cfapplication tag would be converted into our Application.cfc example as follows:&lt;br /&gt;
&lt;br /&gt;
'''cfapplication''' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication&lt;br /&gt;
	name = &amp;quot;my_app_name&amp;quot;&lt;br /&gt;
	sessionManagement = &amp;quot;Yes&amp;quot;&lt;br /&gt;
	sessionTimeout = &amp;quot;#createTimeSpan(0,0,20,0)#&amp;quot;&lt;br /&gt;
	setClientCookies = &amp;quot;Yes&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Application.cfc''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = &amp;quot;my_app_name&amp;quot;; // app name from old cfapplication tag&lt;br /&gt;
		this.sessionManagement = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
		this.sessionTimeout = CreateTimeSpan(0,0,20,0);&lt;br /&gt;
		this.setClientCookies = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Do not forget to remove the '''cfapplication''' tag after copying the settings into the '''Application.cfc''' file.&lt;br /&gt;
&lt;br /&gt;
Now that the change is complete, this is a good time to test the application to ensure everything is working correctly with the new setup.&lt;br /&gt;
&lt;br /&gt;
==Per-Application ColdFusion Mappings==&lt;br /&gt;
In ColdFusion 8 and above, it is possible to create per-application mappings through your site's Application.cfc file. If you wish to convert to using an Application.cfc file, follow the steps [[ColdFusion_Tips_%26_Tricks#Converting_Application.cfm_to_Application|here]]. &lt;br /&gt;
&lt;br /&gt;
Once you have your Application.cfc created, you will insert the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.mappings[&amp;quot;/test&amp;quot;]=&amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On your site though, you would change &amp;quot;/test&amp;quot; to the name of your mapping. IMPORTANT: You need to include the forward slash before the name of your mapping. Also, change &amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot; to the full physical path to the folder you wish to map. &lt;br /&gt;
'''Note''': The physical path to your FTP root is listed in the &amp;quot;Site Settings&amp;quot; of your control panel at wcp.hostek.com.&lt;br /&gt;
&lt;br /&gt;
To call a template named &amp;quot;testing.cfm&amp;quot; in the &amp;quot;test&amp;quot; directory we just mapped, you would use this line: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;/test/testing.cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-Application Custom Tag Paths==&lt;br /&gt;
Starting in ColdFusion 8, ColdFusion allows creation of Custom Tag Paths in each site's Application.cfc file. This allows you to create and manage your Custom Tag Paths without having to use CF Administrator (ie. submit a support ticket). The following steps will help you create a Custom Tag Path:&lt;br /&gt;
&lt;br /&gt;
If you do not already have an Application.cfc file in your site's Web root, create one now.&lt;br /&gt;
Place the following code in the Application.cfc file and save:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=&amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you'd replace &amp;quot;yourdomain.com&amp;quot; with your domain name, and &amp;quot;customtagfolder&amp;quot; with the name of the folder you created for your custom tags. &lt;br /&gt;
&lt;br /&gt;
Now you have successfully added your custom tag path. If you have multiple tag paths to add, try using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=ListAppend(THIS.customtagpaths, &amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Per-application Robust Exception Information Settings==&lt;br /&gt;
To enable Robust Exception Information on a ColdFusion application, you will need to add the following to the top of the site's ''Application.cfc'' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = true /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Alternatively, if you wish to ensure Robust Exception Information is ''always'' disabled for an application, add this to the site's ''Application.cfc'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = false /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-application JSON Prefix==&lt;br /&gt;
To enable the JSON Prefix for your application add the following to the site's '''Application.cfc''' file, and adjust the '''secureJSONPrefix''' as desired:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = true&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSONPrefix = &amp;quot;//&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can disable this feature using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = false&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Restart a ColdFusion Application==&lt;br /&gt;
If you ever need to restart your site's ColdFusion application (to pick up a setting change, etc), you can do so via the ApplicationStop() function in ColdFusion 9+. &lt;br /&gt;
&lt;br /&gt;
To use this you can create a file (ex: restart.cfm) containing the following code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset ApplicationStop() /&amp;gt;&lt;br /&gt;
&amp;lt;cflocation url=&amp;quot;index.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When you run the file containing that code your ColdFusion Application will be stopped (flushing your application scope), and when the browser is redirected to the index page the application will start again.&lt;br /&gt;
==CFHTTP Connection Failures over HTTPS==&lt;br /&gt;
===Fixing cfhttp Failures on Shared Hosting===&lt;br /&gt;
If you try to use &amp;lt;cfhttp&amp;gt; to connect to a secure site (over HTTPS), you may receive the following error: &amp;quot;Connection Failure: Status code unavailable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this add the following code to your site's &amp;quot;Application.cfm&amp;quot; file (below the 'cfapplication' tag):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- fix for HTTPS connection failures ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif NOT isDefined(&amp;quot;Application.sslfix&amp;quot;)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity = createObject(&amp;quot;java&amp;quot;, &amp;quot;java.security.Security&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity.removeProvider(&amp;quot;JsafeJCE&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset Application.sslfix = true /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If your site uses an &amp;quot;Application.cfc&amp;quot; file instead, then just place that code in the &amp;quot;'onApplicationStart()&amp;quot; method of that file. After making that adjustment you'll need to restart your ColdFusion application as [[ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application|shown here]]. If you still run into issues though, you will need to [https://support.hostek.com/ submit a support ticket] asking our team to install the remote site's SSL certificate into ColdFusion's Java Certificate Store.&lt;br /&gt;
&lt;br /&gt;
===Fixing cfhttp Failures on VPS Hosting===&lt;br /&gt;
If you are having issues connecting to a site or file from with ColdFusion over HTTPS, you can import the remote site's SSL certificate into the the Java SSL Certificate Store used by ColdFusion.&lt;br /&gt;
====Fixing cfhttp Connection Failures with Keytool====&lt;br /&gt;
'''1) Set Java environment'''&amp;lt;br&amp;gt;&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable in the next command. For '''example''', you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
In that case, you would use '''C:\ColdFusion10\jre''' as the value of JAVA_HOME as shown below. Open a command prompt and issue the following commands:&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set JAVA_HOME=C:\ColdFusion10\jre&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set PATH=%PATH%;%JAVA_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, use the following commands (case-sensitive) in your terminal:&lt;br /&gt;
This '''example''' assumes that the JRE is located at ''/opt/coldfusion10/jre''&lt;br /&gt;
    export JAVA_HOME=/opt/coldfusion10/jre&lt;br /&gt;
    export PATH=$PATH:/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
'''2) List the Keystore Contents'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Java installation is at ''C:\ColdFusion10\jre'', then navigate to '''C:\ColdFusion10\jre\bin''':&lt;br /&gt;
    cd C:\ColdFusion10\jre\bin&lt;br /&gt;
If you're using a '''Linux/cPanel''' server, use this command instead:&lt;br /&gt;
    cd /opt/coldfusion10/jre/bin&lt;br /&gt;
&lt;br /&gt;
Now you can list the keystore contents ''(Windows &amp;amp; Linux)'':&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 76 entries&lt;br /&gt;
&lt;br /&gt;
'''3) Import certificate in to keystore and list to check added '''&amp;lt;br&amp;gt;&lt;br /&gt;
''(assumes you've downloaded the certificate to '''c:\temp\inet.cer''' (Windows) or '''/temp/inet.cer''' (Linux/cPanel)''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file c:\temp\inet.cer&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file /temp/inet.cer&lt;br /&gt;
    Trust this certificate? [no]: y&lt;br /&gt;
    Certificate was added to keystore&lt;br /&gt;
&lt;br /&gt;
Now verify the keystore contains your new certificate&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 77 entries&lt;br /&gt;
&lt;br /&gt;
'''4) Restart the ColdFusion application service so the keystore is re-read.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''5) Run your cfhttp request - HTTPS works now!'''&lt;br /&gt;
&lt;br /&gt;
====Fixing cfhttp Connection Failures with Portecle====&lt;br /&gt;
If you'd rather import certificates into the Java SSL Keystore through a GUI, follow these directions to use a tool named Portecle to do so:&lt;br /&gt;
&lt;br /&gt;
#Ensure your JAVA_HOME variable is set correctly as described above.&lt;br /&gt;
#Download Portecle from Sourceforge: [http://sourceforge.net/projects/portecle/ Portecle Project Homepage]&lt;br /&gt;
#Extract the files&lt;br /&gt;
#Open a Command Prompt and navigate to the extracted directory&lt;br /&gt;
#Issue this command to launch Portecle: &amp;lt;pre&amp;gt;java -jar portecle.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#In Notepad, open your jvm.config file to find the JVM PATH for ColdFusion's JVM; look for '''java.home={path here}'''&lt;br /&gt;
#In Portecle click ''File'', ''Open Keystore File''&lt;br /&gt;
#Browse to {JVM PATH}\jre\lib\security to the path, and open the cacerts file; Enter Password: '''changeit'''&lt;br /&gt;
#Click on '''Tools''', '''Import Trusted Certificate''', select the certificate you wish to import.&lt;br /&gt;
#*To obtain the certificate, you can navigate in a browser to the site where the certificate resides, then download the certificate to a .CER file, in the '''DER''' format (or the '''X.509''' format) through the browser.&lt;br /&gt;
#*#In IE on the server where you will import the certificate into ColdFusion, browse to the site where you will import the cert from.&lt;br /&gt;
#*#Click on the lock, then view the certificate. &lt;br /&gt;
#*#Click the details, click &amp;quot;Copy to file&amp;quot; click through.&lt;br /&gt;
#*#Select DER format, then save to &amp;quot;D:\certs&amp;quot; or &amp;quot;C:\certs&amp;quot; (if the folder isn't there, simply create it). &lt;br /&gt;
#Click '''OK''' to import and '''YES''' to accept the certificate as ''trusted''.&lt;br /&gt;
#Click '''OK''' again, usually you won't need to change the Alias name; click '''OK''' to finish.&lt;br /&gt;
#Click '''File''', '''Save Keystore'''.&lt;br /&gt;
#Close Portecle.&lt;br /&gt;
*'''Important:''' A ColdFusion Restart is necessary for this to take effect.&lt;br /&gt;
&lt;br /&gt;
====Fixing CFHTTP Failures Related to Cached DNS Records====&lt;br /&gt;
This solution will prevent Java from caching DNS records for the life of the ColdFusion process. Instead, Java will refresh its records periodically.&lt;br /&gt;
&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable to find the location of the Java installation used by ColdFusion. &lt;br /&gt;
&lt;br /&gt;
For '''example''', on '''Windows''' you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
On '''Linux''' you may see this:&lt;br /&gt;
    java.home=/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
Navigate to the '''security''' folder within the Java installation used by ColdFusion. For '''example''':&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows''' ''(open in Windows Explorer)''&lt;br /&gt;
    C:\ColdFusion10\jre\lib\security\&lt;br /&gt;
'''Linux\cPanel'''&lt;br /&gt;
    cd /opt/coldfusion10/jre/lib/security/&lt;br /&gt;
&lt;br /&gt;
Back-up, then edit the '''java.security''' file within that folder and change the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
'''From'''&lt;br /&gt;
    #networkaddress.cache.ttl=-1&lt;br /&gt;
'''To'''&lt;br /&gt;
    networkaddress.cache.ttl=600&lt;br /&gt;
&lt;br /&gt;
''Note:'' The above value refreshes DNS records every 600 seconds ''(10 minutes)''. You may adjust it to whatever you feel is appropriate for your server.&lt;br /&gt;
&lt;br /&gt;
Now '''Save''' the file then '''Restart ColdFusion''', and the new DNS caching setting will take effect.&lt;br /&gt;
&lt;br /&gt;
==CFMAIL Multi-Part Emails==&lt;br /&gt;
Sending emails with both Text and HTML parts helps reduce the chance of your messages getting caught by a mail server's spam filter. It also helps ensure your recipients can read the message regardless of the mail client being used. The easiest way to do this is to store your message in a variable using &amp;lt;cfsavecontent&amp;gt; then adding it to &amp;lt;cfmail&amp;gt; using &amp;lt;cfmailpart&amp;gt; as shown in the example below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Store your message in a variable ---&amp;gt;&lt;br /&gt;
&amp;lt;cfsavecontent variable=&amp;quot;myemailcontent&amp;quot;&amp;gt;&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
This is some plain text. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;And this is some more text in HTML. It will appear in plain-text for anyone who views the Text part of this email, though.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/cfsavecontent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- Function to strip HTML from message while preserving line breaks ---&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name= &amp;quot;textMessage&amp;quot; access= &amp;quot;public&amp;quot; returntype= &amp;quot;string&amp;quot; hint= &amp;quot;Converts an html email message into a nicely formatted with line breaks plain text message&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfargument name= &amp;quot;string&amp;quot; required= &amp;quot;true&amp;quot; type= &amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfscript&amp;gt;&lt;br /&gt;
      var pattern = &amp;quot; &amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
      var CRLF = chr( 13) &amp;amp; chr( 10);&lt;br /&gt;
      var message = ReplaceNoCase(arguments.string, pattern, CRLF , &amp;quot;ALL&amp;quot;);&lt;br /&gt;
      pattern = &amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;;&lt;br /&gt;
    &amp;lt;/cfscript&amp;gt;&lt;br /&gt;
    &amp;lt;cfreturn REReplaceNoCase(message, pattern, &amp;quot;&amp;quot; , &amp;quot;ALL&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!--- Now send the email. When adding the Text part, we'll use the textMessage() function we just created to strip out HTML tags. ---&amp;gt;&lt;br /&gt;
&amp;lt;cfmail from=&amp;quot;sender@domain.com&amp;quot; to=&amp;quot;recipient@anotherdomain.com&amp;quot; subject=&amp;quot;Multi-part Email with CFMAIL&amp;quot; type=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/plain&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#textmessage(myemailcontent)#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/html&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#myemailcontent#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: [http://cookbooks.adobe.com/post_CFMAIL_the_right_way-17875.html CFMAIL the right way]&lt;br /&gt;
&lt;br /&gt;
==Scheduling Tasks in ColdFusion==&lt;br /&gt;
On occasion shared ColdFusion hosting customers need to setup Scheduled Task to run files on a cycle. &lt;br /&gt;
&lt;br /&gt;
This can be done with the following steps, making use of ColdFusion's &amp;lt;cfschedule&amp;gt; tag:&lt;br /&gt;
&lt;br /&gt;
#Create a file locally using any text editor, save the file with the .CFM extension (example: setschedule_example.cfm).&lt;br /&gt;
#Copy and past in the code example below taken from ''ColdFusion's Documentation'' and save.&lt;br /&gt;
#Replace the data in the example note the following recommendations.&amp;lt;br /&amp;gt;!- Name each file made for creating a schedule with the name of the task so you can reference the task later if needed. Specific naming will also make it more difficult for someone to randomly run the file.&amp;lt;br /&amp;gt;!- If you need to schedule a job to run monthly on any date in the range 28-31, read about how ColdFusion will handle the scheduling in the ColdFuison8 documentation referenced below.&lt;br /&gt;
#Working example, the code example below is a working tested solution for getting the weather for a specific zip code and the task to email the results.&lt;br /&gt;
&lt;br /&gt;
'''Scheduled Task'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- This sets the initial task, if your just wanting to set the schedule --&amp;gt;&lt;br /&gt;
&amp;lt;cfschedule action = &amp;quot;update&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot; &lt;br /&gt;
    operation = &amp;quot;HTTPRequest&amp;quot;&lt;br /&gt;
    url = &amp;quot;http://test.hostek.net/weather_send.cfm&amp;quot;&lt;br /&gt;
    startDate = &amp;quot;7/6/09&amp;quot;&lt;br /&gt;
    startTime = &amp;quot;09:30 AM&amp;quot;&lt;br /&gt;
    interval = &amp;quot;3600&amp;quot;&lt;br /&gt;
    resolveURL = &amp;quot;Yes&amp;quot;&lt;br /&gt;
    requestTimeOut = &amp;quot;600&amp;quot;&lt;br /&gt;
    mode = &amp;quot;application&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task created to be deleted, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;delete&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task to be paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;pause&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task resumed if paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;resume&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Weather Collector'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;CF External Weather Checker&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfset zip=&amp;quot;12345&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;cfinvoke webservice=&amp;quot;http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl&amp;quot; method=&amp;quot;getCityWeatherByZIP&amp;quot; returnvariable=&amp;quot;aWeatherReturn&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cfinvokeargument name=&amp;quot;ZIP&amp;quot; value=&amp;quot;#zip#&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aWeatherReturn.temperature EQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt; I cannot get the weather for #zip# external http connections must be DOWN.&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;cfset message=&amp;quot;The temperature for #zip# (Your city) is #aWeatherReturn.temperature# degrees.&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif message NEQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfmail from = &amp;quot;weather.server@test.com&amp;quot; to = &amp;quot;test@test.com&amp;quot; subject = &amp;quot;Weather checker&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#message#&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note''': We highly recommend setting the ''mode'' attribute of cfschedule to ''application''. This will ensure your site's application is the only one allowed to modify the task. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''More information on using CFSchedule'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/cfschedule Adobe ColdFusion Documentation - CFSchedule]&lt;br /&gt;
*[http://www.isummation.com/blog/configuring-coldfusion-scheduled-tasks-using-the-cfschedule-tag/ iSummation Blog - Configuring ColdFusion Scheduled Tasks using the CFSCHEDULE tag]&lt;br /&gt;
&lt;br /&gt;
==Session Management - Handling Bots and Spiders==&lt;br /&gt;
===Robots.txt File===&lt;br /&gt;
First and foremost we suggest creating a robots.txt file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time. Second to prevent specific bots from crawling the website. &lt;br /&gt;
&lt;br /&gt;
Please see our [[Robots|robots.txt article]] for more information on implementing a robots.txt on your site.&lt;br /&gt;
&lt;br /&gt;
===Lower Session Timeouts for Bots and Spiders===&lt;br /&gt;
Next we suggest setting your session timeout specifically lower for bots and spiders. These spiders and bots will crawl a page and when a session (ColdFusion) is created, it will persist during then entire page load. The page fully loaded allows the bot or spider to get the information from the Web page AND allows the session to expire quickly protecting ColdFusion from effects similar to a memory leak. &lt;br /&gt;
&lt;br /&gt;
To do this, implement the appropriate solution for your site below:&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfm'''====&lt;br /&gt;
Place this code at the top of your Application.cfm file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then use the '''REQUEST.sessionTimeout''' variable to specify the session timeout period in your '''cfapplication''' tag: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication name=&amp;quot;myawesomeapp&amp;quot;&lt;br /&gt;
     sessionmanagement=&amp;quot;Yes&amp;quot;&lt;br /&gt;
     sessiontimeout=&amp;quot;#REQUEST.sessionTimeout#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (tag-based)====&lt;br /&gt;
If you primarily use cfml tags in your Application.cfc, you can set the Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
 &amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (cfscript)====&lt;br /&gt;
If instead, you're using cfscipt in your Application.cfc, you'll set the custom Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
// This checks if a cookie is created, for bots this will return false and use the low session timeout&lt;br /&gt;
if (StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) || StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)){&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,30,0);&lt;br /&gt;
} else {&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,0,2);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.bennadel.com/blog/1083-ColdFusion-Session-Management-And-Spiders-Bots.htm Session Management code examples for the Application.cfm]&lt;br /&gt;
&lt;br /&gt;
==Creating Client Variables Tables for MySQL Databases==&lt;br /&gt;
If you need your datasource set up as a ColdFusion Client Variables Store, you can enable the '''Client Variables'' option in your ColdFusion datasource within the WCP control panel. &lt;br /&gt;
&lt;br /&gt;
Please note, if your datasource MySQL DSN, you'll need to create the necessary tables prior to using the Client Variable Store. To do this you would need to create two tables, one named &amp;quot;cdata&amp;quot; and one named &amp;quot;cglobal&amp;quot;. The SQL you'd use to create those tables is below:&lt;br /&gt;
&lt;br /&gt;
Table: '''cdata'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
 CREATE TABLE IF NOT EXISTS cdata (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          app varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          PRIMARY KEY (cfid,app)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Table: '''cglobal'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS cglobal (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          lvisit timestamp,&lt;br /&gt;
          KEY cfid (cfid),&lt;br /&gt;
          KEY lvisit (lvisit)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Output CF Error details without CFDump==&lt;br /&gt;
It is common in an error handler that you want to output all of the error details to the screen, a file, or an email. Therefore, the cfdump tag is commonly used for this; and, while this works well in development, it is not always the best practice on a production site because of the performance of the cfdump tag due to its use of reflection (Runtime type introspection).&lt;br /&gt;
&lt;br /&gt;
A better performing alternative is to output the information you want directly from the Error/Exception struct within a 'cfoutput' tag. This can be done by looking up the cferror structure or the cfcatch structure in the ColdFusion docs to see what is available and what values you might want to output:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Error''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cferror&amp;lt;br /&amp;gt;&lt;br /&gt;
'''CFCatch''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cfcatch&lt;br /&gt;
&lt;br /&gt;
===Cfdump Custom Tag Alternative===&lt;br /&gt;
You can also use the following link to download an example CF custom tag that will give a similar error output as when using the cfdump tag on an error variable:&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the custom tag's usage:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the error handler specified in your 'cferror' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cf_OutputError Error=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code would replace:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfdump var=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in a cfcatch block:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cftry&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;cfcatch&amp;gt;&lt;br /&gt;
   &amp;lt;cf_OutputCFCatch CFCatch=&amp;quot;#CFCatch#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/cfcatch&amp;gt;&lt;br /&gt;
&amp;lt;/cftry&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configure ColdFusion to Handle html and htm Files==&lt;br /&gt;
===Enable HTML/HTM as CFML on Shared Accounts===&lt;br /&gt;
On our ColdFusion servers, the best way to process HTML files (.html, .htm) as ColdFusion/CFML (.cfm files) is by using a set of rewrite rules that route the HTML files through a ColdFusion &amp;quot;controller&amp;quot; script. The main benefits of this approach are that it is easy to implement on a site-by-site basis, and it works with any version of ColdFusion. To implement this approach on your site, follow the steps below:&lt;br /&gt;
====Step 1: Add Rewrite Rules to Route HTML Files through the CFM Controller====&lt;br /&gt;
If you have a '.htaccess' file in your webroot, add the rules below to the top of that file. Otherwise, create a file named '.htaccess' in your site's web root and place these rules within it:&lt;br /&gt;
=====For Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.html htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====For Sites Using .HTM Files=====&lt;br /&gt;
'''NOTE:''' If your site uses ''.htm'' files instead of ''.html'' files, use this set of rules instead. The only difference is ''html'' is replaced with ''.htm''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.htm htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 2: Create the ColdFusion Controller Script (htmlcontrol.cfm)====&lt;br /&gt;
Now we just need to create a ColdFusion script that will process the HTML files. To do this, create a file named '''htmlcontrol.cfm''' within your site's web root. Place this CFML code within the file:&lt;br /&gt;
=====CFML for Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.html&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====CFML for Sites Using .HTM Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.htm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you save the controller script, your site will begin processing any ColdFusion/CFML code within your HTML files.&lt;br /&gt;
===Enable HTML/HTM as CFML on a VPS===&lt;br /&gt;
In case you need to process ColdFusion code in your .htm or .html files, here is what you will need to do to get this to work. This is based on using ColdFusion on one of our dedicated server hosting accounts on a Windows server.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This will affect every site on the server, so use cautiously.&lt;br /&gt;
&lt;br /&gt;
First, you will need to edit the web.xml file located generally at C:\ColdFusion10\cfusion\wwwroot\WEB-INF&lt;br /&gt;
&lt;br /&gt;
Open this file and look for '''coldfusion_mapping_1'''.&lt;br /&gt;
&lt;br /&gt;
Scroll down the file until you see the last number increment like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;servlet-mapping id=&amp;quot;macromedia_mapping_15&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then add the following right below the closing &amp;lt;/servlet-mapping&amp;gt; of the last number increment item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_16&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_17&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_18&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_19&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save this file and exit.&lt;br /&gt;
&lt;br /&gt;
Now in IIS, setup a mapping for the site:&lt;br /&gt;
#In IIS 7+ click the server name section (right below the '''Start Page''' in the left-hand navigation), then double-click the '''Handler Mappings''' icon.&lt;br /&gt;
#Select and &amp;quot;edit&amp;quot; the '''*.cfm''' record and copy the value of &amp;quot;executable&amp;quot;. Now hit Cancel and then click '''Add Script Map'''. &lt;br /&gt;
#Paste the executable value copied from the '''*.cfm''' record and type '''*.htm''' into the '''Request Path''' and hit OK. &lt;br /&gt;
#Repeat the above steps to add a handler for '''*.html''' &lt;br /&gt;
&lt;br /&gt;
Lastly, open the '''uriworkermap.properties''' file for your ColdFusion 10 IIS Connector in a text editor such as Notepad. On a standard ColdFusion installation this is located at: &amp;lt;pre&amp;gt;C:\ColdFusion10\config\wsconfig\1\uriworkermap.properties&amp;lt;/pre&amp;gt;&lt;br /&gt;
Copy the following lines, paste them at the bottom of the file, then save and close the file: &amp;lt;pre&amp;gt;/*.html = cfusion&lt;br /&gt;
/*.htm = cfusion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the ColdFusion service and IIS. ColdFusion should begin processing CFML within htm/html files now.&lt;br /&gt;
&lt;br /&gt;
==Increase the ColdFusion Post Parameters Limit==&lt;br /&gt;
===ColdFusion 10===&lt;br /&gt;
In ColdFusion 10, you can easily increase the value of ColdFusion's '''postParametersLimit''' via the ColdFusion Administrator. Once logged into the ColdFusion Administrator, click the '''Settings''' link then scroll to the bottom of the page. Set the value for the Post Parameters Limit to the desired limit and click the submit button. &lt;br /&gt;
===ColdFusion 9 and below===&lt;br /&gt;
To adjust the Post Parameters Limit setting in ColdFusion 9 and below, you will have to edit the server's '''neo-runtime.xml''' file which is located here on a standard installation: &amp;lt;pre&amp;gt;C:\ColdFusion9\lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open that file in a text editor such as Notepad, then search for the '''postSizeLimit''' tag. It will look similar to this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postSizeLimit'&amp;gt;&amp;lt;number&amp;gt;100.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediately after that set of tags, paste this chunk of text: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postParametersLimit'&amp;gt;&amp;lt;number&amp;gt;1000.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once you've adjusted the file, you'll just need to save your changes and restart ColdFusion for the new setting to go into effect. '''Note''': The value of '''1000''' is just an example, so you can increase it as needed. &lt;br /&gt;
&lt;br /&gt;
==Loading custom Java library or Java Libraries (jar or class files) in ColdFusion 10==&lt;br /&gt;
ColdFusion 10 makes it easy to load Java libraries into your ColdFusion application without having to restart ColdFusion. All that's required is your application define the 'THIS.javaSettings' attribute within the site's Application.cfc like below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.javaSettings = {LoadPaths = [&amp;quot;/javafiles/&amp;quot;], loadColdFusionClassPath = true, reloadOnChange=false}/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will check the ''javafiles'' directory in your Web root for 'jar' and 'class' files and make any libraries within the directory accessible from your ColdFusion application. If you modify the JAR files in your ''javafiles'' directory though, ColdFusion will need to be restarted to load the new versions of the JAR files. &lt;br /&gt;
&lt;br /&gt;
'''References''': &lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/Enhanced+Java+integration+in+ColdFusion+10 Adobe ColdFusion Documentation - Enhanced Java Integration in ColdFusion]&lt;br /&gt;
*[http://www.raymondcamden.com/2014/6/16/Issue-with-ColdFusion-JavaSettings-and-ReloadOnChange Ray Camden's Blog - Issue with ColdFusion JavaSettings and ReloadOnChange]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Permission denied for creating Java object: coldfusion.server.ServiceFactory''==&lt;br /&gt;
===When using Mura or using Transfer ORM===&lt;br /&gt;
====Issue====&lt;br /&gt;
If you are using '''Mura''' or using '''Transfer ORM''' and you get this error, ''Permission denied for creating Java object: coldfusion.server.ServiceFactory'', you are likely using an outdated version of Mura and also are probably on a ColdFusion 9 server. The Transfer ORM component causing this issue has not been updated to work with ColdFusion 9. There is a quick fix though:&lt;br /&gt;
====Solution====&lt;br /&gt;
Find the file named CFMLVersion.cfc which should be at '''/wwwroot/requirements/transfer/com/factory'''.&lt;br /&gt;
&lt;br /&gt;
Edit that file and find the line that has:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And change that to:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;) OR server.coldfusion.productversion.startsWith(&amp;quot;9&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save the file and it should now work.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Since this is likely running an outdated version of Mura, we highly recommend updating Mura to the latest version to take advantage of numerous performance and security enhancements.&lt;br /&gt;
===When using DataMgr===&lt;br /&gt;
If you get this error while using DataMgr.cfc, the changes described below will solve this problem:&lt;br /&gt;
&lt;br /&gt;
Here is the section of code from the original DataMgr.cfc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection = getConnection()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset db = connection.getMetaData().getDatabaseProductName()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection.close()&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = db2&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is what the modified code should look like (this sample assume MySQL)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of changes''':&lt;br /&gt;
&lt;br /&gt;
These 3 lines were commented out:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line needed quotes around db2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And lastly, this line needed added:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you are using an ''MS Access'' database instead of ''MySQL'', replace '''MYSQL''' with '''msaccessjet''' on the line that is added.&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Security: The requested template has been denied access to {file/directory}''==&lt;br /&gt;
===Issue===&lt;br /&gt;
Our shared servers have ColdFusion Sandbox Security enabled, which requires absolute filesystem paths to be provided to tags and functions that interact with the filesystem. If you receive an error that starts with ''Security: The requested template has been denied access to ...'', then it is followed by a relative path, you'll need to replace the relative path with a full path.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
One way to do this is to hard-code the path (''d:\home\sitename.com\wwwroot\filename.jpg''), but that can cause portability problems if your site is ever moved to a different environment. &lt;br /&gt;
&lt;br /&gt;
A better way to do this would be to &amp;quot;wrap&amp;quot; your relative path with the '''ExpandPath()''' function. The ''ExpandPath()'' function will automatically detect the absolute filesystem path to the file, and ColdFusion will no longer give you a permissions error. &lt;br /&gt;
&lt;br /&gt;
'''More info''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/ExpandPath Adobe Documentation - ExpandPath]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion COM Object Error ''java.lang.RuntimeException: Can not use native code: Initialisation failed''==&lt;br /&gt;
The error ''java.lang.RuntimeException: Can not use native code: Initialisation failed'' is related to calling a 32-bit COM object from within a 64-bit ColdFusion installation. &lt;br /&gt;
&lt;br /&gt;
The simplest way to bypass this error is to write a small ASP Webservice to proxy the call to the COM object as shown in '''Option 2''' of this blog post: [http://coldfusion9.blogspot.com/2010/05/32-bit-components-on-64-bit-coldfusion.html 32-bit Components on 64-bit ColdFusion]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can [https://support.hostek.com/ ask Support] to move your site to a 32-bit ColdFusion server.&lt;br /&gt;
&lt;br /&gt;
==Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated Server==&lt;br /&gt;
To use Seefusion, visit the address mentioned in your server's Welcome email.&lt;br /&gt;
&lt;br /&gt;
Once loaded, you'll see a summary of memory consumption, average response time, number of requests processed by ColdFusion per second, and a view of currently running ColdFusion requests. &lt;br /&gt;
===Finding Scripts to Optimize===&lt;br /&gt;
When using Seefusion it is helpful to look at the '''Slow''' section of the request monitor. This will show you recent requests that took longer than 8 seconds to complete, giving you a good idea of what scripts need optimization. &lt;br /&gt;
===Stack Tracing with Seefusion===&lt;br /&gt;
Additionally, when a request is running in the '''Active''' section of Seefusion's request monitor, you can click the paper stack icon to the left of the request to view a stack trace of the request. A stack trace tells you what line of code is currently being processed by the request. &lt;br /&gt;
&lt;br /&gt;
Once the stack trace loads, start at the top and work your way down until you find a recognizable path to a ColdFusion template (''eg. c:\home\mysite.com\wwwroot\index.cfm: 47''). This tells you the template currently being executed followed by the line number being processed at that moment in time. If a request consistently shows the same line of code in subsequent stack traces, then you've found the main area to focus on optimizing.&lt;br /&gt;
&lt;br /&gt;
To make deciphering stack traces easier, you can also click the '''Seestack''' button at the top of the stack trace window. This will send the stack trace to a service that will analyze the trace and attempt to tell you where you need to focus.&lt;br /&gt;
&lt;br /&gt;
===Viewing Metrics over Time===&lt;br /&gt;
If you want to watch how response times and memory utilization in a more granular manner than the dashboard graphs show, you'll want to click the '''Counters''' button at the top of SeeFusion. Once on the Counters page you can select a time interval, then have Seefusion display performance metrics at the interval you selected. This is helpful to ensure requests are completing quickly and not exhausting ColdFusion's memory.&lt;br /&gt;
&lt;br /&gt;
==How to Wrap Your ColdFusion DSN with Seefusion==&lt;br /&gt;
If you wish to have Seefusion monitor your server's query activity, you'll need to &amp;quot;wrap&amp;quot; your DSN with SeeFusion's JDBC driver so Seefusion can monitor the DSN's activity. &lt;br /&gt;
===Install SeeDSN===&lt;br /&gt;
SeeDSN is a plugin for ColdFusion Administrator that makes it easy to wrap a DSN with Seefusion. Follow these directions to install SeeDSN:&lt;br /&gt;
#Download the SeeDSN archive [http://www.seefusion.com/seedsn_v1.1.zip here].&lt;br /&gt;
#Extract the '''seedsn''' folder within the archive to your '''/CFIDE/Administrator/''' folder. This means it will be located at ''/CFIDE/Administrator/seedsn'' once extracted. &lt;br /&gt;
#Move ''/CFIDE/Administrator/seedsn/custommenu.xml'' to ''/CFIDE/Administrator/custommenu.xml''&lt;br /&gt;
===Add Seefusion.jar to the ColdFusion Classpath===&lt;br /&gt;
In order for ColdFusion to use Seefusion's JDBC driver, you'll need to ensure '''seefusion.jar''' is on your ColdFusion class path. Follow these directions to add seefusion.jar to the Coldfusion class path:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Click the '''Java and JVM''' link on the left, under Server Settings.&lt;br /&gt;
#In the box labeled '''ColdFusion Class Path''' add the path to your '''seefusion.jar''' file and click ''Submit Changes''. For example, if it is located in ColdFusion's &amp;quot;WEB-INF\lib&amp;quot; folder, you can add this to the Class Path: '''{application.home}/wwwroot/WEB-INF/lib/seefusion.jar'''. &lt;br /&gt;
#*Each path in the ColdFusion Class Path is separated by a comma, so be sure to add a comma right before the path to seefusion.jar (do not add any spaces).&lt;br /&gt;
#Restart ColdFusion after modifying the class path&lt;br /&gt;
&lt;br /&gt;
===Wrap a DSN using SeeDSN===&lt;br /&gt;
Once you've installed SeeDSN and restarted ColdFusion, you can wrap a DSN with the SeeFusion JDBC driver. Follow these instructions to do so: &lt;br /&gt;
#Log into ColdFusion Administrator&lt;br /&gt;
#Expand the ''SeeFusion'' navigation menu on the left and click '''Datasource Wrapper'''&lt;br /&gt;
#On the ''Datasource Wrapper'' page, you'll see a list of DSNs on your server. To wrap a DSN, click the ''Start'' [[File:Start.png]] icon next to your DSN. SeeDSN will automatically wrap your DSN with the SeeFusion driver and display '''OK''' if it is successful.&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/ WebApper Blog - Using SeeDSN JDBC Wrapping Tool]&lt;br /&gt;
&lt;br /&gt;
==Using fckEditor on ColdFusion 10 or Higher==&lt;br /&gt;
When getting the following error for fckEditor:&lt;br /&gt;
 '''&amp;quot;The server didn't reply with a proper XML data. Please check your configuration.&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
If you are on a ColdFusion 10+ server this will be cause by the '''FileUpload()''' function that is being used.&lt;br /&gt;
In ColdFusion 10+ ''FileUpload'' is a built-in function name, so you'll need to rename the ''FileUpload'' function used in fckeditor.&lt;br /&gt;
You can update the text for fckeditor by changing all instances of &amp;quot;FileUpload&amp;quot; to &amp;quot;fckFileUpload&amp;quot; to remove this conflict.&lt;br /&gt;
&lt;br /&gt;
==Optimze CFIMAGE Rendering in Three Steps==&lt;br /&gt;
===USE===&lt;br /&gt;
When full size images are required, re-sized images need to be used for displaying smaller images or thumbnails and the application needs to perform at optimal speed for displaying images in a browser. &lt;br /&gt;
&lt;br /&gt;
===KEY POINTS===&lt;br /&gt;
Except for during development cfimage '''action=&amp;quot;writeToBrowser&amp;quot;''' should not be used to display images.&lt;br /&gt;
Use CFIMAGE to resize images ''ONCE'', if possible during upload but if page timeouts make this impossible break up the task by using a CFC to check and re-size images as needed.&lt;br /&gt;
&lt;br /&gt;
===SUMMARY===&lt;br /&gt;
Those sites that display many images often times also upload many photos via form or via FTP and need to display both the FULL size images and smaller images for thumb nails or ''(small, med, large)'' optional sizes. The process of uploading images using CFFile can impose time constraints specifically for large files, or if the coldfusion page timeouts are set lower than is possible for large file upload and re-size jobs. To overcome this issue we can write a simple CFC for resizing the images after the upload is complete and the page is run for the first time. This will be ideal for either form based upload or FTP upload making this solution very versatile. &lt;br /&gt;
&lt;br /&gt;
====Step 1 - Create the CFC for re-sizing and writing images to disk====&lt;br /&gt;
&lt;br /&gt;
Create file &amp;quot;GetResizedImage.cfc&amp;quot; in the directory with the CFM files that display images.&lt;br /&gt;
Use the code below for the contents of this file and modify as needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;GetImage&amp;quot; hint=&amp;quot;Re-sizes images for display in album&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the image path where photos exist ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset imgpath = &amp;quot;imgdir/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the domain path, allows reuse resized images on other sites ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset domain = &amp;quot;domain.com&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Re-writes image extension if for alternates of JPG, and adds _resized to differentiate from fullsize images ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset rfile= &amp;quot;#REReplace(&amp;quot;#img#&amp;quot;,&amp;quot;.(jpg|JPG|JPEG|jpeg)&amp;quot;,&amp;quot;_resized.jpg&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Checks if file is already resized ---&amp;gt;&lt;br /&gt;
        &amp;lt;cfif FileExists(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp;&amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#rfile#&amp;quot;)&amp;gt;&lt;br /&gt;
           &amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;!--- Resizes image if it has not been done already ---&amp;gt;&lt;br /&gt;
            &amp;lt;cfset myImage=ImageNew(URLDecode(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp; &amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#img#&amp;quot;))&amp;gt;&lt;br /&gt;
                    &amp;lt;cfset ImageResize(myImage,&amp;quot;175&amp;quot;,&amp;quot;175&amp;quot;,&amp;quot;bilinear&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;!--- Saves image, and to eliminate problems with url friendly encoding when getting our images re-replace %20 with no-space ---&amp;gt;&lt;br /&gt;
                    &amp;lt;cfimage source=&amp;quot;#myImage#&amp;quot; action=&amp;quot;write&amp;quot; overwrite=true destination=&amp;quot;d:\home\#domain#\wwwroot\#imgpath##REReplace(&amp;quot;#rfile#&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot; &amp;quot;,&amp;quot;ALL&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the new path for the image for browser output ---&amp;gt;&lt;br /&gt;
			&amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;!--- Return the image variable ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfreturn myImage&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2 - Invoke the CFC====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Generate image name from query ---&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput query=&amp;quot;MyEvent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Invoke CFC to check if resized image exists, if not resize and output URL for resized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvoke component=&amp;quot;GetResizedImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare what part of the CFC handles checking / getting the image ---&amp;gt;&lt;br /&gt;
	method=&amp;quot;GetImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare variable that will pass back the new image name ---&amp;gt;&lt;br /&gt;
	returnvariable=&amp;quot;myImage&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvokeargument name=&amp;quot;img&amp;quot; value=&amp;quot;#event.Pic#&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&amp;lt;!--- Display re-sized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;img src=&amp;quot;#myImage#&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;     &lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 3 - Test====&lt;br /&gt;
The proposed solution cut page load times from 20+ seconds to below one second after the first page load. During the FIRST or FIRST FEW times the page loads all the re-sizing will be done.&lt;br /&gt;
&lt;br /&gt;
===Q and A===&lt;br /&gt;
'''Question''': Checking if a file exists each time the page loads is excessive.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Answer''': We agree but it's much better than resizing every image each time the page loads.&lt;br /&gt;
&lt;br /&gt;
==How to create Services for Additional ColdFusion Instances==&lt;br /&gt;
If you've created additional ColdFusion instances on your VPS/Dedicated Server, and ColdFusion was unable to create the Services for those instances just do the following:&lt;br /&gt;
&lt;br /&gt;
#Open a Command Prompt as Administrator&lt;br /&gt;
#Run this command, replacing INSTANCE with the actual name of your new ColdFusion instance: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;sc create &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; binPath= &amp;quot;C:\ColdFusion10\INSTANCE\bin\coldfusionsvc.exe&amp;quot; displayname= &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; start= auto&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start your instance through the Windows Services Manager. If you need to know how to create additional ColdFusion instances, please see this guide from Adobe: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSAB4367BA-6D91-4c69-8DBA-E2839394658A.html Defining Additional ColdFusion Instances]&lt;br /&gt;
&lt;br /&gt;
Once you've created the instances, you can attach them to your Web server as described here: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363a5d-7ffc.html Web Server Configuration]&lt;br /&gt;
&lt;br /&gt;
If you're using IIS, this video has a great walkthrough for using the ColdFusion Web Server Connector tool: [http://blogs.coldfusion.com/post.cfm/video-learn-about-iis-connectors-in-coldfusion10 Learn About ColdFusion IIS Connectors]&lt;br /&gt;
&lt;br /&gt;
==How to Fix Error: Value '0000-00-00' can not be represented as java.sql.Date==&lt;br /&gt;
If your application has null values in a MySQL datetime/date column you may encounter the error &amp;quot;Value '0000-00-00' can not be represented as java.sql.Date&amp;quot;. The easiest way to fix this is by adding the parameter '''zeroDateTimeBehavior=convertToNull''' to your site's DSN [http://helpx.adobe.com/coldfusion/kb/mysql-error-java-sql-sqlexception.html as recommended by Adobe].&lt;br /&gt;
===How to Fix Null DateTime Error - '''Shared Hosting'''===&lt;br /&gt;
#Log into your site's WCP control panel&lt;br /&gt;
#Click the ''DataSources (DSNs)'' button&lt;br /&gt;
#Click the ''Edit'' icon next to your DataSource (DSN)&lt;br /&gt;
#Add the following to the '''JDBC Query Parameters''' field: &amp;lt;pre&amp;gt;zeroDateTimeBehavior=convertToNull&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' To add multiple JDBC Query Parameters, separate each name/value pair by an ''''&amp;amp;''''. &lt;br /&gt;
''Example: zeroDateTimeBehavior=convertToNull&amp;amp;characterEncoding=UTF-8''&lt;br /&gt;
===How to Fix Null DateTime Error - '''VPS Hosting'''===&lt;br /&gt;
If your site uses WCP to manage its DSNs, you may utilize the Shared Hosting solution. Otherwise, follow the steps below:&lt;br /&gt;
#Log into ColdFusion Administrator on your VPS/Dedicated Server. &lt;br /&gt;
#Navigate to the &amp;quot;Data Sources&amp;quot; page and click your site's DSN name.&lt;br /&gt;
#On the page that opens add '''?zeroDateTimeBehavior=convertToNull''' to the end of the JDBC URL field.&lt;br /&gt;
#Click '''Submit''' and your site should no longer display the date representation error.&lt;br /&gt;
&lt;br /&gt;
==Find the Java Version Used by ColdFusion or Railo==&lt;br /&gt;
This CFML code will report the version of Java used by your ColdFusion or Railo server:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;#CreateObject(&amp;quot;java&amp;quot;, &amp;quot;java.lang.System&amp;quot;).getProperty(&amp;quot;java.version&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference:''' [http://www.petefreitag.com/item/743.cfm Pete Freitag's Blog - What Version of Java is ColdFusion Using?]&lt;br /&gt;
&lt;br /&gt;
==Reset ColdFusion Admin Password on CF 10+ VPS==&lt;br /&gt;
===Reset CF Admin Password - Windows VPS===&lt;br /&gt;
*On your VPS, open a command prompt window as Administrator&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.bat'' script: &amp;lt;pre&amp;gt;.\passwordreset.bat&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===Reset CF Admin Password - cPanel/Linux VPS===&lt;br /&gt;
*SSH into your VPS&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd /opt/ColdFusion10/cfusion/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.sh'' script: &amp;lt;pre&amp;gt;./passwordreset.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
==ColdFusion 11+ PDF Generation: How to Fix 'No Service Manager is Available' Error==&lt;br /&gt;
If you receive the error '''No Service Manager is Available''' when trying to generate PDFs or use the cfhtmltopdf tag on your ColdFusion 11+ VPS, do the following to fix it:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Expand ''Data &amp;amp; Services'', then click the '''PDF Service''' link&lt;br /&gt;
#On the next page, you should see an entry for ''localhost'' under the list of PDF Service Managers&lt;br /&gt;
#If the localhost service manager is not enabled, click the ''Enable'' button to the left of the manager name. (The button looks like a ''play'' button)&lt;br /&gt;
#Try using cfhtmlpdf now, and see if it works. &lt;br /&gt;
&lt;br /&gt;
If you still have any issues after enabling the service manager, try restarting the '''ColdFusion Addon Services''' Windows service and test again.&lt;br /&gt;
&lt;br /&gt;
==HTML5 Audio Player with ColdFusion==&lt;br /&gt;
This player uses an list named ''Tunes'' within the ''session'' scope to store a list of mp3 names. After populating the list, you can use this code as the foundation for an HTML audio player that plays each song in the list.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfif action is &amp;quot;play_next_tune&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfset myArray=ListtoArray(session.Tunes)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset T_max=Arraylen(myArray)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset session.track=session.track+1&amp;gt;&lt;br /&gt;
	&amp;lt;cfif session.track GT T_max&amp;gt;&lt;br /&gt;
		 &amp;lt;cfset session.track=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
		 &amp;lt;cflocation url=&amp;quot;tunespage.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
		&amp;lt;audio controls id=&amp;quot;myVideo&amp;quot; autoplay&amp;gt;&lt;br /&gt;
		&amp;lt;source src=&amp;quot;path/#myarray[session.track]#&amp;quot; type=&amp;quot;audio/mpeg&amp;quot;&amp;gt;&lt;br /&gt;
		Your browser does not support the audio element.&lt;br /&gt;
		&amp;lt;/audio&amp;gt;&lt;br /&gt;
	&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
		document.getElementById('myVideo').addEventListener(&amp;quot;ended&amp;quot;,function() {&lt;br /&gt;
		window.location.href=&amp;quot;tunespage.cfm?action=play_next_tune&amp;quot;;&lt;br /&gt;
		});&lt;br /&gt;
	&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cfchart error: Could not locate the style file ''style.xml''==&lt;br /&gt;
In ColdFusion 11 the ability to specify styles in an XML file was removed. As such, you will need to convert any XML stylesheets to json files. To do this, you'll need to do the following:&lt;br /&gt;
*Install a trial edition of ColdFusion 11 on your local computer&lt;br /&gt;
*Open a command prompt and run this command:&lt;br /&gt;
**&amp;lt;pre&amp;gt;C:\ColdFusion11\cfusion\bin\cfchart_xmltojson.bat C:\sites\mysite.com\cfchartstyle.xml&amp;lt;/pre&amp;gt;&lt;br /&gt;
**Be sure to replace the paths above with the actual path to &amp;quot;cfchart_xmltojson.bat&amp;quot; as well as the path to your XML stylesheet.&lt;br /&gt;
*When the conversion is done you will end up with a new file with the same name as the XML stylesheet, however there will not be a file extension. To simplify things, add a '''.json''' extension to the converted file. &lt;br /&gt;
*Update the path to the stylesheet in the ''cfchart'' tag to have a ''.json'' extension instead of ''.xml''.&lt;br /&gt;
*Update the path to the stylesheet to use relative paths instead of absolute paths from the webroot.&lt;br /&gt;
**Example: If the stylesheet file and the ''.cfm'' template with the ''cfchart'' code are in the webroot, change '''/cfchartstyle.json''' to '''../cfchartstyle.json'''&lt;br /&gt;
&lt;br /&gt;
More details on this are available in the [https://wikidocs.adobe.com/wiki/display/coldfusionen/cfchart Cfchart documentation]. Be sure to check the comments of the documentation for more helpful cfchart troubleshooting tips. &lt;br /&gt;
&lt;br /&gt;
==CGI.PATH_INFO is Empty After ColdFusion Upgrade==&lt;br /&gt;
If CGI.PATH_INFO is empty after you upgrade your server to ColdFusion 10 or higher, change the variable to CGI.SCRIPT_NAME. &lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Upgrading_ColdFusion&amp;diff=2603</id>
		<title>Upgrading ColdFusion</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Upgrading_ColdFusion&amp;diff=2603"/>
				<updated>2015-07-03T16:45:53Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Step 2 - Ensure Java Bin Folder is in System Path */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
==Upgrading ColdFusion 10+==&lt;br /&gt;
===Upgrading ColdFusion 10+ to the latest version===&lt;br /&gt;
In our experience it is most reliable to download the latest cumulative update through ColdFusion Administrator, then manually execute the update from the command line. Follow these steps to apply ColdFusion updates from the command line on your server:&lt;br /&gt;
====Step 1 - Install Java if not already installed====&lt;br /&gt;
Your VPS may be using the built-in Java JRE bundled with ColdFusion, but it is a good idea to use a separate version of Java for installing ColdFusion updates. You may download the latest version of Java from Oracle: [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]&lt;br /&gt;
&lt;br /&gt;
At the download page accept the license agreement, then download the appropriate version for your operating system. Most likely, you'll want the 64-bit version for your OS. During installation, it is a good idea to only install the development tools; the source code and public JRE are not needed.&amp;lt;br /&amp;gt;[[File:Jdk-options.png]]&lt;br /&gt;
====Step 2 - Ensure Java Bin Folder is in System Path====&lt;br /&gt;
#To check your path first open your system properties by right-clicking your VPS's '''Computer''' icon in '''Windows Explorer''', then clicking '''Propteries'''.&amp;lt;br /&amp;gt;[[File:Cf10updates-01.png]]&lt;br /&gt;
#In the window that opens, click the '''Advanced System Settings''' link off to the left.&amp;lt;br /&amp;gt;[[File:Cf10updates-02.png]]&lt;br /&gt;
#In the popup that appears, click the '''Environment Variables''' button toward the bottom right.&amp;lt;br /&amp;gt;[[File:Cf10updates-03.png]]&lt;br /&gt;
#In the next popup, select the '''Path''' variable under '''System Variables''', then click '''Edit'''.&amp;lt;br /&amp;gt;[[File:Cf10updates-04.png]]&lt;br /&gt;
#In the next popup, check the '''Variable value''' textbox to see if the path to a Java bin folder exists. If not, add a semicolon to the end of the line, followed by the path to your Java bin folder. For example, if you just installed Java as described above, you'd add a path like this: &amp;lt;pre&amp;gt;C:\Program Files\Java\jdk1.8.0_45\bin\&amp;lt;/pre&amp;gt;[[File:Winpath.png]]&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you've updated your system's PATH variable, you can click OK on all the popup windows to save your changes.&lt;br /&gt;
&lt;br /&gt;
====Step 3 - Download the ColdFusion Update====&lt;br /&gt;
#Log into ColdFusion Administrator for your server&lt;br /&gt;
#Navigate to the '''Server Update'''--&amp;gt;'''Updates''' section&lt;br /&gt;
##If you do not see an available update, click the '''Check for Updates''' button&lt;br /&gt;
##If you see an available update, click the '''Download''' button&amp;lt;br /&amp;gt;[[File:Cf10-update14.png]]&lt;br /&gt;
#ColdFusion will download the file to '''''&amp;lt;cf_home&amp;gt;''/hf-updates/''' (eg. C:\ColdFusion10\cfusion\hf-updates)&lt;br /&gt;
====Step 4 - Run the Update Installer====&lt;br /&gt;
#Stop ColdFusion. This will help ensure the update will install properly.&lt;br /&gt;
#Open a command prompt window on your server as ''Administrator''. You can do this by right-clicking on the ''CMD'' icon in the Start Menu, then choosing ''Run As Administrator''&lt;br /&gt;
#Navigate to the location where ColdFusion downloaded your update. &amp;lt;br /&amp;gt;''CF 10 Example:'' &amp;lt;pre&amp;gt;cd c:\ColdFusion10\cfusion\hf-updates&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;''CF 11 Example:'' &amp;lt;pre&amp;gt;cd c:\ColdFusion11\cfusion\hf-updates&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Launch your update via the following command: &amp;lt;pre&amp;gt;javaw -jar hotfix_0XX.jar&amp;lt;/pre&amp;gt; (replace '''0XX''' with the actual update number)&lt;br /&gt;
#Your CF update will be launched in a GUI. Just follow the prompts to install the update, and it will take care of the rest. If you are running a multi-instance ColdFusion server, ensure the boxes for all your instances are checked, and the updater will patch each instance automatically for you.&lt;br /&gt;
&lt;br /&gt;
Once the update has completed, just log into ColdFusion Administrator and go back to the Server Updates section. If it shows the update you applied in the '''Installed Updates''' tab, your ColdFusion installation has been updated successfully.&lt;br /&gt;
&lt;br /&gt;
===Post-Upgrade: Upgrade the IIS connector===&lt;br /&gt;
The ColdFusion to IIS connector must be upgraded after applying most ColdFusion 10+ updates. After applying the latest update for ColdFusion 10 or 11, perform the following steps:&lt;br /&gt;
#Open a command prompt as ''Administrator''&lt;br /&gt;
#Navigate to ''&amp;lt;cf_home&amp;gt;''\cfusion\runtime\bin:&amp;lt;br /&amp;gt;''CF 10 Example:''&amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\runtime\bin&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;''CF 11 Example:''&amp;lt;pre&amp;gt;cd C:\ColdFusion11\cfusion\runtime\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Open 'wsconfig.exe', issuing it the upgrade parameter: &amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;.\wsconfig.exe -ws iis -site 0 -upgrade -v&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tool will restart IIS, then you'll be able to continue using ColdFusion.&lt;br /&gt;
&lt;br /&gt;
===ColdFusion 10 Mandatory Update===&lt;br /&gt;
If you happen to have a server on Coldfusion 10 version 282462 or earlier, you will first need to apply the ColdFusion 10 Mandatory Update first. Follow these steps to complete the installation:&lt;br /&gt;
#[http://download.macromedia.com/pub/coldfusion/10/cf10_mdt_updt.jar Download the JAR file] for the update from Adobe. &lt;br /&gt;
#On your server, open a command prompt as '''Administrator''' then navigate to the folder containing the update's JAR file. &lt;br /&gt;
#Launch the JAR with this command: &amp;lt;pre&amp;gt;java -jar cf10_mdt_updt.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Follow the installer's instructions, and the update will complete in a couple minutes.&lt;br /&gt;
&lt;br /&gt;
Once the mandatory update has been installed, you'll be able to proceed through the update instructions above.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2601</id>
		<title>Lucee</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2601"/>
				<updated>2015-06-30T02:47:18Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: Added troubleshooting section and workaround for Web Admin login issue&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
[[File:Luceelogo.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://lucee.org/ Lucee] is an open-source CFML engine and the successor of Railo. We proudly support Lucee in our environment, and more info about its background and usage is below.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The Lucee project was forked from Railo 4.2 in January 2015 and is owned by Lucee Association Switzerland. Though development on Railo has halted, Lucee will eventually inherit the enhancements planned for Railo 5. Currently Lucee operates the same as the latest available version of Railo, so you can migrate your Railo codebase to it without any surprises. &lt;br /&gt;
&lt;br /&gt;
See these blogs for more info on the switch from Railo to Lucee:&lt;br /&gt;
*[http://blog.adamcameron.me/2015/01/lucee.html Lucee - Adam Cameron's Dev Blog]&lt;br /&gt;
*[http://www.codersrevolution.com/blog/railo-and-lucee-hunka-hunka-burning-questions Railo and Lucee ... - Coder's Revolution]&lt;br /&gt;
&lt;br /&gt;
==Usage / Resources==&lt;br /&gt;
For information about Lucee please reference [https://bitbucket.org/lucee/lucee/wiki/ the Lucee wiki]. Specifically, the [https://bitbucket.org/lucee/lucee/wiki/Cookbook Lucee Cookbook] has lots of good info about getting started. &lt;br /&gt;
&lt;br /&gt;
If you're new to CFML in general, the following resources will help you get learn the basics:&lt;br /&gt;
*[http://www.trycf.com/tutorials TryCF.com Tutorials]&lt;br /&gt;
*[http://bittersweetryan.github.io/ColdFusion-Koans/ ColdFusion Koans]&lt;br /&gt;
*[https://github.com/cfjedimaster/ColdFusion-UI-the-Right-Way ColdFusion UI the Right Way]&lt;br /&gt;
*[https://github.com/daccfml/cfscript/blob/master/cfscript.md CFScript Documentation]&lt;br /&gt;
&lt;br /&gt;
==How do I access my Lucee Web Administator page?==&lt;br /&gt;
The preferred way to access your site's Lucee Web Administrator is by clicking the '''''Web Administrator''''' link within your control panel. Alternatively, you may access it by appending '''''/lucee/admin/web.cfm''''' to the end of your site's domain name or testing URL.&lt;br /&gt;
===I'm redirected to another page on my site when accessing the Lucee Web Administrator===&lt;br /&gt;
If your site uses rewrite rules to make your site's links search-engine-friendly, then you'll need to make a small adjustment to your rewrite rules. Add the following line to your site's ''.htacess'' file to allow your Lucee Web Administrator to load properly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
 &lt;br /&gt;
RewriteCond %{REQUEST_URI} !^.*/(lucee)($|/.*$) [NC]&lt;br /&gt;
RewriteRule ^(.*)$ - [NC,L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That code will tell the rewrite engine to ignore requests that contain the word ''lucee''. If your site already has a similar ''RewriteCond'' in its .htacess file ''(common with CF Wheels or ColdBox)'', then just add ''lucee'' to the list of URIs to bypass.&lt;br /&gt;
&lt;br /&gt;
==How do I create a datasource within Lucee?==&lt;br /&gt;
You may create Lucee datasources (DSNs) either withing your site's Lucee Web Administrator or within the site's Application.cfc. More info on creating Lucee datasources is in this Lucee Cookbook entry: [https://bitbucket.org/lucee/lucee/wiki/Cookbook_Datasource_Define_Datasource How to define a Datasource]&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting Lucee Errors==&lt;br /&gt;
===Lucee Web Admin - The DNS for this domain is not pointed to this server===&lt;br /&gt;
'''Error:''' &amp;lt;br&amp;gt;&lt;br /&gt;
When accessing the Lucee Web Admin via the cPanel plugin, you receive this error: &lt;br /&gt;
    The DNS for this domain is not pointed to this server. Please check the DNS settings to make sure it is pointed to the correct IP. &lt;br /&gt;
&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Wait for a moment then reload the page in your browser. This error happens when your Web Admin takes longer than expected to initialize, but reloading the page will allow the Lucee Web Admin to load as expected.&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Upgrade_Gotchas&amp;diff=2525</id>
		<title>ColdFusion Upgrade Gotchas</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Upgrade_Gotchas&amp;diff=2525"/>
				<updated>2015-06-04T22:54:59Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: Created page with &amp;quot;==ColdFusion 9 (or lower) to 11== *Cfchart was revised for ColdFusion 11. The main issue we've seen has been related to the removal of support for XML styling. Follow this wik...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==ColdFusion 9 (or lower) to 11==&lt;br /&gt;
*Cfchart was revised for ColdFusion 11. The main issue we've seen has been related to the removal of support for XML styling. Follow this wiki to convert your XML stylesheets to JSON: [[ColdFusion_Tips_%26_Tricks#Cfchart_error:_Could_not_locate_the_style_file_style.xml|Cfchart: Could not locate the style file]]&lt;br /&gt;
*There are rare instances where using custom Javascript on cfform elements will break cfform's functionality after upgrading to ColdFusion 11. In this case it is recommended to test your codebase against a devlopment instance of ColdFusion 11.&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2516</id>
		<title>ColdFusion Tips &amp; Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2516"/>
				<updated>2015-06-01T19:07:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Cfchart error: Could not locate the style file style.xml */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Converting Application.cfm to Application.cfc==&lt;br /&gt;
Using an '''Application.cfc''' configuration file offers some advantages over the older style '''Application.cfm''' configuration files. Some of the main features that an Application.cfc file give you are &amp;quot;functions triggered by Application, Session, Request, and Error events&amp;quot; and &amp;quot;Application-Level Mappings and Custom Tag Paths&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are only a few steps required to convert an application to use an Application.cfc file:&lt;br /&gt;
&lt;br /&gt;
NOTE: You should ensure that you have a backup of any files before making changes to them.&lt;br /&gt;
&lt;br /&gt;
===Create an '''Application.cfc''' file===&lt;br /&gt;
&lt;br /&gt;
Below is an example '''Application.cfc''' file with the minimum requirements:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Setup '''onRequest''' function in '''Application.cfc''' to include the '''Application.cfm''' file&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if an Application.cfm file already exists in the root of the application. Below is what the Application.cfc file will look like after this addition:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Copy application settings from the '''cfapplication''' tag and remove the '''cfapplication''' tag===&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if a cfapplication tag is used within the application. Each attribute of the cfapplication tag will need to be copied into the cfscript section at the top of the Application.cfc with the pattern [this.attributeName = &amp;quot;value&amp;quot;;].&lt;br /&gt;
&lt;br /&gt;
For example. The below cfapplication tag would be converted into our Application.cfc example as follows:&lt;br /&gt;
&lt;br /&gt;
'''cfapplication''' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication&lt;br /&gt;
	name = &amp;quot;my_app_name&amp;quot;&lt;br /&gt;
	sessionManagement = &amp;quot;Yes&amp;quot;&lt;br /&gt;
	sessionTimeout = &amp;quot;#createTimeSpan(0,0,20,0)#&amp;quot;&lt;br /&gt;
	setClientCookies = &amp;quot;Yes&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Application.cfc''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = &amp;quot;my_app_name&amp;quot;; // app name from old cfapplication tag&lt;br /&gt;
		this.sessionManagement = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
		this.sessionTimeout = CreateTimeSpan(0,0,20,0);&lt;br /&gt;
		this.setClientCookies = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Do not forget to remove the '''cfapplication''' tag after copying the settings into the '''Application.cfc''' file.&lt;br /&gt;
&lt;br /&gt;
Now that the change is complete, this is a good time to test the application to ensure everything is working correctly with the new setup.&lt;br /&gt;
&lt;br /&gt;
==Per-Application ColdFusion Mappings==&lt;br /&gt;
In ColdFusion 8 and above, it is possible to create per-application mappings through your site's Application.cfc file. If you wish to convert to using an Application.cfc file, follow the steps [[ColdFusion_Tips_%26_Tricks#Converting_Application.cfm_to_Application|here]]. &lt;br /&gt;
&lt;br /&gt;
Once you have your Application.cfc created, you will insert the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.mappings[&amp;quot;/test&amp;quot;]=&amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On your site though, you would change &amp;quot;/test&amp;quot; to the name of your mapping. IMPORTANT: You need to include the forward slash before the name of your mapping. Also, change &amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot; to the full physical path to the folder you wish to map. &lt;br /&gt;
'''Note''': The physical path to your FTP root is listed in the &amp;quot;Site Settings&amp;quot; of your control panel at wcp.hostek.com.&lt;br /&gt;
&lt;br /&gt;
To call a template named &amp;quot;testing.cfm&amp;quot; in the &amp;quot;test&amp;quot; directory we just mapped, you would use this line: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;/test/testing.cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-Application Custom Tag Paths==&lt;br /&gt;
Starting in ColdFusion 8, ColdFusion allows creation of Custom Tag Paths in each site's Application.cfc file. This allows you to create and manage your Custom Tag Paths without having to use CF Administrator (ie. submit a support ticket). The following steps will help you create a Custom Tag Path:&lt;br /&gt;
&lt;br /&gt;
If you do not already have an Application.cfc file in your site's Web root, create one now.&lt;br /&gt;
Place the following code in the Application.cfc file and save:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=&amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you'd replace &amp;quot;yourdomain.com&amp;quot; with your domain name, and &amp;quot;customtagfolder&amp;quot; with the name of the folder you created for your custom tags. &lt;br /&gt;
&lt;br /&gt;
Now you have successfully added your custom tag path. If you have multiple tag paths to add, try using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=ListAppend(THIS.customtagpaths, &amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Per-application Robust Exception Information Settings==&lt;br /&gt;
To enable Robust Exception Information on a ColdFusion application, you will need to add the following to the top of the site's ''Application.cfc'' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = true /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Alternatively, if you wish to ensure Robust Exception Information is ''always'' disabled for an application, add this to the site's ''Application.cfc'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = false /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-application JSON Prefix==&lt;br /&gt;
To enable the JSON Prefix for your application add the following to the site's '''Application.cfc''' file, and adjust the '''secureJSONPrefix''' as desired:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = true&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSONPrefix = &amp;quot;//&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can disable this feature using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = false&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Restart a ColdFusion Application==&lt;br /&gt;
If you ever need to restart your site's ColdFusion application (to pick up a setting change, etc), you can do so via the ApplicationStop() function in ColdFusion 9+. &lt;br /&gt;
&lt;br /&gt;
To use this you can create a file (ex: restart.cfm) containing the following code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset ApplicationStop() /&amp;gt;&lt;br /&gt;
&amp;lt;cflocation url=&amp;quot;index.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When you run the file containing that code your ColdFusion Application will be stopped (flushing your application scope), and when the browser is redirected to the index page the application will start again.&lt;br /&gt;
==CFHTTP Connection Failures over HTTPS==&lt;br /&gt;
===Fixing cfhttp Failures on Shared Hosting===&lt;br /&gt;
If you try to use &amp;lt;cfhttp&amp;gt; to connect to a secure site (over HTTPS), you may receive the following error: &amp;quot;Connection Failure: Status code unavailable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this add the following code to your site's &amp;quot;Application.cfm&amp;quot; file (below the 'cfapplication' tag):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- fix for HTTPS connection failures ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif NOT isDefined(&amp;quot;Application.sslfix&amp;quot;)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity = createObject(&amp;quot;java&amp;quot;, &amp;quot;java.security.Security&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity.removeProvider(&amp;quot;JsafeJCE&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset Application.sslfix = true /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If your site uses an &amp;quot;Application.cfc&amp;quot; file instead, then just place that code in the &amp;quot;'onApplicationStart()&amp;quot; method of that file. After making that adjustment you'll need to restart your ColdFusion application as [[ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application|shown here]]. If you still run into issues though, you will need to [https://support.hostek.com/ submit a support ticket] asking our team to install the remote site's SSL certificate into ColdFusion's Java Certificate Store.&lt;br /&gt;
&lt;br /&gt;
===Fixing cfhttp Failures on VPS Hosting===&lt;br /&gt;
If you are having issues connecting to a site or file from with ColdFusion over HTTPS, you can import the remote site's SSL certificate into the the Java SSL Certificate Store used by ColdFusion.&lt;br /&gt;
====Fixing cfhttp Connection Failures with Keytool====&lt;br /&gt;
'''1) Set Java environment'''&amp;lt;br&amp;gt;&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable in the next command. For '''example''', you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
In that case, you would use '''C:\ColdFusion10\jre''' as the value of JAVA_HOME as shown below. Open a command prompt and issue the following commands:&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set JAVA_HOME=C:\ColdFusion10\jre&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set PATH=%PATH%;%JAVA_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, use the following commands (case-sensitive) in your terminal:&lt;br /&gt;
This '''example''' assumes that the JRE is located at ''/opt/coldfusion10/jre''&lt;br /&gt;
    export JAVA_HOME=/opt/coldfusion10/jre&lt;br /&gt;
    export PATH=$PATH:/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
'''2) List the Keystore Contents'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Java installation is at ''C:\ColdFusion10\jre'', then navigate to '''C:\ColdFusion10\jre\bin''':&lt;br /&gt;
    cd C:\ColdFusion10\jre\bin&lt;br /&gt;
If you're using a '''Linux/cPanel''' server, use this command instead:&lt;br /&gt;
    cd /opt/coldfusion10/jre/bin&lt;br /&gt;
&lt;br /&gt;
Now you can list the keystore contents ''(Windows &amp;amp; Linux)'':&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 76 entries&lt;br /&gt;
&lt;br /&gt;
'''3) Import certificate in to keystore and list to check added '''&amp;lt;br&amp;gt;&lt;br /&gt;
''(assumes you've downloaded the certificate to '''c:\temp\inet.cer''' (Windows) or '''/temp/inet.cer''' (Linux/cPanel)''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file c:\temp\inet.cer&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file /temp/inet.cer&lt;br /&gt;
    Trust this certificate? [no]: y&lt;br /&gt;
    Certificate was added to keystore&lt;br /&gt;
&lt;br /&gt;
Now verify the keystore contains your new certificate&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 77 entries&lt;br /&gt;
&lt;br /&gt;
'''4) Restart the ColdFusion application service so the keystore is re-read.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''5) Run your cfhttp request - HTTPS works now!'''&lt;br /&gt;
&lt;br /&gt;
====Fixing cfhttp Connection Failures with Portecle====&lt;br /&gt;
If you'd rather import certificates into the Java SSL Keystore through a GUI, follow these directions to use a tool named Portecle to do so:&lt;br /&gt;
&lt;br /&gt;
#Ensure your JAVA_HOME variable is set correctly as described above.&lt;br /&gt;
#Download Portecle from Sourceforge: [http://sourceforge.net/projects/portecle/ Portecle Project Homepage]&lt;br /&gt;
#Extract the files&lt;br /&gt;
#Open a Command Prompt and navigate to the extracted directory&lt;br /&gt;
#Issue this command to launch Portecle: &amp;lt;pre&amp;gt;java -jar portecle.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#In Notepad, open your jvm.config file to find the JVM PATH for ColdFusion's JVM; look for '''java.home={path here}'''&lt;br /&gt;
#In Portecle click ''File'', ''Open Keystore File''&lt;br /&gt;
#Browse to {JVM PATH}\jre\lib\security to the path, and open the cacerts file; Enter Password: '''changeit'''&lt;br /&gt;
#Click on '''Tools''', '''Import Trusted Certificate''', select the certificate you wish to import.&lt;br /&gt;
#*To obtain the certificate, you can navigate in a browser to the site where the certificate resides, then download the certificate to a CER (X.509 format) file through the browser.&lt;br /&gt;
#Click '''OK''' to import and '''YES''' to accept the certificate as ''trusted''.&lt;br /&gt;
#Click OK again, usually you won't need to change the Alias name;click OK to finish.&lt;br /&gt;
#Click '''File''', '''Save Keystore'''.&lt;br /&gt;
Close Portecle.&lt;br /&gt;
====Fixing CFHTTP Failures Related to Cached DNS Records====&lt;br /&gt;
This solution will prevent Java from caching DNS records for the life of the ColdFusion process. Instead, Java will refresh its records periodically.&lt;br /&gt;
&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable to find the location of the Java installation used by ColdFusion. &lt;br /&gt;
&lt;br /&gt;
For '''example''', on '''Windows''' you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
On '''Linux''' you may see this:&lt;br /&gt;
    java.home=/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
Navigate to the '''security''' folder within the Java installation used by ColdFusion. For '''example''':&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows''' ''(open in Windows Explorer)''&lt;br /&gt;
    C:\ColdFusion10\jre\lib\security\&lt;br /&gt;
'''Linux\cPanel'''&lt;br /&gt;
    cd /opt/coldfusion10/jre/lib/security/&lt;br /&gt;
&lt;br /&gt;
Back-up, then edit the '''java.security''' file within that folder and change the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
'''From'''&lt;br /&gt;
    #networkaddress.cache.ttl=-1&lt;br /&gt;
'''To'''&lt;br /&gt;
    networkaddress.cache.ttl=600&lt;br /&gt;
&lt;br /&gt;
''Note:'' The above value refreshes DNS records every 600 seconds ''(10 minutes)''. You may adjust it to whatever you feel is appropriate for your server.&lt;br /&gt;
&lt;br /&gt;
Now '''Save''' the file then '''Restart ColdFusion''', and the new DNS caching setting will take effect.&lt;br /&gt;
&lt;br /&gt;
==CFMAIL Multi-Part Emails==&lt;br /&gt;
Sending emails with both Text and HTML parts helps reduce the chance of your messages getting caught by a mail server's spam filter. It also helps ensure your recipients can read the message regardless of the mail client being used. The easiest way to do this is to store your message in a variable using &amp;lt;cfsavecontent&amp;gt; then adding it to &amp;lt;cfmail&amp;gt; using &amp;lt;cfmailpart&amp;gt; as shown in the example below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Store your message in a variable ---&amp;gt;&lt;br /&gt;
&amp;lt;cfsavecontent variable=&amp;quot;myemailcontent&amp;quot;&amp;gt;&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
This is some plain text. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;And this is some more text in HTML. It will appear in plain-text for anyone who views the Text part of this email, though.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/cfsavecontent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- Function to strip HTML from message while preserving line breaks ---&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name= &amp;quot;textMessage&amp;quot; access= &amp;quot;public&amp;quot; returntype= &amp;quot;string&amp;quot; hint= &amp;quot;Converts an html email message into a nicely formatted with line breaks plain text message&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfargument name= &amp;quot;string&amp;quot; required= &amp;quot;true&amp;quot; type= &amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfscript&amp;gt;&lt;br /&gt;
      var pattern = &amp;quot; &amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
      var CRLF = chr( 13) &amp;amp; chr( 10);&lt;br /&gt;
      var message = ReplaceNoCase(arguments.string, pattern, CRLF , &amp;quot;ALL&amp;quot;);&lt;br /&gt;
      pattern = &amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;;&lt;br /&gt;
    &amp;lt;/cfscript&amp;gt;&lt;br /&gt;
    &amp;lt;cfreturn REReplaceNoCase(message, pattern, &amp;quot;&amp;quot; , &amp;quot;ALL&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!--- Now send the email. When adding the Text part, we'll use the textMessage() function we just created to strip out HTML tags. ---&amp;gt;&lt;br /&gt;
&amp;lt;cfmail from=&amp;quot;sender@domain.com&amp;quot; to=&amp;quot;recipient@anotherdomain.com&amp;quot; subject=&amp;quot;Multi-part Email with CFMAIL&amp;quot; type=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/plain&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#textmessage(myemailcontent)#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/html&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#myemailcontent#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: [http://cookbooks.adobe.com/post_CFMAIL_the_right_way-17875.html CFMAIL the right way]&lt;br /&gt;
&lt;br /&gt;
==Scheduling Tasks in ColdFusion==&lt;br /&gt;
On occasion shared ColdFusion hosting customers need to setup Scheduled Task to run files on a cycle. &lt;br /&gt;
&lt;br /&gt;
This can be done with the following steps, making use of ColdFusion's &amp;lt;cfschedule&amp;gt; tag:&lt;br /&gt;
&lt;br /&gt;
#Create a file locally using any text editor, save the file with the .CFM extension (example: setschedule_example.cfm).&lt;br /&gt;
#Copy and past in the code example below taken from ''ColdFusion's Documentation'' and save.&lt;br /&gt;
#Replace the data in the example note the following recommendations.&amp;lt;br /&amp;gt;!- Name each file made for creating a schedule with the name of the task so you can reference the task later if needed. Specific naming will also make it more difficult for someone to randomly run the file.&amp;lt;br /&amp;gt;!- If you need to schedule a job to run monthly on any date in the range 28-31, read about how ColdFusion will handle the scheduling in the ColdFuison8 documentation referenced below.&lt;br /&gt;
#Working example, the code example below is a working tested solution for getting the weather for a specific zip code and the task to email the results.&lt;br /&gt;
&lt;br /&gt;
'''Scheduled Task'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- This sets the initial task, if your just wanting to set the schedule --&amp;gt;&lt;br /&gt;
&amp;lt;cfschedule action = &amp;quot;update&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot; &lt;br /&gt;
    operation = &amp;quot;HTTPRequest&amp;quot;&lt;br /&gt;
    url = &amp;quot;http://test.hostek.net/weather_send.cfm&amp;quot;&lt;br /&gt;
    startDate = &amp;quot;7/6/09&amp;quot;&lt;br /&gt;
    startTime = &amp;quot;09:30 AM&amp;quot;&lt;br /&gt;
    interval = &amp;quot;3600&amp;quot;&lt;br /&gt;
    resolveURL = &amp;quot;Yes&amp;quot;&lt;br /&gt;
    requestTimeOut = &amp;quot;600&amp;quot;&lt;br /&gt;
    mode = &amp;quot;application&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task created to be deleted, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;delete&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task to be paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;pause&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task resumed if paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;resume&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Weather Collector'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;CF External Weather Checker&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfset zip=&amp;quot;12345&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;cfinvoke webservice=&amp;quot;http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl&amp;quot; method=&amp;quot;getCityWeatherByZIP&amp;quot; returnvariable=&amp;quot;aWeatherReturn&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cfinvokeargument name=&amp;quot;ZIP&amp;quot; value=&amp;quot;#zip#&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aWeatherReturn.temperature EQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt; I cannot get the weather for #zip# external http connections must be DOWN.&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;cfset message=&amp;quot;The temperature for #zip# (Your city) is #aWeatherReturn.temperature# degrees.&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif message NEQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfmail from = &amp;quot;weather.server@test.com&amp;quot; to = &amp;quot;test@test.com&amp;quot; subject = &amp;quot;Weather checker&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#message#&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note''': We highly recommend setting the ''mode'' attribute of cfschedule to ''application''. This will ensure your site's application is the only one allowed to modify the task. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''More information on using CFSchedule'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/cfschedule Adobe ColdFusion Documentation - CFSchedule]&lt;br /&gt;
*[http://www.isummation.com/blog/configuring-coldfusion-scheduled-tasks-using-the-cfschedule-tag/ iSummation Blog - Configuring ColdFusion Scheduled Tasks using the CFSCHEDULE tag]&lt;br /&gt;
&lt;br /&gt;
==Session Management - Handling Bots and Spiders==&lt;br /&gt;
===Robots.txt File===&lt;br /&gt;
First and foremost we suggest creating a robots.txt file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time. Second to prevent specific bots from crawling the website. &lt;br /&gt;
&lt;br /&gt;
Please see our [[Robots|robots.txt article]] for more information on implementing a robots.txt on your site.&lt;br /&gt;
&lt;br /&gt;
===Lower Session Timeouts for Bots and Spiders===&lt;br /&gt;
Next we suggest setting your session timeout specifically lower for bots and spiders. These spiders and bots will crawl a page and when a session (ColdFusion) is created, it will persist during then entire page load. The page fully loaded allows the bot or spider to get the information from the Web page AND allows the session to expire quickly protecting ColdFusion from effects similar to a memory leak. &lt;br /&gt;
&lt;br /&gt;
To do this, implement the appropriate solution for your site below:&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfm'''====&lt;br /&gt;
Place this code at the top of your Application.cfm file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then use the '''REQUEST.sessionTimeout''' variable to specify the session timeout period in your '''cfapplication''' tag: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication name=&amp;quot;myawesomeapp&amp;quot;&lt;br /&gt;
     sessionmanagement=&amp;quot;Yes&amp;quot;&lt;br /&gt;
     sessiontimeout=&amp;quot;#REQUEST.sessionTimeout#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (tag-based)====&lt;br /&gt;
If you primarily use cfml tags in your Application.cfc, you can set the Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
 &amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (cfscript)====&lt;br /&gt;
If instead, you're using cfscipt in your Application.cfc, you'll set the custom Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
// This checks if a cookie is created, for bots this will return false and use the low session timeout&lt;br /&gt;
if (StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) || StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)){&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,30,0);&lt;br /&gt;
} else {&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,0,2);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.bennadel.com/blog/1083-ColdFusion-Session-Management-And-Spiders-Bots.htm Session Management code examples for the Application.cfm]&lt;br /&gt;
&lt;br /&gt;
==Creating Client Variables Tables for MySQL Databases==&lt;br /&gt;
If you need your datasource set up as a ColdFusion Client Variables Store, you can enable the '''Client Variables'' option in your ColdFusion datasource within the WCP control panel. &lt;br /&gt;
&lt;br /&gt;
Please note, if your datasource MySQL DSN, you'll need to create the necessary tables prior to using the Client Variable Store. To do this you would need to create two tables, one named &amp;quot;cdata&amp;quot; and one named &amp;quot;cglobal&amp;quot;. The SQL you'd use to create those tables is below:&lt;br /&gt;
&lt;br /&gt;
Table: '''cdata'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
 CREATE TABLE IF NOT EXISTS cdata (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          app varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          PRIMARY KEY (cfid,app)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Table: '''cglobal'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS cglobal (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          lvisit timestamp,&lt;br /&gt;
          KEY cfid (cfid),&lt;br /&gt;
          KEY lvisit (lvisit)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Output CF Error details without CFDump==&lt;br /&gt;
It is common in an error handler that you want to output all of the error details to the screen, a file, or an email. Therefore, the cfdump tag is commonly used for this; and, while this works well in development, it is not always the best practice on a production site because of the performance of the cfdump tag due to its use of reflection (Runtime type introspection).&lt;br /&gt;
&lt;br /&gt;
A better performing alternative is to output the information you want directly from the Error/Exception struct within a 'cfoutput' tag. This can be done by looking up the cferror structure or the cfcatch structure in the ColdFusion docs to see what is available and what values you might want to output:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Error''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cferror&amp;lt;br /&amp;gt;&lt;br /&gt;
'''CFCatch''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cfcatch&lt;br /&gt;
&lt;br /&gt;
===Cfdump Custom Tag Alternative===&lt;br /&gt;
You can also use the following link to download an example CF custom tag that will give a similar error output as when using the cfdump tag on an error variable:&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the custom tag's usage:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the error handler specified in your 'cferror' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cf_OutputError Error=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code would replace:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfdump var=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in a cfcatch block:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cftry&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;cfcatch&amp;gt;&lt;br /&gt;
   &amp;lt;cf_OutputCFCatch CFCatch=&amp;quot;#CFCatch#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/cfcatch&amp;gt;&lt;br /&gt;
&amp;lt;/cftry&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configure ColdFusion to Handle html and htm Files==&lt;br /&gt;
===Enable HTML/HTM as CFML on Shared Accounts===&lt;br /&gt;
On our ColdFusion servers, the best way to process HTML files (.html, .htm) as ColdFusion/CFML (.cfm files) is by using a set of rewrite rules that route the HTML files through a ColdFusion &amp;quot;controller&amp;quot; script. The main benefits of this approach are that it is easy to implement on a site-by-site basis, and it works with any version of ColdFusion. To implement this approach on your site, follow the steps below:&lt;br /&gt;
====Step 1: Add Rewrite Rules to Route HTML Files through the CFM Controller====&lt;br /&gt;
If you have a '.htaccess' file in your webroot, add the rules below to the top of that file. Otherwise, create a file named '.htaccess' in your site's web root and place these rules within it:&lt;br /&gt;
=====For Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.html htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====For Sites Using .HTM Files=====&lt;br /&gt;
'''NOTE:''' If your site uses ''.htm'' files instead of ''.html'' files, use this set of rules instead. The only difference is ''html'' is replaced with ''.htm''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.htm htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 2: Create the ColdFusion Controller Script (htmlcontrol.cfm)====&lt;br /&gt;
Now we just need to create a ColdFusion script that will process the HTML files. To do this, create a file named '''htmlcontrol.cfm''' within your site's web root. Place this CFML code within the file:&lt;br /&gt;
=====CFML for Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.html&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====CFML for Sites Using .HTM Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.htm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you save the controller script, your site will begin processing any ColdFusion/CFML code within your HTML files.&lt;br /&gt;
===Enable HTML/HTM as CFML on a VPS===&lt;br /&gt;
In case you need to process ColdFusion code in your .htm or .html files, here is what you will need to do to get this to work. This is based on using ColdFusion on one of our dedicated server hosting accounts on a Windows server.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This will affect every site on the server, so use cautiously.&lt;br /&gt;
&lt;br /&gt;
First, you will need to edit the web.xml file located generally at C:\ColdFusion10\cfusion\wwwroot\WEB-INF&lt;br /&gt;
&lt;br /&gt;
Open this file and look for '''coldfusion_mapping_1'''.&lt;br /&gt;
&lt;br /&gt;
Scroll down the file until you see the last number increment like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;servlet-mapping id=&amp;quot;macromedia_mapping_15&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then add the following right below the closing &amp;lt;/servlet-mapping&amp;gt; of the last number increment item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_16&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_17&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_18&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_19&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save this file and exit.&lt;br /&gt;
&lt;br /&gt;
Now in IIS, setup a mapping for the site:&lt;br /&gt;
#In IIS 7+ click the server name section (right below the '''Start Page''' in the left-hand navigation), then double-click the '''Handler Mappings''' icon.&lt;br /&gt;
#Select and &amp;quot;edit&amp;quot; the '''*.cfm''' record and copy the value of &amp;quot;executable&amp;quot;. Now hit Cancel and then click '''Add Script Map'''. &lt;br /&gt;
#Paste the executable value copied from the '''*.cfm''' record and type '''*.htm''' into the '''Request Path''' and hit OK. &lt;br /&gt;
#Repeat the above steps to add a handler for '''*.html''' &lt;br /&gt;
&lt;br /&gt;
Lastly, open the '''uriworkermap.properties''' file for your ColdFusion 10 IIS Connector in a text editor such as Notepad. On a standard ColdFusion installation this is located at: &amp;lt;pre&amp;gt;C:\ColdFusion10\config\wsconfig\1\uriworkermap.properties&amp;lt;/pre&amp;gt;&lt;br /&gt;
Copy the following lines, paste them at the bottom of the file, then save and close the file: &amp;lt;pre&amp;gt;/*.html = cfusion&lt;br /&gt;
/*.htm = cfusion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the ColdFusion service and IIS. ColdFusion should begin processing CFML within htm/html files now.&lt;br /&gt;
&lt;br /&gt;
==Increase the ColdFusion Post Parameters Limit==&lt;br /&gt;
===ColdFusion 10===&lt;br /&gt;
In ColdFusion 10, you can easily increase the value of ColdFusion's '''postParametersLimit''' via the ColdFusion Administrator. Once logged into the ColdFusion Administrator, click the '''Settings''' link then scroll to the bottom of the page. Set the value for the Post Parameters Limit to the desired limit and click the submit button. &lt;br /&gt;
===ColdFusion 9 and below===&lt;br /&gt;
To adjust the Post Parameters Limit setting in ColdFusion 9 and below, you will have to edit the server's '''neo-runtime.xml''' file which is located here on a standard installation: &amp;lt;pre&amp;gt;C:\ColdFusion9\lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open that file in a text editor such as Notepad, then search for the '''postSizeLimit''' tag. It will look similar to this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postSizeLimit'&amp;gt;&amp;lt;number&amp;gt;100.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediately after that set of tags, paste this chunk of text: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postParametersLimit'&amp;gt;&amp;lt;number&amp;gt;1000.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once you've adjusted the file, you'll just need to save your changes and restart ColdFusion for the new setting to go into effect. '''Note''': The value of '''1000''' is just an example, so you can increase it as needed. &lt;br /&gt;
&lt;br /&gt;
==Loading custom Java library or Java Libraries (jar or class files) in ColdFusion 10==&lt;br /&gt;
ColdFusion 10 makes it easy to load Java libraries into your ColdFusion application without having to restart ColdFusion. All that's required is your application define the 'THIS.javaSettings' attribute within the site's Application.cfc like below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.javaSettings = {LoadPaths = [&amp;quot;/javafiles/&amp;quot;], loadColdFusionClassPath = true, reloadOnChange=false}/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will check the ''javafiles'' directory in your Web root for 'jar' and 'class' files and make any libraries within the directory accessible from your ColdFusion application. If you modify the JAR files in your ''javafiles'' directory though, ColdFusion will need to be restarted to load the new versions of the JAR files. &lt;br /&gt;
&lt;br /&gt;
'''References''': &lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/Enhanced+Java+integration+in+ColdFusion+10 Adobe ColdFusion Documentation - Enhanced Java Integration in ColdFusion]&lt;br /&gt;
*[http://www.raymondcamden.com/2014/6/16/Issue-with-ColdFusion-JavaSettings-and-ReloadOnChange Ray Camden's Blog - Issue with ColdFusion JavaSettings and ReloadOnChange]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Permission denied for creating Java object: coldfusion.server.ServiceFactory''==&lt;br /&gt;
===When using Mura or using Transfer ORM===&lt;br /&gt;
====Issue====&lt;br /&gt;
If you are using '''Mura''' or using '''Transfer ORM''' and you get this error, ''Permission denied for creating Java object: coldfusion.server.ServiceFactory'', you are likely using an outdated version of Mura and also are probably on a ColdFusion 9 server. The Transfer ORM component causing this issue has not been updated to work with ColdFusion 9. There is a quick fix though:&lt;br /&gt;
====Solution====&lt;br /&gt;
Find the file named CFMLVersion.cfc which should be at '''/wwwroot/requirements/transfer/com/factory'''.&lt;br /&gt;
&lt;br /&gt;
Edit that file and find the line that has:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And change that to:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;) OR server.coldfusion.productversion.startsWith(&amp;quot;9&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save the file and it should now work.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Since this is likely running an outdated version of Mura, we highly recommend updating Mura to the latest version to take advantage of numerous performance and security enhancements.&lt;br /&gt;
===When using DataMgr===&lt;br /&gt;
If you get this error while using DataMgr.cfc, the changes described below will solve this problem:&lt;br /&gt;
&lt;br /&gt;
Here is the section of code from the original DataMgr.cfc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection = getConnection()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset db = connection.getMetaData().getDatabaseProductName()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection.close()&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = db2&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is what the modified code should look like (this sample assume MySQL)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of changes''':&lt;br /&gt;
&lt;br /&gt;
These 3 lines were commented out:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line needed quotes around db2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And lastly, this line needed added:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you are using an ''MS Access'' database instead of ''MySQL'', replace '''MYSQL''' with '''msaccessjet''' on the line that is added.&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Security: The requested template has been denied access to {file/directory}''==&lt;br /&gt;
===Issue===&lt;br /&gt;
Our shared servers have ColdFusion Sandbox Security enabled, which requires absolute filesystem paths to be provided to tags and functions that interact with the filesystem. If you receive an error that starts with ''Security: The requested template has been denied access to ...'', then it is followed by a relative path, you'll need to replace the relative path with a full path.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
One way to do this is to hard-code the path (''d:\home\sitename.com\wwwroot\filename.jpg''), but that can cause portability problems if your site is ever moved to a different environment. &lt;br /&gt;
&lt;br /&gt;
A better way to do this would be to &amp;quot;wrap&amp;quot; your relative path with the '''ExpandPath()''' function. The ''ExpandPath()'' function will automatically detect the absolute filesystem path to the file, and ColdFusion will no longer give you a permissions error. &lt;br /&gt;
&lt;br /&gt;
'''More info''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/ExpandPath Adobe Documentation - ExpandPath]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion COM Object Error ''java.lang.RuntimeException: Can not use native code: Initialisation failed''==&lt;br /&gt;
The error ''java.lang.RuntimeException: Can not use native code: Initialisation failed'' is related to calling a 32-bit COM object from within a 64-bit ColdFusion installation. &lt;br /&gt;
&lt;br /&gt;
The simplest way to bypass this error is to write a small ASP Webservice to proxy the call to the COM object as shown in '''Option 2''' of this blog post: [http://coldfusion9.blogspot.com/2010/05/32-bit-components-on-64-bit-coldfusion.html 32-bit Components on 64-bit ColdFusion]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can [https://support.hostek.com/ ask Support] to move your site to a 32-bit ColdFusion server.&lt;br /&gt;
&lt;br /&gt;
==Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated Server==&lt;br /&gt;
To use Seefusion, visit the address mentioned in your server's Welcome email.&lt;br /&gt;
&lt;br /&gt;
Once loaded, you'll see a summary of memory consumption, average response time, number of requests processed by ColdFusion per second, and a view of currently running ColdFusion requests. &lt;br /&gt;
===Finding Scripts to Optimize===&lt;br /&gt;
When using Seefusion it is helpful to look at the '''Slow''' section of the request monitor. This will show you recent requests that took longer than 8 seconds to complete, giving you a good idea of what scripts need optimization. &lt;br /&gt;
===Stack Tracing with Seefusion===&lt;br /&gt;
Additionally, when a request is running in the '''Active''' section of Seefusion's request monitor, you can click the paper stack icon to the left of the request to view a stack trace of the request. A stack trace tells you what line of code is currently being processed by the request. &lt;br /&gt;
&lt;br /&gt;
Once the stack trace loads, start at the top and work your way down until you find a recognizable path to a ColdFusion template (''eg. c:\home\mysite.com\wwwroot\index.cfm: 47''). This tells you the template currently being executed followed by the line number being processed at that moment in time. If a request consistently shows the same line of code in subsequent stack traces, then you've found the main area to focus on optimizing.&lt;br /&gt;
&lt;br /&gt;
To make deciphering stack traces easier, you can also click the '''Seestack''' button at the top of the stack trace window. This will send the stack trace to a service that will analyze the trace and attempt to tell you where you need to focus.&lt;br /&gt;
&lt;br /&gt;
===Viewing Metrics over Time===&lt;br /&gt;
If you want to watch how response times and memory utilization in a more granular manner than the dashboard graphs show, you'll want to click the '''Counters''' button at the top of SeeFusion. Once on the Counters page you can select a time interval, then have Seefusion display performance metrics at the interval you selected. This is helpful to ensure requests are completing quickly and not exhausting ColdFusion's memory.&lt;br /&gt;
&lt;br /&gt;
==How to Wrap Your ColdFusion DSN with Seefusion==&lt;br /&gt;
If you wish to have Seefusion monitor your server's query activity, you'll need to &amp;quot;wrap&amp;quot; your DSN with SeeFusion's JDBC driver so Seefusion can monitor the DSN's activity. &lt;br /&gt;
===Install SeeDSN===&lt;br /&gt;
SeeDSN is a plugin for ColdFusion Administrator that makes it easy to wrap a DSN with Seefusion. Follow these directions to install SeeDSN:&lt;br /&gt;
#Download the SeeDSN archive [http://www.seefusion.com/seedsn_v1.1.zip here].&lt;br /&gt;
#Extract the '''seedsn''' folder within the archive to your '''/CFIDE/Administrator/''' folder. This means it will be located at ''/CFIDE/Administrator/seedsn'' once extracted. &lt;br /&gt;
#Move ''/CFIDE/Administrator/seedsn/custommenu.xml'' to ''/CFIDE/Administrator/custommenu.xml''&lt;br /&gt;
===Add Seefusion.jar to the ColdFusion Classpath===&lt;br /&gt;
In order for ColdFusion to use Seefusion's JDBC driver, you'll need to ensure '''seefusion.jar''' is on your ColdFusion class path. Follow these directions to add seefusion.jar to the Coldfusion class path:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Click the '''Java and JVM''' link on the left, under Server Settings.&lt;br /&gt;
#In the box labeled '''ColdFusion Class Path''' add the path to your '''seefusion.jar''' file and click ''Submit Changes''. For example, if it is located in ColdFusion's &amp;quot;WEB-INF\lib&amp;quot; folder, you can add this to the Class Path: '''{application.home}/wwwroot/WEB-INF/lib/seefusion.jar'''. &lt;br /&gt;
#*Each path in the ColdFusion Class Path is separated by a comma, so be sure to add a comma right before the path to seefusion.jar (do not add any spaces).&lt;br /&gt;
#Restart ColdFusion after modifying the class path&lt;br /&gt;
&lt;br /&gt;
===Wrap a DSN using SeeDSN===&lt;br /&gt;
Once you've installed SeeDSN and restarted ColdFusion, you can wrap a DSN with the SeeFusion JDBC driver. Follow these instructions to do so: &lt;br /&gt;
#Log into ColdFusion Administrator&lt;br /&gt;
#Expand the ''SeeFusion'' navigation menu on the left and click '''Datasource Wrapper'''&lt;br /&gt;
#On the ''Datasource Wrapper'' page, you'll see a list of DSNs on your server. To wrap a DSN, click the ''Start'' [[File:Start.png]] icon next to your DSN. SeeDSN will automatically wrap your DSN with the SeeFusion driver and display '''OK''' if it is successful.&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/ WebApper Blog - Using SeeDSN JDBC Wrapping Tool]&lt;br /&gt;
&lt;br /&gt;
==Using fckEditor on ColdFusion 10 or Higher==&lt;br /&gt;
When getting the following error for fckEditor:&lt;br /&gt;
 '''&amp;quot;The server didn't reply with a proper XML data. Please check your configuration.&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
If you are on a ColdFusion 10+ server this will be cause by the '''FileUpload()''' function that is being used.&lt;br /&gt;
In ColdFusion 10+ ''FileUpload'' is a built-in function name, so you'll need to rename the ''FileUpload'' function used in fckeditor.&lt;br /&gt;
You can update the text for fckeditor by changing all instances of &amp;quot;FileUpload&amp;quot; to &amp;quot;fckFileUpload&amp;quot; to remove this conflict.&lt;br /&gt;
&lt;br /&gt;
==Optimze CFIMAGE Rendering in Three Steps==&lt;br /&gt;
===USE===&lt;br /&gt;
When full size images are required, re-sized images need to be used for displaying smaller images or thumbnails and the application needs to perform at optimal speed for displaying images in a browser. &lt;br /&gt;
&lt;br /&gt;
===KEY POINTS===&lt;br /&gt;
Except for during development cfimage '''action=&amp;quot;writeToBrowser&amp;quot;''' should not be used to display images.&lt;br /&gt;
Use CFIMAGE to resize images ''ONCE'', if possible during upload but if page timeouts make this impossible break up the task by using a CFC to check and re-size images as needed.&lt;br /&gt;
&lt;br /&gt;
===SUMMARY===&lt;br /&gt;
Those sites that display many images often times also upload many photos via form or via FTP and need to display both the FULL size images and smaller images for thumb nails or ''(small, med, large)'' optional sizes. The process of uploading images using CFFile can impose time constraints specifically for large files, or if the coldfusion page timeouts are set lower than is possible for large file upload and re-size jobs. To overcome this issue we can write a simple CFC for resizing the images after the upload is complete and the page is run for the first time. This will be ideal for either form based upload or FTP upload making this solution very versatile. &lt;br /&gt;
&lt;br /&gt;
====Step 1 - Create the CFC for re-sizing and writing images to disk====&lt;br /&gt;
&lt;br /&gt;
Create file &amp;quot;GetResizedImage.cfc&amp;quot; in the directory with the CFM files that display images.&lt;br /&gt;
Use the code below for the contents of this file and modify as needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;GetImage&amp;quot; hint=&amp;quot;Re-sizes images for display in album&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the image path where photos exist ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset imgpath = &amp;quot;imgdir/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the domain path, allows reuse resized images on other sites ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset domain = &amp;quot;domain.com&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Re-writes image extension if for alternates of JPG, and adds _resized to differentiate from fullsize images ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset rfile= &amp;quot;#REReplace(&amp;quot;#img#&amp;quot;,&amp;quot;.(jpg|JPG|JPEG|jpeg)&amp;quot;,&amp;quot;_resized.jpg&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Checks if file is already resized ---&amp;gt;&lt;br /&gt;
        &amp;lt;cfif FileExists(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp;&amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#rfile#&amp;quot;)&amp;gt;&lt;br /&gt;
           &amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;!--- Resizes image if it has not been done already ---&amp;gt;&lt;br /&gt;
            &amp;lt;cfset myImage=ImageNew(URLDecode(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp; &amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#img#&amp;quot;))&amp;gt;&lt;br /&gt;
                    &amp;lt;cfset ImageResize(myImage,&amp;quot;175&amp;quot;,&amp;quot;175&amp;quot;,&amp;quot;bilinear&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;!--- Saves image, and to eliminate problems with url friendly encoding when getting our images re-replace %20 with no-space ---&amp;gt;&lt;br /&gt;
                    &amp;lt;cfimage source=&amp;quot;#myImage#&amp;quot; action=&amp;quot;write&amp;quot; overwrite=true destination=&amp;quot;d:\home\#domain#\wwwroot\#imgpath##REReplace(&amp;quot;#rfile#&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot; &amp;quot;,&amp;quot;ALL&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the new path for the image for browser output ---&amp;gt;&lt;br /&gt;
			&amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;!--- Return the image variable ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfreturn myImage&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2 - Invoke the CFC====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Generate image name from query ---&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput query=&amp;quot;MyEvent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Invoke CFC to check if resized image exists, if not resize and output URL for resized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvoke component=&amp;quot;GetResizedImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare what part of the CFC handles checking / getting the image ---&amp;gt;&lt;br /&gt;
	method=&amp;quot;GetImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare variable that will pass back the new image name ---&amp;gt;&lt;br /&gt;
	returnvariable=&amp;quot;myImage&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvokeargument name=&amp;quot;img&amp;quot; value=&amp;quot;#event.Pic#&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&amp;lt;!--- Display re-sized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;img src=&amp;quot;#myImage#&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;     &lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 3 - Test====&lt;br /&gt;
The proposed solution cut page load times from 20+ seconds to below one second after the first page load. During the FIRST or FIRST FEW times the page loads all the re-sizing will be done.&lt;br /&gt;
&lt;br /&gt;
===Q and A===&lt;br /&gt;
'''Question''': Checking if a file exists each time the page loads is excessive.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Answer''': We agree but it's much better than resizing every image each time the page loads.&lt;br /&gt;
&lt;br /&gt;
==How to create Services for Additional ColdFusion Instances==&lt;br /&gt;
If you've created additional ColdFusion instances on your VPS/Dedicated Server, and ColdFusion was unable to create the Services for those instances just do the following:&lt;br /&gt;
&lt;br /&gt;
#Open a Command Prompt as Administrator&lt;br /&gt;
#Run this command, replacing INSTANCE with the actual name of your new ColdFusion instance: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;sc create &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; binPath= &amp;quot;C:\ColdFusion10\INSTANCE\bin\coldfusionsvc.exe&amp;quot; displayname= &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; start= auto&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start your instance through the Windows Services Manager. If you need to know how to create additional ColdFusion instances, please see this guide from Adobe: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSAB4367BA-6D91-4c69-8DBA-E2839394658A.html Defining Additional ColdFusion Instances]&lt;br /&gt;
&lt;br /&gt;
Once you've created the instances, you can attach them to your Web server as described here: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363a5d-7ffc.html Web Server Configuration]&lt;br /&gt;
&lt;br /&gt;
If you're using IIS, this video has a great walkthrough for using the ColdFusion Web Server Connector tool: [http://blogs.coldfusion.com/post.cfm/video-learn-about-iis-connectors-in-coldfusion10 Learn About ColdFusion IIS Connectors]&lt;br /&gt;
&lt;br /&gt;
==How to Fix Error: Value '0000-00-00' can not be represented as java.sql.Date==&lt;br /&gt;
If your application has null values in a MySQL datetime/date column you may encounter the error &amp;quot;Value '0000-00-00' can not be represented as java.sql.Date&amp;quot;. The easiest way to fix this is by adding the parameter '''zeroDateTimeBehavior=convertToNull''' to your site's DSN [http://helpx.adobe.com/coldfusion/kb/mysql-error-java-sql-sqlexception.html as recommended by Adobe].&lt;br /&gt;
===How to Fix Null DateTime Error - '''Shared Hosting'''===&lt;br /&gt;
#Log into your site's WCP control panel&lt;br /&gt;
#Click the ''DataSources (DSNs)'' button&lt;br /&gt;
#Click the ''Edit'' icon next to your DataSource (DSN)&lt;br /&gt;
#Add the following to the '''JDBC Query Parameters''' field: &amp;lt;pre&amp;gt;zeroDateTimeBehavior=convertToNull&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' To add multiple JDBC Query Parameters, separate each name/value pair by an ''''&amp;amp;''''. &lt;br /&gt;
''Example: zeroDateTimeBehavior=convertToNull&amp;amp;characterEncoding=UTF-8''&lt;br /&gt;
===How to Fix Null DateTime Error - '''VPS Hosting'''===&lt;br /&gt;
If your site uses WCP to manage its DSNs, you may utilize the Shared Hosting solution. Otherwise, follow the steps below:&lt;br /&gt;
#Log into ColdFusion Administrator on your VPS/Dedicated Server. &lt;br /&gt;
#Navigate to the &amp;quot;Data Sources&amp;quot; page and click your site's DSN name.&lt;br /&gt;
#On the page that opens add '''?zeroDateTimeBehavior=convertToNull''' to the end of the JDBC URL field.&lt;br /&gt;
#Click '''Submit''' and your site should no longer display the date representation error.&lt;br /&gt;
&lt;br /&gt;
==Find the Java Version Used by ColdFusion or Railo==&lt;br /&gt;
This CFML code will report the version of Java used by your ColdFusion or Railo server:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;#CreateObject(&amp;quot;java&amp;quot;, &amp;quot;java.lang.System&amp;quot;).getProperty(&amp;quot;java.version&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference:''' [http://www.petefreitag.com/item/743.cfm Pete Freitag's Blog - What Version of Java is ColdFusion Using?]&lt;br /&gt;
&lt;br /&gt;
==Reset ColdFusion Admin Password on CF 10+ VPS==&lt;br /&gt;
===Reset CF Admin Password - Windows VPS===&lt;br /&gt;
*On your VPS, open a command prompt window as Administrator&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.bat'' script: &amp;lt;pre&amp;gt;.\passwordreset.bat&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===Reset CF Admin Password - cPanel/Linux VPS===&lt;br /&gt;
*SSH into your VPS&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd /opt/ColdFusion10/cfusion/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.sh'' script: &amp;lt;pre&amp;gt;./passwordreset.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
==ColdFusion 11+ PDF Generation: How to Fix 'No Service Manager is Available' Error==&lt;br /&gt;
If you receive the error '''No Service Manager is Available''' when trying to generate PDFs or use the cfhtmltopdf tag on your ColdFusion 11+ VPS, do the following to fix it:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Expand ''Data &amp;amp; Services'', then click the '''PDF Service''' link&lt;br /&gt;
#On the next page, you should see an entry for ''localhost'' under the list of PDF Service Managers&lt;br /&gt;
#If the localhost service manager is not enabled, click the ''Enable'' button to the left of the manager name. (The button looks like a ''play'' button)&lt;br /&gt;
#Try using cfhtmlpdf now, and see if it works. &lt;br /&gt;
&lt;br /&gt;
If you still have any issues after enabling the service manager, try restarting the '''ColdFusion Addon Services''' Windows service and test again.&lt;br /&gt;
&lt;br /&gt;
==HTML5 Audio Player with ColdFusion==&lt;br /&gt;
This player uses an list named ''Tunes'' within the ''session'' scope to store a list of mp3 names. After populating the list, you can use this code as the foundation for an HTML audio player that plays each song in the list.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfif action is &amp;quot;play_next_tune&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfset myArray=ListtoArray(session.Tunes)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset T_max=Arraylen(myArray)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset session.track=session.track+1&amp;gt;&lt;br /&gt;
	&amp;lt;cfif session.track GT T_max&amp;gt;&lt;br /&gt;
		 &amp;lt;cfset session.track=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
		 &amp;lt;cflocation url=&amp;quot;tunespage.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
		&amp;lt;audio controls id=&amp;quot;myVideo&amp;quot; autoplay&amp;gt;&lt;br /&gt;
		&amp;lt;source src=&amp;quot;path/#myarray[session.track]#&amp;quot; type=&amp;quot;audio/mpeg&amp;quot;&amp;gt;&lt;br /&gt;
		Your browser does not support the audio element.&lt;br /&gt;
		&amp;lt;/audio&amp;gt;&lt;br /&gt;
	&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
		document.getElementById('myVideo').addEventListener(&amp;quot;ended&amp;quot;,function() {&lt;br /&gt;
		window.location.href=&amp;quot;tunespage.cfm?action=play_next_tune&amp;quot;;&lt;br /&gt;
		});&lt;br /&gt;
	&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cfchart error: Could not locate the style file ''style.xml''==&lt;br /&gt;
In ColdFusion 11 the ability to specify styles in an XML file was removed. As such, you will need to convert any XML stylesheets to json files. To do this, you'll need to do the following:&lt;br /&gt;
*Install a trial edition of ColdFusion 11 on your local computer&lt;br /&gt;
*Open a command prompt and run this command:&lt;br /&gt;
**&amp;lt;pre&amp;gt;C:\ColdFusion11\cfusion\bin\cfchart_xmltojson.bat C:\sites\mysite.com\cfchartstyle.xml&amp;lt;/pre&amp;gt;&lt;br /&gt;
**Be sure to replace the paths above with the actual path to &amp;quot;cfchart_xmltojson.bat&amp;quot; as well as the path to your XML stylesheet.&lt;br /&gt;
*When the conversion is done you will end up with a new file with the same name as the XML stylesheet, however there will not be a file extension. To simplify things, add a '''.json''' extension to the converted file. &lt;br /&gt;
*Update the path to the stylesheet in the ''cfchart'' tag to have a ''.json'' extension instead of ''.xml''.&lt;br /&gt;
*Update the path to the stylesheet to use relative paths instead of absolute paths from the webroot.&lt;br /&gt;
**Example: If the stylesheet file and the ''.cfm'' template with the ''cfchart'' code are in the webroot, change '''/cfchartstyle.json''' to '''../cfchartstyle.json'''&lt;br /&gt;
&lt;br /&gt;
More details on this are available in the [https://wikidocs.adobe.com/wiki/display/coldfusionen/cfchart Cfchart documentation]. Be sure to check the comments of the documentation for more helpful cfchart troubleshooting tips. &lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2515</id>
		<title>ColdFusion Tips &amp; Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2515"/>
				<updated>2015-06-01T19:07:12Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* HTML5 Audio Player with ColdFusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Converting Application.cfm to Application.cfc==&lt;br /&gt;
Using an '''Application.cfc''' configuration file offers some advantages over the older style '''Application.cfm''' configuration files. Some of the main features that an Application.cfc file give you are &amp;quot;functions triggered by Application, Session, Request, and Error events&amp;quot; and &amp;quot;Application-Level Mappings and Custom Tag Paths&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are only a few steps required to convert an application to use an Application.cfc file:&lt;br /&gt;
&lt;br /&gt;
NOTE: You should ensure that you have a backup of any files before making changes to them.&lt;br /&gt;
&lt;br /&gt;
===Create an '''Application.cfc''' file===&lt;br /&gt;
&lt;br /&gt;
Below is an example '''Application.cfc''' file with the minimum requirements:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Setup '''onRequest''' function in '''Application.cfc''' to include the '''Application.cfm''' file&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if an Application.cfm file already exists in the root of the application. Below is what the Application.cfc file will look like after this addition:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Copy application settings from the '''cfapplication''' tag and remove the '''cfapplication''' tag===&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if a cfapplication tag is used within the application. Each attribute of the cfapplication tag will need to be copied into the cfscript section at the top of the Application.cfc with the pattern [this.attributeName = &amp;quot;value&amp;quot;;].&lt;br /&gt;
&lt;br /&gt;
For example. The below cfapplication tag would be converted into our Application.cfc example as follows:&lt;br /&gt;
&lt;br /&gt;
'''cfapplication''' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication&lt;br /&gt;
	name = &amp;quot;my_app_name&amp;quot;&lt;br /&gt;
	sessionManagement = &amp;quot;Yes&amp;quot;&lt;br /&gt;
	sessionTimeout = &amp;quot;#createTimeSpan(0,0,20,0)#&amp;quot;&lt;br /&gt;
	setClientCookies = &amp;quot;Yes&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Application.cfc''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = &amp;quot;my_app_name&amp;quot;; // app name from old cfapplication tag&lt;br /&gt;
		this.sessionManagement = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
		this.sessionTimeout = CreateTimeSpan(0,0,20,0);&lt;br /&gt;
		this.setClientCookies = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Do not forget to remove the '''cfapplication''' tag after copying the settings into the '''Application.cfc''' file.&lt;br /&gt;
&lt;br /&gt;
Now that the change is complete, this is a good time to test the application to ensure everything is working correctly with the new setup.&lt;br /&gt;
&lt;br /&gt;
==Per-Application ColdFusion Mappings==&lt;br /&gt;
In ColdFusion 8 and above, it is possible to create per-application mappings through your site's Application.cfc file. If you wish to convert to using an Application.cfc file, follow the steps [[ColdFusion_Tips_%26_Tricks#Converting_Application.cfm_to_Application|here]]. &lt;br /&gt;
&lt;br /&gt;
Once you have your Application.cfc created, you will insert the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.mappings[&amp;quot;/test&amp;quot;]=&amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On your site though, you would change &amp;quot;/test&amp;quot; to the name of your mapping. IMPORTANT: You need to include the forward slash before the name of your mapping. Also, change &amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot; to the full physical path to the folder you wish to map. &lt;br /&gt;
'''Note''': The physical path to your FTP root is listed in the &amp;quot;Site Settings&amp;quot; of your control panel at wcp.hostek.com.&lt;br /&gt;
&lt;br /&gt;
To call a template named &amp;quot;testing.cfm&amp;quot; in the &amp;quot;test&amp;quot; directory we just mapped, you would use this line: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;/test/testing.cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-Application Custom Tag Paths==&lt;br /&gt;
Starting in ColdFusion 8, ColdFusion allows creation of Custom Tag Paths in each site's Application.cfc file. This allows you to create and manage your Custom Tag Paths without having to use CF Administrator (ie. submit a support ticket). The following steps will help you create a Custom Tag Path:&lt;br /&gt;
&lt;br /&gt;
If you do not already have an Application.cfc file in your site's Web root, create one now.&lt;br /&gt;
Place the following code in the Application.cfc file and save:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=&amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you'd replace &amp;quot;yourdomain.com&amp;quot; with your domain name, and &amp;quot;customtagfolder&amp;quot; with the name of the folder you created for your custom tags. &lt;br /&gt;
&lt;br /&gt;
Now you have successfully added your custom tag path. If you have multiple tag paths to add, try using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=ListAppend(THIS.customtagpaths, &amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Per-application Robust Exception Information Settings==&lt;br /&gt;
To enable Robust Exception Information on a ColdFusion application, you will need to add the following to the top of the site's ''Application.cfc'' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = true /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Alternatively, if you wish to ensure Robust Exception Information is ''always'' disabled for an application, add this to the site's ''Application.cfc'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = false /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-application JSON Prefix==&lt;br /&gt;
To enable the JSON Prefix for your application add the following to the site's '''Application.cfc''' file, and adjust the '''secureJSONPrefix''' as desired:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = true&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSONPrefix = &amp;quot;//&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can disable this feature using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = false&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Restart a ColdFusion Application==&lt;br /&gt;
If you ever need to restart your site's ColdFusion application (to pick up a setting change, etc), you can do so via the ApplicationStop() function in ColdFusion 9+. &lt;br /&gt;
&lt;br /&gt;
To use this you can create a file (ex: restart.cfm) containing the following code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset ApplicationStop() /&amp;gt;&lt;br /&gt;
&amp;lt;cflocation url=&amp;quot;index.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When you run the file containing that code your ColdFusion Application will be stopped (flushing your application scope), and when the browser is redirected to the index page the application will start again.&lt;br /&gt;
==CFHTTP Connection Failures over HTTPS==&lt;br /&gt;
===Fixing cfhttp Failures on Shared Hosting===&lt;br /&gt;
If you try to use &amp;lt;cfhttp&amp;gt; to connect to a secure site (over HTTPS), you may receive the following error: &amp;quot;Connection Failure: Status code unavailable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this add the following code to your site's &amp;quot;Application.cfm&amp;quot; file (below the 'cfapplication' tag):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- fix for HTTPS connection failures ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif NOT isDefined(&amp;quot;Application.sslfix&amp;quot;)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity = createObject(&amp;quot;java&amp;quot;, &amp;quot;java.security.Security&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity.removeProvider(&amp;quot;JsafeJCE&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset Application.sslfix = true /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If your site uses an &amp;quot;Application.cfc&amp;quot; file instead, then just place that code in the &amp;quot;'onApplicationStart()&amp;quot; method of that file. After making that adjustment you'll need to restart your ColdFusion application as [[ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application|shown here]]. If you still run into issues though, you will need to [https://support.hostek.com/ submit a support ticket] asking our team to install the remote site's SSL certificate into ColdFusion's Java Certificate Store.&lt;br /&gt;
&lt;br /&gt;
===Fixing cfhttp Failures on VPS Hosting===&lt;br /&gt;
If you are having issues connecting to a site or file from with ColdFusion over HTTPS, you can import the remote site's SSL certificate into the the Java SSL Certificate Store used by ColdFusion.&lt;br /&gt;
====Fixing cfhttp Connection Failures with Keytool====&lt;br /&gt;
'''1) Set Java environment'''&amp;lt;br&amp;gt;&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable in the next command. For '''example''', you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
In that case, you would use '''C:\ColdFusion10\jre''' as the value of JAVA_HOME as shown below. Open a command prompt and issue the following commands:&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set JAVA_HOME=C:\ColdFusion10\jre&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set PATH=%PATH%;%JAVA_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, use the following commands (case-sensitive) in your terminal:&lt;br /&gt;
This '''example''' assumes that the JRE is located at ''/opt/coldfusion10/jre''&lt;br /&gt;
    export JAVA_HOME=/opt/coldfusion10/jre&lt;br /&gt;
    export PATH=$PATH:/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
'''2) List the Keystore Contents'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Java installation is at ''C:\ColdFusion10\jre'', then navigate to '''C:\ColdFusion10\jre\bin''':&lt;br /&gt;
    cd C:\ColdFusion10\jre\bin&lt;br /&gt;
If you're using a '''Linux/cPanel''' server, use this command instead:&lt;br /&gt;
    cd /opt/coldfusion10/jre/bin&lt;br /&gt;
&lt;br /&gt;
Now you can list the keystore contents ''(Windows &amp;amp; Linux)'':&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 76 entries&lt;br /&gt;
&lt;br /&gt;
'''3) Import certificate in to keystore and list to check added '''&amp;lt;br&amp;gt;&lt;br /&gt;
''(assumes you've downloaded the certificate to '''c:\temp\inet.cer''' (Windows) or '''/temp/inet.cer''' (Linux/cPanel)''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file c:\temp\inet.cer&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file /temp/inet.cer&lt;br /&gt;
    Trust this certificate? [no]: y&lt;br /&gt;
    Certificate was added to keystore&lt;br /&gt;
&lt;br /&gt;
Now verify the keystore contains your new certificate&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 77 entries&lt;br /&gt;
&lt;br /&gt;
'''4) Restart the ColdFusion application service so the keystore is re-read.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''5) Run your cfhttp request - HTTPS works now!'''&lt;br /&gt;
&lt;br /&gt;
====Fixing cfhttp Connection Failures with Portecle====&lt;br /&gt;
If you'd rather import certificates into the Java SSL Keystore through a GUI, follow these directions to use a tool named Portecle to do so:&lt;br /&gt;
&lt;br /&gt;
#Ensure your JAVA_HOME variable is set correctly as described above.&lt;br /&gt;
#Download Portecle from Sourceforge: [http://sourceforge.net/projects/portecle/ Portecle Project Homepage]&lt;br /&gt;
#Extract the files&lt;br /&gt;
#Open a Command Prompt and navigate to the extracted directory&lt;br /&gt;
#Issue this command to launch Portecle: &amp;lt;pre&amp;gt;java -jar portecle.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#In Notepad, open your jvm.config file to find the JVM PATH for ColdFusion's JVM; look for '''java.home={path here}'''&lt;br /&gt;
#In Portecle click ''File'', ''Open Keystore File''&lt;br /&gt;
#Browse to {JVM PATH}\jre\lib\security to the path, and open the cacerts file; Enter Password: '''changeit'''&lt;br /&gt;
#Click on '''Tools''', '''Import Trusted Certificate''', select the certificate you wish to import.&lt;br /&gt;
#*To obtain the certificate, you can navigate in a browser to the site where the certificate resides, then download the certificate to a CER (X.509 format) file through the browser.&lt;br /&gt;
#Click '''OK''' to import and '''YES''' to accept the certificate as ''trusted''.&lt;br /&gt;
#Click OK again, usually you won't need to change the Alias name;click OK to finish.&lt;br /&gt;
#Click '''File''', '''Save Keystore'''.&lt;br /&gt;
Close Portecle.&lt;br /&gt;
====Fixing CFHTTP Failures Related to Cached DNS Records====&lt;br /&gt;
This solution will prevent Java from caching DNS records for the life of the ColdFusion process. Instead, Java will refresh its records periodically.&lt;br /&gt;
&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable to find the location of the Java installation used by ColdFusion. &lt;br /&gt;
&lt;br /&gt;
For '''example''', on '''Windows''' you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
On '''Linux''' you may see this:&lt;br /&gt;
    java.home=/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
Navigate to the '''security''' folder within the Java installation used by ColdFusion. For '''example''':&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows''' ''(open in Windows Explorer)''&lt;br /&gt;
    C:\ColdFusion10\jre\lib\security\&lt;br /&gt;
'''Linux\cPanel'''&lt;br /&gt;
    cd /opt/coldfusion10/jre/lib/security/&lt;br /&gt;
&lt;br /&gt;
Back-up, then edit the '''java.security''' file within that folder and change the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
'''From'''&lt;br /&gt;
    #networkaddress.cache.ttl=-1&lt;br /&gt;
'''To'''&lt;br /&gt;
    networkaddress.cache.ttl=600&lt;br /&gt;
&lt;br /&gt;
''Note:'' The above value refreshes DNS records every 600 seconds ''(10 minutes)''. You may adjust it to whatever you feel is appropriate for your server.&lt;br /&gt;
&lt;br /&gt;
Now '''Save''' the file then '''Restart ColdFusion''', and the new DNS caching setting will take effect.&lt;br /&gt;
&lt;br /&gt;
==CFMAIL Multi-Part Emails==&lt;br /&gt;
Sending emails with both Text and HTML parts helps reduce the chance of your messages getting caught by a mail server's spam filter. It also helps ensure your recipients can read the message regardless of the mail client being used. The easiest way to do this is to store your message in a variable using &amp;lt;cfsavecontent&amp;gt; then adding it to &amp;lt;cfmail&amp;gt; using &amp;lt;cfmailpart&amp;gt; as shown in the example below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Store your message in a variable ---&amp;gt;&lt;br /&gt;
&amp;lt;cfsavecontent variable=&amp;quot;myemailcontent&amp;quot;&amp;gt;&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
This is some plain text. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;And this is some more text in HTML. It will appear in plain-text for anyone who views the Text part of this email, though.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/cfsavecontent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- Function to strip HTML from message while preserving line breaks ---&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name= &amp;quot;textMessage&amp;quot; access= &amp;quot;public&amp;quot; returntype= &amp;quot;string&amp;quot; hint= &amp;quot;Converts an html email message into a nicely formatted with line breaks plain text message&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfargument name= &amp;quot;string&amp;quot; required= &amp;quot;true&amp;quot; type= &amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfscript&amp;gt;&lt;br /&gt;
      var pattern = &amp;quot; &amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
      var CRLF = chr( 13) &amp;amp; chr( 10);&lt;br /&gt;
      var message = ReplaceNoCase(arguments.string, pattern, CRLF , &amp;quot;ALL&amp;quot;);&lt;br /&gt;
      pattern = &amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;;&lt;br /&gt;
    &amp;lt;/cfscript&amp;gt;&lt;br /&gt;
    &amp;lt;cfreturn REReplaceNoCase(message, pattern, &amp;quot;&amp;quot; , &amp;quot;ALL&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!--- Now send the email. When adding the Text part, we'll use the textMessage() function we just created to strip out HTML tags. ---&amp;gt;&lt;br /&gt;
&amp;lt;cfmail from=&amp;quot;sender@domain.com&amp;quot; to=&amp;quot;recipient@anotherdomain.com&amp;quot; subject=&amp;quot;Multi-part Email with CFMAIL&amp;quot; type=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/plain&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#textmessage(myemailcontent)#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/html&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#myemailcontent#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: [http://cookbooks.adobe.com/post_CFMAIL_the_right_way-17875.html CFMAIL the right way]&lt;br /&gt;
&lt;br /&gt;
==Scheduling Tasks in ColdFusion==&lt;br /&gt;
On occasion shared ColdFusion hosting customers need to setup Scheduled Task to run files on a cycle. &lt;br /&gt;
&lt;br /&gt;
This can be done with the following steps, making use of ColdFusion's &amp;lt;cfschedule&amp;gt; tag:&lt;br /&gt;
&lt;br /&gt;
#Create a file locally using any text editor, save the file with the .CFM extension (example: setschedule_example.cfm).&lt;br /&gt;
#Copy and past in the code example below taken from ''ColdFusion's Documentation'' and save.&lt;br /&gt;
#Replace the data in the example note the following recommendations.&amp;lt;br /&amp;gt;!- Name each file made for creating a schedule with the name of the task so you can reference the task later if needed. Specific naming will also make it more difficult for someone to randomly run the file.&amp;lt;br /&amp;gt;!- If you need to schedule a job to run monthly on any date in the range 28-31, read about how ColdFusion will handle the scheduling in the ColdFuison8 documentation referenced below.&lt;br /&gt;
#Working example, the code example below is a working tested solution for getting the weather for a specific zip code and the task to email the results.&lt;br /&gt;
&lt;br /&gt;
'''Scheduled Task'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- This sets the initial task, if your just wanting to set the schedule --&amp;gt;&lt;br /&gt;
&amp;lt;cfschedule action = &amp;quot;update&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot; &lt;br /&gt;
    operation = &amp;quot;HTTPRequest&amp;quot;&lt;br /&gt;
    url = &amp;quot;http://test.hostek.net/weather_send.cfm&amp;quot;&lt;br /&gt;
    startDate = &amp;quot;7/6/09&amp;quot;&lt;br /&gt;
    startTime = &amp;quot;09:30 AM&amp;quot;&lt;br /&gt;
    interval = &amp;quot;3600&amp;quot;&lt;br /&gt;
    resolveURL = &amp;quot;Yes&amp;quot;&lt;br /&gt;
    requestTimeOut = &amp;quot;600&amp;quot;&lt;br /&gt;
    mode = &amp;quot;application&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task created to be deleted, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;delete&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task to be paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;pause&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task resumed if paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;resume&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Weather Collector'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;CF External Weather Checker&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfset zip=&amp;quot;12345&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;cfinvoke webservice=&amp;quot;http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl&amp;quot; method=&amp;quot;getCityWeatherByZIP&amp;quot; returnvariable=&amp;quot;aWeatherReturn&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cfinvokeargument name=&amp;quot;ZIP&amp;quot; value=&amp;quot;#zip#&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aWeatherReturn.temperature EQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt; I cannot get the weather for #zip# external http connections must be DOWN.&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;cfset message=&amp;quot;The temperature for #zip# (Your city) is #aWeatherReturn.temperature# degrees.&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif message NEQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfmail from = &amp;quot;weather.server@test.com&amp;quot; to = &amp;quot;test@test.com&amp;quot; subject = &amp;quot;Weather checker&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#message#&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note''': We highly recommend setting the ''mode'' attribute of cfschedule to ''application''. This will ensure your site's application is the only one allowed to modify the task. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''More information on using CFSchedule'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/cfschedule Adobe ColdFusion Documentation - CFSchedule]&lt;br /&gt;
*[http://www.isummation.com/blog/configuring-coldfusion-scheduled-tasks-using-the-cfschedule-tag/ iSummation Blog - Configuring ColdFusion Scheduled Tasks using the CFSCHEDULE tag]&lt;br /&gt;
&lt;br /&gt;
==Session Management - Handling Bots and Spiders==&lt;br /&gt;
===Robots.txt File===&lt;br /&gt;
First and foremost we suggest creating a robots.txt file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time. Second to prevent specific bots from crawling the website. &lt;br /&gt;
&lt;br /&gt;
Please see our [[Robots|robots.txt article]] for more information on implementing a robots.txt on your site.&lt;br /&gt;
&lt;br /&gt;
===Lower Session Timeouts for Bots and Spiders===&lt;br /&gt;
Next we suggest setting your session timeout specifically lower for bots and spiders. These spiders and bots will crawl a page and when a session (ColdFusion) is created, it will persist during then entire page load. The page fully loaded allows the bot or spider to get the information from the Web page AND allows the session to expire quickly protecting ColdFusion from effects similar to a memory leak. &lt;br /&gt;
&lt;br /&gt;
To do this, implement the appropriate solution for your site below:&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfm'''====&lt;br /&gt;
Place this code at the top of your Application.cfm file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then use the '''REQUEST.sessionTimeout''' variable to specify the session timeout period in your '''cfapplication''' tag: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication name=&amp;quot;myawesomeapp&amp;quot;&lt;br /&gt;
     sessionmanagement=&amp;quot;Yes&amp;quot;&lt;br /&gt;
     sessiontimeout=&amp;quot;#REQUEST.sessionTimeout#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (tag-based)====&lt;br /&gt;
If you primarily use cfml tags in your Application.cfc, you can set the Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
 &amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (cfscript)====&lt;br /&gt;
If instead, you're using cfscipt in your Application.cfc, you'll set the custom Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
// This checks if a cookie is created, for bots this will return false and use the low session timeout&lt;br /&gt;
if (StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) || StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)){&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,30,0);&lt;br /&gt;
} else {&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,0,2);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.bennadel.com/blog/1083-ColdFusion-Session-Management-And-Spiders-Bots.htm Session Management code examples for the Application.cfm]&lt;br /&gt;
&lt;br /&gt;
==Creating Client Variables Tables for MySQL Databases==&lt;br /&gt;
If you need your datasource set up as a ColdFusion Client Variables Store, you can enable the '''Client Variables'' option in your ColdFusion datasource within the WCP control panel. &lt;br /&gt;
&lt;br /&gt;
Please note, if your datasource MySQL DSN, you'll need to create the necessary tables prior to using the Client Variable Store. To do this you would need to create two tables, one named &amp;quot;cdata&amp;quot; and one named &amp;quot;cglobal&amp;quot;. The SQL you'd use to create those tables is below:&lt;br /&gt;
&lt;br /&gt;
Table: '''cdata'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
 CREATE TABLE IF NOT EXISTS cdata (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          app varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          PRIMARY KEY (cfid,app)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Table: '''cglobal'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS cglobal (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          lvisit timestamp,&lt;br /&gt;
          KEY cfid (cfid),&lt;br /&gt;
          KEY lvisit (lvisit)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Output CF Error details without CFDump==&lt;br /&gt;
It is common in an error handler that you want to output all of the error details to the screen, a file, or an email. Therefore, the cfdump tag is commonly used for this; and, while this works well in development, it is not always the best practice on a production site because of the performance of the cfdump tag due to its use of reflection (Runtime type introspection).&lt;br /&gt;
&lt;br /&gt;
A better performing alternative is to output the information you want directly from the Error/Exception struct within a 'cfoutput' tag. This can be done by looking up the cferror structure or the cfcatch structure in the ColdFusion docs to see what is available and what values you might want to output:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Error''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cferror&amp;lt;br /&amp;gt;&lt;br /&gt;
'''CFCatch''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cfcatch&lt;br /&gt;
&lt;br /&gt;
===Cfdump Custom Tag Alternative===&lt;br /&gt;
You can also use the following link to download an example CF custom tag that will give a similar error output as when using the cfdump tag on an error variable:&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the custom tag's usage:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the error handler specified in your 'cferror' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cf_OutputError Error=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code would replace:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfdump var=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in a cfcatch block:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cftry&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;cfcatch&amp;gt;&lt;br /&gt;
   &amp;lt;cf_OutputCFCatch CFCatch=&amp;quot;#CFCatch#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/cfcatch&amp;gt;&lt;br /&gt;
&amp;lt;/cftry&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configure ColdFusion to Handle html and htm Files==&lt;br /&gt;
===Enable HTML/HTM as CFML on Shared Accounts===&lt;br /&gt;
On our ColdFusion servers, the best way to process HTML files (.html, .htm) as ColdFusion/CFML (.cfm files) is by using a set of rewrite rules that route the HTML files through a ColdFusion &amp;quot;controller&amp;quot; script. The main benefits of this approach are that it is easy to implement on a site-by-site basis, and it works with any version of ColdFusion. To implement this approach on your site, follow the steps below:&lt;br /&gt;
====Step 1: Add Rewrite Rules to Route HTML Files through the CFM Controller====&lt;br /&gt;
If you have a '.htaccess' file in your webroot, add the rules below to the top of that file. Otherwise, create a file named '.htaccess' in your site's web root and place these rules within it:&lt;br /&gt;
=====For Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.html htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====For Sites Using .HTM Files=====&lt;br /&gt;
'''NOTE:''' If your site uses ''.htm'' files instead of ''.html'' files, use this set of rules instead. The only difference is ''html'' is replaced with ''.htm''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.htm htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 2: Create the ColdFusion Controller Script (htmlcontrol.cfm)====&lt;br /&gt;
Now we just need to create a ColdFusion script that will process the HTML files. To do this, create a file named '''htmlcontrol.cfm''' within your site's web root. Place this CFML code within the file:&lt;br /&gt;
=====CFML for Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.html&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====CFML for Sites Using .HTM Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.htm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you save the controller script, your site will begin processing any ColdFusion/CFML code within your HTML files.&lt;br /&gt;
===Enable HTML/HTM as CFML on a VPS===&lt;br /&gt;
In case you need to process ColdFusion code in your .htm or .html files, here is what you will need to do to get this to work. This is based on using ColdFusion on one of our dedicated server hosting accounts on a Windows server.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This will affect every site on the server, so use cautiously.&lt;br /&gt;
&lt;br /&gt;
First, you will need to edit the web.xml file located generally at C:\ColdFusion10\cfusion\wwwroot\WEB-INF&lt;br /&gt;
&lt;br /&gt;
Open this file and look for '''coldfusion_mapping_1'''.&lt;br /&gt;
&lt;br /&gt;
Scroll down the file until you see the last number increment like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;servlet-mapping id=&amp;quot;macromedia_mapping_15&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then add the following right below the closing &amp;lt;/servlet-mapping&amp;gt; of the last number increment item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_16&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_17&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_18&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_19&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save this file and exit.&lt;br /&gt;
&lt;br /&gt;
Now in IIS, setup a mapping for the site:&lt;br /&gt;
#In IIS 7+ click the server name section (right below the '''Start Page''' in the left-hand navigation), then double-click the '''Handler Mappings''' icon.&lt;br /&gt;
#Select and &amp;quot;edit&amp;quot; the '''*.cfm''' record and copy the value of &amp;quot;executable&amp;quot;. Now hit Cancel and then click '''Add Script Map'''. &lt;br /&gt;
#Paste the executable value copied from the '''*.cfm''' record and type '''*.htm''' into the '''Request Path''' and hit OK. &lt;br /&gt;
#Repeat the above steps to add a handler for '''*.html''' &lt;br /&gt;
&lt;br /&gt;
Lastly, open the '''uriworkermap.properties''' file for your ColdFusion 10 IIS Connector in a text editor such as Notepad. On a standard ColdFusion installation this is located at: &amp;lt;pre&amp;gt;C:\ColdFusion10\config\wsconfig\1\uriworkermap.properties&amp;lt;/pre&amp;gt;&lt;br /&gt;
Copy the following lines, paste them at the bottom of the file, then save and close the file: &amp;lt;pre&amp;gt;/*.html = cfusion&lt;br /&gt;
/*.htm = cfusion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the ColdFusion service and IIS. ColdFusion should begin processing CFML within htm/html files now.&lt;br /&gt;
&lt;br /&gt;
==Increase the ColdFusion Post Parameters Limit==&lt;br /&gt;
===ColdFusion 10===&lt;br /&gt;
In ColdFusion 10, you can easily increase the value of ColdFusion's '''postParametersLimit''' via the ColdFusion Administrator. Once logged into the ColdFusion Administrator, click the '''Settings''' link then scroll to the bottom of the page. Set the value for the Post Parameters Limit to the desired limit and click the submit button. &lt;br /&gt;
===ColdFusion 9 and below===&lt;br /&gt;
To adjust the Post Parameters Limit setting in ColdFusion 9 and below, you will have to edit the server's '''neo-runtime.xml''' file which is located here on a standard installation: &amp;lt;pre&amp;gt;C:\ColdFusion9\lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open that file in a text editor such as Notepad, then search for the '''postSizeLimit''' tag. It will look similar to this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postSizeLimit'&amp;gt;&amp;lt;number&amp;gt;100.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediately after that set of tags, paste this chunk of text: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postParametersLimit'&amp;gt;&amp;lt;number&amp;gt;1000.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once you've adjusted the file, you'll just need to save your changes and restart ColdFusion for the new setting to go into effect. '''Note''': The value of '''1000''' is just an example, so you can increase it as needed. &lt;br /&gt;
&lt;br /&gt;
==Loading custom Java library or Java Libraries (jar or class files) in ColdFusion 10==&lt;br /&gt;
ColdFusion 10 makes it easy to load Java libraries into your ColdFusion application without having to restart ColdFusion. All that's required is your application define the 'THIS.javaSettings' attribute within the site's Application.cfc like below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.javaSettings = {LoadPaths = [&amp;quot;/javafiles/&amp;quot;], loadColdFusionClassPath = true, reloadOnChange=false}/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will check the ''javafiles'' directory in your Web root for 'jar' and 'class' files and make any libraries within the directory accessible from your ColdFusion application. If you modify the JAR files in your ''javafiles'' directory though, ColdFusion will need to be restarted to load the new versions of the JAR files. &lt;br /&gt;
&lt;br /&gt;
'''References''': &lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/Enhanced+Java+integration+in+ColdFusion+10 Adobe ColdFusion Documentation - Enhanced Java Integration in ColdFusion]&lt;br /&gt;
*[http://www.raymondcamden.com/2014/6/16/Issue-with-ColdFusion-JavaSettings-and-ReloadOnChange Ray Camden's Blog - Issue with ColdFusion JavaSettings and ReloadOnChange]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Permission denied for creating Java object: coldfusion.server.ServiceFactory''==&lt;br /&gt;
===When using Mura or using Transfer ORM===&lt;br /&gt;
====Issue====&lt;br /&gt;
If you are using '''Mura''' or using '''Transfer ORM''' and you get this error, ''Permission denied for creating Java object: coldfusion.server.ServiceFactory'', you are likely using an outdated version of Mura and also are probably on a ColdFusion 9 server. The Transfer ORM component causing this issue has not been updated to work with ColdFusion 9. There is a quick fix though:&lt;br /&gt;
====Solution====&lt;br /&gt;
Find the file named CFMLVersion.cfc which should be at '''/wwwroot/requirements/transfer/com/factory'''.&lt;br /&gt;
&lt;br /&gt;
Edit that file and find the line that has:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And change that to:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;) OR server.coldfusion.productversion.startsWith(&amp;quot;9&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save the file and it should now work.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Since this is likely running an outdated version of Mura, we highly recommend updating Mura to the latest version to take advantage of numerous performance and security enhancements.&lt;br /&gt;
===When using DataMgr===&lt;br /&gt;
If you get this error while using DataMgr.cfc, the changes described below will solve this problem:&lt;br /&gt;
&lt;br /&gt;
Here is the section of code from the original DataMgr.cfc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection = getConnection()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset db = connection.getMetaData().getDatabaseProductName()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection.close()&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = db2&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is what the modified code should look like (this sample assume MySQL)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of changes''':&lt;br /&gt;
&lt;br /&gt;
These 3 lines were commented out:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line needed quotes around db2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And lastly, this line needed added:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you are using an ''MS Access'' database instead of ''MySQL'', replace '''MYSQL''' with '''msaccessjet''' on the line that is added.&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Security: The requested template has been denied access to {file/directory}''==&lt;br /&gt;
===Issue===&lt;br /&gt;
Our shared servers have ColdFusion Sandbox Security enabled, which requires absolute filesystem paths to be provided to tags and functions that interact with the filesystem. If you receive an error that starts with ''Security: The requested template has been denied access to ...'', then it is followed by a relative path, you'll need to replace the relative path with a full path.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
One way to do this is to hard-code the path (''d:\home\sitename.com\wwwroot\filename.jpg''), but that can cause portability problems if your site is ever moved to a different environment. &lt;br /&gt;
&lt;br /&gt;
A better way to do this would be to &amp;quot;wrap&amp;quot; your relative path with the '''ExpandPath()''' function. The ''ExpandPath()'' function will automatically detect the absolute filesystem path to the file, and ColdFusion will no longer give you a permissions error. &lt;br /&gt;
&lt;br /&gt;
'''More info''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/ExpandPath Adobe Documentation - ExpandPath]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion COM Object Error ''java.lang.RuntimeException: Can not use native code: Initialisation failed''==&lt;br /&gt;
The error ''java.lang.RuntimeException: Can not use native code: Initialisation failed'' is related to calling a 32-bit COM object from within a 64-bit ColdFusion installation. &lt;br /&gt;
&lt;br /&gt;
The simplest way to bypass this error is to write a small ASP Webservice to proxy the call to the COM object as shown in '''Option 2''' of this blog post: [http://coldfusion9.blogspot.com/2010/05/32-bit-components-on-64-bit-coldfusion.html 32-bit Components on 64-bit ColdFusion]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can [https://support.hostek.com/ ask Support] to move your site to a 32-bit ColdFusion server.&lt;br /&gt;
&lt;br /&gt;
==Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated Server==&lt;br /&gt;
To use Seefusion, visit the address mentioned in your server's Welcome email.&lt;br /&gt;
&lt;br /&gt;
Once loaded, you'll see a summary of memory consumption, average response time, number of requests processed by ColdFusion per second, and a view of currently running ColdFusion requests. &lt;br /&gt;
===Finding Scripts to Optimize===&lt;br /&gt;
When using Seefusion it is helpful to look at the '''Slow''' section of the request monitor. This will show you recent requests that took longer than 8 seconds to complete, giving you a good idea of what scripts need optimization. &lt;br /&gt;
===Stack Tracing with Seefusion===&lt;br /&gt;
Additionally, when a request is running in the '''Active''' section of Seefusion's request monitor, you can click the paper stack icon to the left of the request to view a stack trace of the request. A stack trace tells you what line of code is currently being processed by the request. &lt;br /&gt;
&lt;br /&gt;
Once the stack trace loads, start at the top and work your way down until you find a recognizable path to a ColdFusion template (''eg. c:\home\mysite.com\wwwroot\index.cfm: 47''). This tells you the template currently being executed followed by the line number being processed at that moment in time. If a request consistently shows the same line of code in subsequent stack traces, then you've found the main area to focus on optimizing.&lt;br /&gt;
&lt;br /&gt;
To make deciphering stack traces easier, you can also click the '''Seestack''' button at the top of the stack trace window. This will send the stack trace to a service that will analyze the trace and attempt to tell you where you need to focus.&lt;br /&gt;
&lt;br /&gt;
===Viewing Metrics over Time===&lt;br /&gt;
If you want to watch how response times and memory utilization in a more granular manner than the dashboard graphs show, you'll want to click the '''Counters''' button at the top of SeeFusion. Once on the Counters page you can select a time interval, then have Seefusion display performance metrics at the interval you selected. This is helpful to ensure requests are completing quickly and not exhausting ColdFusion's memory.&lt;br /&gt;
&lt;br /&gt;
==How to Wrap Your ColdFusion DSN with Seefusion==&lt;br /&gt;
If you wish to have Seefusion monitor your server's query activity, you'll need to &amp;quot;wrap&amp;quot; your DSN with SeeFusion's JDBC driver so Seefusion can monitor the DSN's activity. &lt;br /&gt;
===Install SeeDSN===&lt;br /&gt;
SeeDSN is a plugin for ColdFusion Administrator that makes it easy to wrap a DSN with Seefusion. Follow these directions to install SeeDSN:&lt;br /&gt;
#Download the SeeDSN archive [http://www.seefusion.com/seedsn_v1.1.zip here].&lt;br /&gt;
#Extract the '''seedsn''' folder within the archive to your '''/CFIDE/Administrator/''' folder. This means it will be located at ''/CFIDE/Administrator/seedsn'' once extracted. &lt;br /&gt;
#Move ''/CFIDE/Administrator/seedsn/custommenu.xml'' to ''/CFIDE/Administrator/custommenu.xml''&lt;br /&gt;
===Add Seefusion.jar to the ColdFusion Classpath===&lt;br /&gt;
In order for ColdFusion to use Seefusion's JDBC driver, you'll need to ensure '''seefusion.jar''' is on your ColdFusion class path. Follow these directions to add seefusion.jar to the Coldfusion class path:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Click the '''Java and JVM''' link on the left, under Server Settings.&lt;br /&gt;
#In the box labeled '''ColdFusion Class Path''' add the path to your '''seefusion.jar''' file and click ''Submit Changes''. For example, if it is located in ColdFusion's &amp;quot;WEB-INF\lib&amp;quot; folder, you can add this to the Class Path: '''{application.home}/wwwroot/WEB-INF/lib/seefusion.jar'''. &lt;br /&gt;
#*Each path in the ColdFusion Class Path is separated by a comma, so be sure to add a comma right before the path to seefusion.jar (do not add any spaces).&lt;br /&gt;
#Restart ColdFusion after modifying the class path&lt;br /&gt;
&lt;br /&gt;
===Wrap a DSN using SeeDSN===&lt;br /&gt;
Once you've installed SeeDSN and restarted ColdFusion, you can wrap a DSN with the SeeFusion JDBC driver. Follow these instructions to do so: &lt;br /&gt;
#Log into ColdFusion Administrator&lt;br /&gt;
#Expand the ''SeeFusion'' navigation menu on the left and click '''Datasource Wrapper'''&lt;br /&gt;
#On the ''Datasource Wrapper'' page, you'll see a list of DSNs on your server. To wrap a DSN, click the ''Start'' [[File:Start.png]] icon next to your DSN. SeeDSN will automatically wrap your DSN with the SeeFusion driver and display '''OK''' if it is successful.&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/ WebApper Blog - Using SeeDSN JDBC Wrapping Tool]&lt;br /&gt;
&lt;br /&gt;
==Using fckEditor on ColdFusion 10 or Higher==&lt;br /&gt;
When getting the following error for fckEditor:&lt;br /&gt;
 '''&amp;quot;The server didn't reply with a proper XML data. Please check your configuration.&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
If you are on a ColdFusion 10+ server this will be cause by the '''FileUpload()''' function that is being used.&lt;br /&gt;
In ColdFusion 10+ ''FileUpload'' is a built-in function name, so you'll need to rename the ''FileUpload'' function used in fckeditor.&lt;br /&gt;
You can update the text for fckeditor by changing all instances of &amp;quot;FileUpload&amp;quot; to &amp;quot;fckFileUpload&amp;quot; to remove this conflict.&lt;br /&gt;
&lt;br /&gt;
==Optimze CFIMAGE Rendering in Three Steps==&lt;br /&gt;
===USE===&lt;br /&gt;
When full size images are required, re-sized images need to be used for displaying smaller images or thumbnails and the application needs to perform at optimal speed for displaying images in a browser. &lt;br /&gt;
&lt;br /&gt;
===KEY POINTS===&lt;br /&gt;
Except for during development cfimage '''action=&amp;quot;writeToBrowser&amp;quot;''' should not be used to display images.&lt;br /&gt;
Use CFIMAGE to resize images ''ONCE'', if possible during upload but if page timeouts make this impossible break up the task by using a CFC to check and re-size images as needed.&lt;br /&gt;
&lt;br /&gt;
===SUMMARY===&lt;br /&gt;
Those sites that display many images often times also upload many photos via form or via FTP and need to display both the FULL size images and smaller images for thumb nails or ''(small, med, large)'' optional sizes. The process of uploading images using CFFile can impose time constraints specifically for large files, or if the coldfusion page timeouts are set lower than is possible for large file upload and re-size jobs. To overcome this issue we can write a simple CFC for resizing the images after the upload is complete and the page is run for the first time. This will be ideal for either form based upload or FTP upload making this solution very versatile. &lt;br /&gt;
&lt;br /&gt;
====Step 1 - Create the CFC for re-sizing and writing images to disk====&lt;br /&gt;
&lt;br /&gt;
Create file &amp;quot;GetResizedImage.cfc&amp;quot; in the directory with the CFM files that display images.&lt;br /&gt;
Use the code below for the contents of this file and modify as needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;GetImage&amp;quot; hint=&amp;quot;Re-sizes images for display in album&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the image path where photos exist ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset imgpath = &amp;quot;imgdir/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the domain path, allows reuse resized images on other sites ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset domain = &amp;quot;domain.com&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Re-writes image extension if for alternates of JPG, and adds _resized to differentiate from fullsize images ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset rfile= &amp;quot;#REReplace(&amp;quot;#img#&amp;quot;,&amp;quot;.(jpg|JPG|JPEG|jpeg)&amp;quot;,&amp;quot;_resized.jpg&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Checks if file is already resized ---&amp;gt;&lt;br /&gt;
        &amp;lt;cfif FileExists(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp;&amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#rfile#&amp;quot;)&amp;gt;&lt;br /&gt;
           &amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;!--- Resizes image if it has not been done already ---&amp;gt;&lt;br /&gt;
            &amp;lt;cfset myImage=ImageNew(URLDecode(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp; &amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#img#&amp;quot;))&amp;gt;&lt;br /&gt;
                    &amp;lt;cfset ImageResize(myImage,&amp;quot;175&amp;quot;,&amp;quot;175&amp;quot;,&amp;quot;bilinear&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;!--- Saves image, and to eliminate problems with url friendly encoding when getting our images re-replace %20 with no-space ---&amp;gt;&lt;br /&gt;
                    &amp;lt;cfimage source=&amp;quot;#myImage#&amp;quot; action=&amp;quot;write&amp;quot; overwrite=true destination=&amp;quot;d:\home\#domain#\wwwroot\#imgpath##REReplace(&amp;quot;#rfile#&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot; &amp;quot;,&amp;quot;ALL&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the new path for the image for browser output ---&amp;gt;&lt;br /&gt;
			&amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;!--- Return the image variable ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfreturn myImage&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2 - Invoke the CFC====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Generate image name from query ---&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput query=&amp;quot;MyEvent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Invoke CFC to check if resized image exists, if not resize and output URL for resized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvoke component=&amp;quot;GetResizedImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare what part of the CFC handles checking / getting the image ---&amp;gt;&lt;br /&gt;
	method=&amp;quot;GetImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare variable that will pass back the new image name ---&amp;gt;&lt;br /&gt;
	returnvariable=&amp;quot;myImage&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvokeargument name=&amp;quot;img&amp;quot; value=&amp;quot;#event.Pic#&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&amp;lt;!--- Display re-sized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;img src=&amp;quot;#myImage#&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;     &lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 3 - Test====&lt;br /&gt;
The proposed solution cut page load times from 20+ seconds to below one second after the first page load. During the FIRST or FIRST FEW times the page loads all the re-sizing will be done.&lt;br /&gt;
&lt;br /&gt;
===Q and A===&lt;br /&gt;
'''Question''': Checking if a file exists each time the page loads is excessive.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Answer''': We agree but it's much better than resizing every image each time the page loads.&lt;br /&gt;
&lt;br /&gt;
==How to create Services for Additional ColdFusion Instances==&lt;br /&gt;
If you've created additional ColdFusion instances on your VPS/Dedicated Server, and ColdFusion was unable to create the Services for those instances just do the following:&lt;br /&gt;
&lt;br /&gt;
#Open a Command Prompt as Administrator&lt;br /&gt;
#Run this command, replacing INSTANCE with the actual name of your new ColdFusion instance: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;sc create &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; binPath= &amp;quot;C:\ColdFusion10\INSTANCE\bin\coldfusionsvc.exe&amp;quot; displayname= &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; start= auto&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start your instance through the Windows Services Manager. If you need to know how to create additional ColdFusion instances, please see this guide from Adobe: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSAB4367BA-6D91-4c69-8DBA-E2839394658A.html Defining Additional ColdFusion Instances]&lt;br /&gt;
&lt;br /&gt;
Once you've created the instances, you can attach them to your Web server as described here: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363a5d-7ffc.html Web Server Configuration]&lt;br /&gt;
&lt;br /&gt;
If you're using IIS, this video has a great walkthrough for using the ColdFusion Web Server Connector tool: [http://blogs.coldfusion.com/post.cfm/video-learn-about-iis-connectors-in-coldfusion10 Learn About ColdFusion IIS Connectors]&lt;br /&gt;
&lt;br /&gt;
==How to Fix Error: Value '0000-00-00' can not be represented as java.sql.Date==&lt;br /&gt;
If your application has null values in a MySQL datetime/date column you may encounter the error &amp;quot;Value '0000-00-00' can not be represented as java.sql.Date&amp;quot;. The easiest way to fix this is by adding the parameter '''zeroDateTimeBehavior=convertToNull''' to your site's DSN [http://helpx.adobe.com/coldfusion/kb/mysql-error-java-sql-sqlexception.html as recommended by Adobe].&lt;br /&gt;
===How to Fix Null DateTime Error - '''Shared Hosting'''===&lt;br /&gt;
#Log into your site's WCP control panel&lt;br /&gt;
#Click the ''DataSources (DSNs)'' button&lt;br /&gt;
#Click the ''Edit'' icon next to your DataSource (DSN)&lt;br /&gt;
#Add the following to the '''JDBC Query Parameters''' field: &amp;lt;pre&amp;gt;zeroDateTimeBehavior=convertToNull&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' To add multiple JDBC Query Parameters, separate each name/value pair by an ''''&amp;amp;''''. &lt;br /&gt;
''Example: zeroDateTimeBehavior=convertToNull&amp;amp;characterEncoding=UTF-8''&lt;br /&gt;
===How to Fix Null DateTime Error - '''VPS Hosting'''===&lt;br /&gt;
If your site uses WCP to manage its DSNs, you may utilize the Shared Hosting solution. Otherwise, follow the steps below:&lt;br /&gt;
#Log into ColdFusion Administrator on your VPS/Dedicated Server. &lt;br /&gt;
#Navigate to the &amp;quot;Data Sources&amp;quot; page and click your site's DSN name.&lt;br /&gt;
#On the page that opens add '''?zeroDateTimeBehavior=convertToNull''' to the end of the JDBC URL field.&lt;br /&gt;
#Click '''Submit''' and your site should no longer display the date representation error.&lt;br /&gt;
&lt;br /&gt;
==Find the Java Version Used by ColdFusion or Railo==&lt;br /&gt;
This CFML code will report the version of Java used by your ColdFusion or Railo server:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;#CreateObject(&amp;quot;java&amp;quot;, &amp;quot;java.lang.System&amp;quot;).getProperty(&amp;quot;java.version&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference:''' [http://www.petefreitag.com/item/743.cfm Pete Freitag's Blog - What Version of Java is ColdFusion Using?]&lt;br /&gt;
&lt;br /&gt;
==Reset ColdFusion Admin Password on CF 10+ VPS==&lt;br /&gt;
===Reset CF Admin Password - Windows VPS===&lt;br /&gt;
*On your VPS, open a command prompt window as Administrator&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.bat'' script: &amp;lt;pre&amp;gt;.\passwordreset.bat&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===Reset CF Admin Password - cPanel/Linux VPS===&lt;br /&gt;
*SSH into your VPS&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd /opt/ColdFusion10/cfusion/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.sh'' script: &amp;lt;pre&amp;gt;./passwordreset.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
==ColdFusion 11+ PDF Generation: How to Fix 'No Service Manager is Available' Error==&lt;br /&gt;
If you receive the error '''No Service Manager is Available''' when trying to generate PDFs or use the cfhtmltopdf tag on your ColdFusion 11+ VPS, do the following to fix it:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Expand ''Data &amp;amp; Services'', then click the '''PDF Service''' link&lt;br /&gt;
#On the next page, you should see an entry for ''localhost'' under the list of PDF Service Managers&lt;br /&gt;
#If the localhost service manager is not enabled, click the ''Enable'' button to the left of the manager name. (The button looks like a ''play'' button)&lt;br /&gt;
#Try using cfhtmlpdf now, and see if it works. &lt;br /&gt;
&lt;br /&gt;
If you still have any issues after enabling the service manager, try restarting the '''ColdFusion Addon Services''' Windows service and test again.&lt;br /&gt;
&lt;br /&gt;
==HTML5 Audio Player with ColdFusion==&lt;br /&gt;
This player uses an list named ''Tunes'' within the ''session'' scope to store a list of mp3 names. After populating the list, you can use this code as the foundation for an HTML audio player that plays each song in the list.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfif action is &amp;quot;play_next_tune&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfset myArray=ListtoArray(session.Tunes)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset T_max=Arraylen(myArray)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset session.track=session.track+1&amp;gt;&lt;br /&gt;
	&amp;lt;cfif session.track GT T_max&amp;gt;&lt;br /&gt;
		 &amp;lt;cfset session.track=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
		 &amp;lt;cflocation url=&amp;quot;tunespage.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
		&amp;lt;audio controls id=&amp;quot;myVideo&amp;quot; autoplay&amp;gt;&lt;br /&gt;
		&amp;lt;source src=&amp;quot;path/#myarray[session.track]#&amp;quot; type=&amp;quot;audio/mpeg&amp;quot;&amp;gt;&lt;br /&gt;
		Your browser does not support the audio element.&lt;br /&gt;
		&amp;lt;/audio&amp;gt;&lt;br /&gt;
	&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
		document.getElementById('myVideo').addEventListener(&amp;quot;ended&amp;quot;,function() {&lt;br /&gt;
		window.location.href=&amp;quot;tunespage.cfm?action=play_next_tune&amp;quot;;&lt;br /&gt;
		});&lt;br /&gt;
	&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Cfchart error: Could not locate the style file style.xml==&lt;br /&gt;
In ColdFusion 11 the ability to specify styles in an XML file was removed. As such, you will need to convert any XML stylesheets to json files. To do this, you'll need to do the following:&lt;br /&gt;
*Install a trial edition of ColdFusion 11 on your local computer&lt;br /&gt;
*Open a command prompt and run this command:&lt;br /&gt;
**&amp;lt;pre&amp;gt;C:\ColdFusion11\cfusion\bin\cfchart_xmltojson.bat C:\sites\mysite.com\cfchartstyle.xml&amp;lt;/pre&amp;gt;&lt;br /&gt;
**Be sure to replace the paths above with the actual path to &amp;quot;cfchart_xmltojson.bat&amp;quot; as well as the path to your XML stylesheet.&lt;br /&gt;
*When the conversion is done you will end up with a new file with the same name as the XML stylesheet, however there will not be a file extension. To simplify things, add a '''.json''' extension to the converted file. &lt;br /&gt;
*Update the path to the stylesheet in the ''cfchart'' tag to have a ''.json'' extension instead of ''.xml''.&lt;br /&gt;
*Update the path to the stylesheet to use relative paths instead of absolute paths from the webroot.&lt;br /&gt;
**Example: If the stylesheet file and the ''.cfm'' template with the ''cfchart'' code are in the webroot, change '''/cfchartstyle.json''' to '''../cfchartstyle.json'''&lt;br /&gt;
&lt;br /&gt;
More details on this are available in the [https://wikidocs.adobe.com/wiki/display/coldfusionen/cfchart Cfchart documentation]. Be sure to check the comments of the documentation for more helpful cfchart troubleshooting tips. &lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_FAQs&amp;diff=2482</id>
		<title>ColdFusion FAQs</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_FAQs&amp;diff=2482"/>
				<updated>2015-05-12T19:51:30Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Using ColdFusion Builder to Syncronize Files via FTP */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=ColdFusion Frequently Asked Questions (FAQ)=&lt;br /&gt;
==Do you support cfform?==&lt;br /&gt;
Yes, this is supported.&lt;br /&gt;
==Do you support ColdFusion Report Builder==&lt;br /&gt;
The ColdFusion Report Builder uses RDS for the Query Builder. We have RDS disabled for security purposes as recommended by Adobe / Macromedia.&lt;br /&gt;
&lt;br /&gt;
We suggest downloading the developer edition of ColdFusion and Report builder, installing locally. Build the reports with the local development environment and upload the ColdFusion Report Files (CFR files) to our servers. Specify the path to your pre-built report files from within the cfreport tag which is NOT disabled.&lt;br /&gt;
&lt;br /&gt;
==Do you support ColdFusion Builder / RDS==&lt;br /&gt;
You may use ColdFusion Builder to transfer files to your site via FTP as mentioned in the [[ColdFusion_Builder|ColdFusion Builder]] wiki. &lt;br /&gt;
&lt;br /&gt;
However, because RDS is disabled on our shared servers as mentioned above, you may not use ColdFusion's Remote Development Services with our shared servers. Instead, please either use the ColdFusion server shipped with ColdFusion Builder, a separate local ColdFusion installation, or one of our VPS/Dedicated servers to take advantage of advanced development features within ColdFusion Builder.&lt;br /&gt;
&lt;br /&gt;
==Do you support Custom Tags with your ColdFusion Hosting?==&lt;br /&gt;
We do support custom tags, but not all .cfx custom tags, which may require additional server installs of .dll's, etc. If it is a commercially available tag, we'll consider installing it.&lt;br /&gt;
&lt;br /&gt;
Standard .cfm custom tags, yes.&lt;br /&gt;
&lt;br /&gt;
Custom Tag directories for your site can be created through the site's Application.cfc file as shown in the [[ColdFusion_Tips_%26_Tricks#Per-Application_Custom_Tag_Paths|ColdFusion Tips &amp;amp; Tricks]] wiki.&lt;br /&gt;
==Do you support the tags CFFILE, CFDIRECTORY and CFOBJECT?==&lt;br /&gt;
Yes, these are supported.&lt;br /&gt;
==Do you Support CFSchedule for Scheduled Tasks in Coldfusion?==&lt;br /&gt;
Yes, ColdFusion Scheduled Tasks are supported.&lt;br /&gt;
&lt;br /&gt;
To setup a schedule task in ColdFusion, you can use the CFSCHEDULE tag to create the scheduled task the first time. The [[ColdFusion_Tips_%26_Tricks#Scheduling_Tasks_in_ColdFusion|ColdFusion Tips &amp;amp; Tricks]] wiki shows how to use the CFSCHEDULE tag.&lt;br /&gt;
&lt;br /&gt;
==Do you support the CFX_IMAGE tag?==&lt;br /&gt;
Yes, the CFX_Image tag is supported on our 32-bit ColdFusion servers. Efflaire's [http://efflare.com/docs/CFX_ImageCR3/reference/index.html cfx_imagecr3] is also installed, and it is available to both 32-bit ''and'' 64-bit servers.&lt;br /&gt;
&lt;br /&gt;
==How do I use the CFX_ImageCR3 tag?==&lt;br /&gt;
This article from Efflaire shows examples of how to use the CFX_ImageCR3 custom tag: http://efflare.com/docs/CFX_ImageCR3/reference/examples/&lt;br /&gt;
&lt;br /&gt;
The full tag documentation is here: http://efflare.com/docs/CFX_ImageCR3/&lt;br /&gt;
&lt;br /&gt;
==Do you support the CFX_Google API for ColdFusion?==&lt;br /&gt;
Yes, we support CFX_Google on our ColdFusion servers.&lt;br /&gt;
&lt;br /&gt;
''Note: This tag was written for Google's deprecated version 2 API. If you do not have a version 2 API key you can still obtain a console key that works with version 2. Information on getting a Console Key can be found here: [https://developers.google.com/maps/documentation/javascript/tutorial#api_key Google: Obtaining an API Key]''&lt;br /&gt;
==Do you support the CFCONTENT tag?==&lt;br /&gt;
Yes, we support CFCONTENT.&lt;br /&gt;
==Do you support CF Shopkart?==&lt;br /&gt;
Yes, we support CF Shopkart on our coldfusion servers.&lt;br /&gt;
==Do you support Flash Remoting?==&lt;br /&gt;
Yes, this is automatically enabled for all sites on our ColdFusion servers. &lt;br /&gt;
&lt;br /&gt;
Please use &amp;lt;nowiki&amp;gt;http://domainname.com/flex2gateway/&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://domainname.com/flashservices/gateway/&amp;lt;/nowiki&amp;gt; as the gateway URL for your application. &amp;lt;br /&amp;gt;''(replacing domainname.com with your actual domain)''&lt;br /&gt;
&lt;br /&gt;
==Do your ColdFusion servers support Verity and SOLR?==&lt;br /&gt;
Yes, both Verity (K2) and SOLR are supported on ColdFusion versions 7-9. Verity is not available in ColdFusion 10.&lt;br /&gt;
&lt;br /&gt;
==Are any ColdFusion tags/features restricted? What tags/features are allowed?==&lt;br /&gt;
Most tags and functions are allowed, however we disable the following ColdFusion features / tags on our shared hosting accounts:&lt;br /&gt;
&lt;br /&gt;
*Access To Internal ColdFusion Java Components*&lt;br /&gt;
*Remote Development Services (RDS)&lt;br /&gt;
*CFExecute&lt;br /&gt;
*CFRegistry&lt;br /&gt;
&lt;br /&gt;
All other tags are supported, including ''CreateObject()''. The only restriction on ''CreateObject'' is that it may not be used with Internal ColdFusion Java Objects as mentioned above. If you are experiencing any difficulty with another ColdFusion tag or feature, please contact our customer support.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt;''Prevents CFML code from accessing and creating Java objects that are part of the internal ColdFusion implementation. This prevents a non-authenticated CFML template from reading or modifying administration and configuration information for this server. [http://www.adobe.com/products/coldfusion-family.html Adobe] suggests these tags be disabled for production servers.''&lt;br /&gt;
&lt;br /&gt;
==May I Access the ColdFusion Administrator on my Shared Server==&lt;br /&gt;
No; we do not allow access to the ColdFusion Administrator on our shared servers. Our control panel allows our customers to add and edit DSNs, and the Windows Control Panel also allows you to view ColdFusion error logs. &lt;br /&gt;
&lt;br /&gt;
With our Shared Railo plans, though, each account has access to their site's Railo Web Administrator through the link in their Control Panel.&lt;br /&gt;
&lt;br /&gt;
==Do You Support .java or .jar files?==&lt;br /&gt;
No, we do not support .java or .jar files. The exception is with ColdFusion 10+ you may add .jar files to your application as shown here: [[ColdFusion_Tips_%26_Tricks#Loading_custom_Java_library_or_Java_Libraries_.28jar_or_class_files.29_in_ColdFusion_10|Loading Custom Java Libraries in ColdFusion 10]]&lt;br /&gt;
&lt;br /&gt;
==Can I use CFExecute?==&lt;br /&gt;
No, that tag is disabled.&lt;br /&gt;
==Is the CFMAIL tag enabled?==&lt;br /&gt;
Yes, the CFMAIL tag is enabled on all of our ColdFusion servers. See the [[Cfmail|cfmail]] wiki for details on how to use it in our environment.&lt;br /&gt;
==Is CFX_JpegResize allowed on your ColdFusion servers?==&lt;br /&gt;
Yes, this is installed and allowed on our 32-bit ColdFusion servers.&lt;br /&gt;
&lt;br /&gt;
==Will you deploy my (CAR) file from the Coldfusion Administrator?==&lt;br /&gt;
We will not deploy it that way, as that is a default method that wouldn't benefit you on our shared servers. Instead, please deploy your application through FTP and create the datasource (DSN) through your control panel at wcp.hostek.com. Please see the [[WCP_(Windows_based_Control_Panel)#DataSources.28DSN.27s.29|WCP DataSources]] wiki for instructions on how to create a datasource.&lt;br /&gt;
&lt;br /&gt;
''Note'': If you have a VPS or Dedicated server at Hostek.com, you can deploy your application how you wish. Please see our [http://hostek.com/hosting/vps/best-vps-hosting.asp VPS Plans] page for more info on our VPS options, and our [http://hostek.com/hosting/dedicated/virtual-dedicated-hosting.asp Virtual Dedicated Plans] page for details on our virtual dedicated servers.&lt;br /&gt;
&lt;br /&gt;
==Can I use J2EE Session Variables?==&lt;br /&gt;
Yes, we are now supporting J2EE Session Variables.&lt;br /&gt;
&lt;br /&gt;
==With ColdFusion, how can I see the real error, while the visitor sees a page without the error?==&lt;br /&gt;
In this example error template, be sure to replace 123.123.123.123 with your IP. You can get your IP using our [http://hostek.com/ip/ IP lookup tool].&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&lt;br /&gt;
&amp;lt;cfset aIP = cgi.REMOTE_ADDR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aIP is &amp;quot;123.123.123.123&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;strong&amp;gt;#error.Diagnostics#&amp;lt;/strong&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
#TimeFormat(error.DateTime,&amp;quot;hh:mm tt&amp;quot;)# - #DateFormat(error.DateTime,&amp;quot;MMMM&lt;br /&gt;
D, YYYY&amp;quot;)#&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
#error.Browser#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
IP ADDRESS: &lt;br /&gt;
#error.RemoteAddress#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt; &lt;br /&gt;
TEMPLATE: #error.Template#?#error.QueryString#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.ValidationHeader#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.InvalidFields#&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#error.ValidationFooter#&lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
Enter any text or formatting here that you want to display to your visitor instead of &lt;br /&gt;
them seeing the error.&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How do I get Google Maps to work with CFMAP?==&lt;br /&gt;
The common problem is placing your googlemapkey in your application.cfm file. Instead, place the googlemapkey in an application.cfc file. You can leave your application.cfm as it is, and just create an application.cfc if you don't have one, and take the googlemapkey out of your application.cfm file and place it in your application.cfc file.&lt;br /&gt;
&lt;br /&gt;
For example, this would go in your application.cfc file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;cfset this.googlemapkey=&amp;quot;abc123...your google key here...789xyz&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in your cfm template where the cfmap is called, you would add code to it like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;cfmap name=&amp;quot;themap&amp;quot; centeraddress=&amp;quot;Tulsa, OK&amp;quot; width=&amp;quot;400&amp;quot; height=&amp;quot;400&amp;quot; zoomlevel=&amp;quot;9&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
==How do I enable the CFCHART tag?==&lt;br /&gt;
This is already enabled on all new accounts, but if CFCHART does not work on your site please do the following:&lt;br /&gt;
*Create a folder named CFIDE off of the root level.&lt;br /&gt;
*Create a blank file (0 bytes) named GraphData.cfm &lt;br /&gt;
*Create a directory called main off of CFIDE &lt;br /&gt;
*Navigate to the new directory at CFIDE/main &lt;br /&gt;
*Create a blank file (0 bytes) named ide.cfm&lt;br /&gt;
&lt;br /&gt;
The CFCHART tag should now work.&lt;br /&gt;
&lt;br /&gt;
==How do I enable / disable Robust Exception Information on my site?==&lt;br /&gt;
This can be accomplished through the code shown in this wiki: [[ColdFusion_Tips_%26_Tricks#Per-application_Robust_Exception_Information_Settings|Per-application Robust Exception Information Settings]]&lt;br /&gt;
&lt;br /&gt;
==Is Coldfusion Request Debug Output Available?==&lt;br /&gt;
On our shared servers this is not allowed, because this feature can have a negative performance impact for the entire server. This is only allowed in our VPS/Dedicated environment.&lt;br /&gt;
&lt;br /&gt;
==How do I adjust the JSON Prefix for my site==&lt;br /&gt;
If you wish to control ColdFusion JSON Prefix settings for your site, you can follow the guide here: [[ColdFusion_Tips_%26_Tricks#Per-application_JSON_Prefix|Per-Application ColdFusion JSON Prefix]]&lt;br /&gt;
&lt;br /&gt;
==What do I set as the &amp;quot;Destination&amp;quot; attribute for cffile?==&lt;br /&gt;
For the &amp;quot;Destination&amp;quot; attribute, you should use the FULL path to the folder to which you wish the documents to be uploaded. You can make use of the [http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c67.html expandpath] function to obtain the full path dynamically.&lt;br /&gt;
==How can I limit the tools available using the cftextarea FCKEditor toolbar?==&lt;br /&gt;
There are two variations of the toolbar which can be specified in the &amp;lt;cftextarea&amp;gt; tag. If the '''toolbar''' attribute is un-specified, the toolbar set is &amp;quot;Default&amp;quot;. If specified, you can use either &amp;quot;Default&amp;quot; or &amp;quot;Basic&amp;quot; this is case sensitive. See the tag options here for more information: [http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7afd.html cftextarea docs]&lt;br /&gt;
&lt;br /&gt;
The [http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7a01.html#WSc3ff6d0ea77859461172e0811cbec22c24-6f1b Using the rich text editor] article from Adobe has more info on its usage.&lt;br /&gt;
&lt;br /&gt;
==How do I install Mura (previously known as Sava) CMS on your servers?==&lt;br /&gt;
If your account uses our wcp.hostek.com control panel, you can install Mura through the Applications section of the control panel.&lt;br /&gt;
&lt;br /&gt;
If your account is on Linux, or you prefer to perform a manual installation you can follow the steps below:&lt;br /&gt;
&lt;br /&gt;
===Requirements===&lt;br /&gt;
*Must have a Coldfusion or Railo hosting plan. Blue River (the makers of Mura) recommend the Silver plan.&lt;br /&gt;
&lt;br /&gt;
===Installation===&lt;br /&gt;
#Put the contents of &amp;quot;mura[version]\www&amp;quot; directory into your webroot, (should be ''wwwroot'' on Windows and ''public_html'' on Linux). This includes the following directories and files: admin, config, default, fckeditor, requirements, tasks, Application.cfc, contentServer.cfm, index.cfm.&lt;br /&gt;
#Create a database (MySQL or MSSQL) using Helm either MS SQL or MySQL named &amp;quot;SomethingUnique_muraDB&amp;quot; and run then import/run the appropriate script (found in /db) against the database you created.&amp;lt;br /&amp;gt;For MySQL use PHPMyAdmin (Available in WCP and cPanel.)&amp;lt;br /&amp;gt;For MSSQL use Query Analyzer, SQL Management Studio or sqlcmd.&lt;br /&gt;
#Create a Datasource (DSN) for connecting to the database you created in the step above. &lt;br /&gt;
#Navigate to your domain name, and you should see the auto-installer form appear.&amp;lt;br /&amp;gt;''Note: The email settings are not required to get mura up and running but you may get errors when running mura if they are not set. These, of course, pertain only to functionality that uses email.''&lt;br /&gt;
#In your browser go to http://[domain]/admin/ and login.&amp;lt;br /&amp;gt;- Username: admin&amp;lt;br /&amp;gt;- Password: admin&lt;br /&gt;
#You're done installing mura. Enjoy!&lt;br /&gt;
&lt;br /&gt;
===Troubleshooting===&lt;br /&gt;
If you receive the message &amp;quot;Application Starting. This site is currently loading.&amp;quot;, mura needs to be reloaded by appending &amp;quot;?appreload&amp;amp;override&amp;quot; to the url. For example: &amp;lt;pre&amp;gt;http://[domain]/admin/index.cfm?appreload&amp;amp;override&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have any questions regarding installation, please visit our Support Forum at the [http://http://getmura.com/forum/ Mura Forum].&lt;br /&gt;
&lt;br /&gt;
Mura can be downloaded at: [http://getmura.com/download/mura-downloads/ getmura.com]&lt;br /&gt;
&lt;br /&gt;
==How can I disable ScriptProtect?==&lt;br /&gt;
ColdFusion versions MX7 and higher support a feature called ScriptProtect which helps prevent XSS (cross site scripting) attacks. This feature is helpful as it strips certain HTML entities from user input, but it can also affect your Web app's functionality. A common example of this is &amp;quot;&amp;lt;embed&amp;gt;&amp;quot; tags being removed when a user tries to post a YouTube video to their blog.&lt;br /&gt;
&lt;br /&gt;
This feature is enabled on our servers, but its value can be modified in your &amp;quot;Application.cfc&amp;quot; or &amp;quot;Application.cfm&amp;quot; file. &lt;br /&gt;
===If Using Application.cfm===&lt;br /&gt;
Add the following attribute to your '''&amp;lt;cfapplication&amp;gt;''' tag: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scriptProtect = &amp;quot;none&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===If Using Application.cfc===&lt;br /&gt;
Place the following code within the '''&amp;lt;cfcomponent&amp;gt;''' section of your Application.cfc&lt;br /&gt;
====If using tag-based Application.cfc====&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.scriptProtect = &amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====If using &amp;lt;cfscript&amp;gt; Application.cfc====&lt;br /&gt;
&amp;lt;pre&amp;gt;this.scriptProtect = &amp;quot;false&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Settings you should enable within your local ColdFusion Administrator==&lt;br /&gt;
When developing on a local ColdFusion server, most developers accept the default Coldfusion Administrator settings that are set by the ColdFusion installer. This is fine for development servers, but it can cause some problems when moving a ColdFusion application into production in a shared hosting enviroment. To ensure your code runs well when you move it to our servers, we recommend you make the following adjustments within your local ColdFusion Administrator:&lt;br /&gt;
&lt;br /&gt;
First, on the Settings page make sure you enable the setting that says: &amp;quot;Disable access to internal ColdFusion Java components&amp;quot; (pictured below)&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Second, under the Security Tab click the Sandbox Security link then click the box to &amp;quot;Enable ColdFusion Security&amp;quot;. (pictured below)&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once Sandbox Security is enabled, you'll need to create a sandbox for your local site. To do this, add the full path to your site below where it says &amp;quot;Add Security Sandbox&amp;quot;, then click &amp;quot;Add&amp;quot;. For example if you are using the default site location for IIS, you would use 'C:\inetpub\wwwroot' as shown below:&lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings4.jpg]]&lt;br /&gt;
&lt;br /&gt;
The last thing to do is add the correct paths and permissions. By default, ColdFusion will add the path to your site, but you'll also want to make sure the following paths/permissions are added too (permissions are listed in parentheses next to path):&lt;br /&gt;
&lt;br /&gt;
    C:\ColdFusion10\cache\- (Read,Write,Delete)&lt;br /&gt;
    C:\WINDOWS\Fonts\- (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\wwwroot\WEB-INF\cfclasses\- (Read,Write)&lt;br /&gt;
    C:\ColdFusion10\cfusion\wwwroot\WEB-INF\cftags\interface.cfc (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache\- (Read,Write,Delete)&lt;br /&gt;
    C:\ColdFusion10\cfusion\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp\- (Read,Write,Delete)&lt;br /&gt;
    C:\ColdFusion10\cfusion\runtime\servers\coldfusion\SERVER-INF\temp\wwwroot-tmp (Read)&lt;br /&gt;
    C:\ColdFusion10\cfusion\tmpCache\CFFileServlet\_cf_image\- (Read,Write,Delete)&lt;br /&gt;
    C:\Users\USERNAME\AppData\Local\Temp\- (Read,Write,Delete)*&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note, this assumes you're using a recent version of Windows (Vista or newer), and that ColdFusion is installed to 'C:\ColdFusion10'. If on an earlier version of Windows, the only thing you'll do differently is replace 'C:\Users\USERNAME\AppData\Local\Temp\-'* above with this path: 'C:\DOCUME~1\USERNAME\LOCALS~1\Temp\-'*&lt;br /&gt;
&lt;br /&gt;
*Replace USERNAME with the actual name of your ColdFusion runtime user.&lt;br /&gt;
&lt;br /&gt;
==How do I disable / enable Sandbox Security on my ColdFusion VPS?==&lt;br /&gt;
Sandbox Security is great for development or multi-site servers, but it causes ColdFusion requests to run a bit slower than they normally would. If you’re not actively using this security feature, you can disable it within the '''Security &amp;gt; Sandbox Security''' page within your server’s ''ColdFusion Administrator''.&lt;br /&gt;
&lt;br /&gt;
''Important'': You must restart ColdFusion after disabling or enabling Sandbox Security for it to take effect. &lt;br /&gt;
&lt;br /&gt;
[[File:Cfadminsettings2.jpg]]&lt;br /&gt;
&lt;br /&gt;
''Reference: [https://wikidocs.adobe.com/wiki/display/coldfusionen/Administering+ColdFusion+Security#AdministeringColdFusionSecurity-Usingsandboxsecurity Adobe - Using Sandbox Security]''&lt;br /&gt;
==Using ColdFusion Builder to Syncronize Files via FTP==&lt;br /&gt;
===Creating the FTP connection===&lt;br /&gt;
Open ColdFusion Builder&lt;br /&gt;
#From the left lower panel right-click on the world icon labeled '''FTP'''&lt;br /&gt;
#Select '''Add New FTP Site'''&lt;br /&gt;
#Enter the ''Server'', ''Username'', and ''Password'', click '''Test''' to confirm settings are correct&lt;br /&gt;
#Enter the ''Remote Path'', this can either be the root '''/''' or the webroot (either '''/wwwroot''' for Windows servers or '''/public_html''' for Linux servers)&lt;br /&gt;
#Click '''OK'''&lt;br /&gt;
&lt;br /&gt;
===To configure a project to Synchronize===&lt;br /&gt;
#Right click on any project you wish to synchronize with over FTP. Hover over ''Synchronize'' and select '''Create New Synchronize Connection'''&lt;br /&gt;
#Make sure the path for the local project files is correct. For '''Remote''' select the newly created FTP Connection.&lt;br /&gt;
#Click ''OK''&lt;br /&gt;
&lt;br /&gt;
===To Synchronize Files: Remote-to-Local or Local-to-Remote===&lt;br /&gt;
#Right click on any project you wish to synchronize with over FTP. &lt;br /&gt;
#Hover over Synchronize and select '''Synchronize''' and follow the prompts to confirm which files should be synchronized.&lt;br /&gt;
&lt;br /&gt;
===Notes About Using Advanced ColdFusion Builder Development Features===&lt;br /&gt;
In order to use advanced development features within ColdFusion Builder, it should be used with a ColdFusion server that has RDS (''Remote Development Services'') enabled. Our shared servers do not have this feature enabled because it poses a security risk within production servers. As such, it is recommended to either [https://wikidocs.adobe.com/wiki/display/coldfusionen/Installing+the+Server+Configuration install a local copy of ColdFusion] or use one of our [http://hostek.com/hosting/coldfusion/vps/coldfusion-vps-hosting.htm ColdFusion VPS plans] for your development. If you install a local development ColdFusion installation, be sure to enable RDS during the install process. If you're using a ColdFusion VPS, you can enable RDS within the '''Security &amp;gt; RDS''' section of your ColdFusion Administrator.&lt;br /&gt;
&lt;br /&gt;
Once you have RDP enabled on a local development installation of ColdFusion or your own VPS, you can enable RDS support within ColdFusion Builder as shown here: [https://wikidocs.adobe.com/wiki/display/coldfusionen/Eclipse+RDS+Support ColdFusion Builder RDS Support]&lt;br /&gt;
&lt;br /&gt;
''Note:'' If you wish to have your local development ColdFusion server match our shared server settings, read the above entry for [[ColdFusion_FAQs#Settings you should enable within your local ColdFusion Administrator|Settings you should enable within your local ColdFusion Administrator]].&lt;br /&gt;
[[Category:ColdFusion]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=WCP_(Windows_based_Control_Panel)&amp;diff=2481</id>
		<title>WCP (Windows based Control Panel)</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=WCP_(Windows_based_Control_Panel)&amp;diff=2481"/>
				<updated>2015-05-12T19:38:26Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Add Domain */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==How To Login To My WCP Control Panel==&lt;br /&gt;
#To manage your domain, login to the WCP Control Panel, using the details below&lt;br /&gt;
#URL: '''https://wcp.hostek.com'''/&lt;br /&gt;
#Username: &lt;br /&gt;
#Password: ** same as your cp.hostek.com password **&lt;br /&gt;
*You can also login to the control panel through your billing control panel https://cp.hostek.com/clientarea.php&lt;br /&gt;
#Click on  ''''My Services'''' 'Click the '''small Green arrow''' on the the notepad to the right'&lt;br /&gt;
#Now click the '''Login to Control Panel''' Icon'''&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==Custom URL for the WCP Control Panel==&lt;br /&gt;
The WCP can als be accessed by wcp.your_domain.com&lt;br /&gt;
&lt;br /&gt;
Setup wcp.your_domain.com as an A record for &amp;quot;184.175.108.65&amp;quot; or as a CName record for &amp;quot;wcp.ezhostingserver.com&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Resellers and VPS - WCP White label Settings===&lt;br /&gt;
Resellers and VPS customers can setup their logo in their Reseller control panel, however those additional features will only be available when accessing the control panel using the specific domain they configured within the Reseller Setttings of the control panel. The Reseller settings will be available using '''any''' URL, and as mentioned within these settings the reseller '''URL''' can be setup and other whitelabel options (custom control panel logo, favicon, etc.) making WCP the ultimate Windows Control Panel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Windows VPS]]&lt;br /&gt;
[[Category:Resellers]]&lt;br /&gt;
&lt;br /&gt;
==Adding Additional Control Panel Logins==&lt;br /&gt;
*This will allow you to set up additional control panel logins for you or for others involved in editing or managing your account. You can limit the Permissions or options available for them to manage.&lt;br /&gt;
#Login to the WCP Control Panel, using the details below&lt;br /&gt;
#URL: '''https://wcp.hostek.com'''/&lt;br /&gt;
#Username: &lt;br /&gt;
#Password: ** same as your cp.hostek.com password **&lt;br /&gt;
#Click on the '''Control panel Logins''' tab, then click on the '''Add''' icon.&lt;br /&gt;
#Put the &amp;quot;Username, Password and if you want them to have Limited Permission.&lt;br /&gt;
#If you want them to have Limited Permission then check the '''Limited Permission''' box. This will load a dropdown where you can select what privlages they have to manage.&lt;br /&gt;
#Once you are done click the '''Save''' icon at the bottom of the screen.&lt;br /&gt;
#Once it has been added you or they can login by going to https://wcp.hostek.com/Login.aspx and using the username and password that you set for it.&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:Lucee]]&lt;br /&gt;
==Unlimited Plans - Add Additional Domains==&lt;br /&gt;
You will want to follow these steps in to generate a +1 Control Panel for a separate Domain. (Please note the difference between Registration and Hosting: [https://wiki.hostek.com/Domain_Registration_and_Domain_Name_Management#Domain_Registration_Information_vs._Domain_Hosting_Information  '''here''')] &amp;lt;br clear=all&amp;gt; This would be under your Windows Unlimited account, or your Windows Business/Pro plan.&lt;br /&gt;
&lt;br /&gt;
#Login to your WCP control panel&lt;br /&gt;
#*Windows Unlimited: For adding a third (or more) domain select any domain from the upper right hand corner dropdown box &amp;quot;Domains&amp;quot;.&lt;br /&gt;
#Within the &amp;quot;Domains&amp;quot; box click the &amp;quot;Addon Domains&amp;quot; icon.&lt;br /&gt;
#Click &amp;quot;Add&amp;quot; and enter the following:&lt;br /&gt;
#*Domain Name&lt;br /&gt;
#*Username&lt;br /&gt;
#*Password&lt;br /&gt;
#Click &amp;quot;Save&amp;quot;&lt;br /&gt;
#To manage the domain, you can now select it from the '''Domains''' drop-down list/box.&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
&lt;br /&gt;
==Site Details==&lt;br /&gt;
We recommend you review the &amp;quot;Site Settings&amp;quot; which includes many important details about your domain including:&lt;br /&gt;
&lt;br /&gt;
WCP (login and select domain) &amp;gt; Website Settings &amp;gt; '''Site Details'''&lt;br /&gt;
&lt;br /&gt;
*Testing URL&lt;br /&gt;
*Primary and Secondary DNS&lt;br /&gt;
*Site IP&lt;br /&gt;
*Web Root Path&lt;br /&gt;
*FTP Root Path&lt;br /&gt;
===IIS Version &amp;amp; ColdFusion Version (if applicable)===&lt;br /&gt;
To get your domain's IIS Version and ColdFusion Version (if applicable) log in to WCP and under the Settings section, click on the Site Details option.&lt;br /&gt;
&lt;br /&gt;
==FTP Accounts==&lt;br /&gt;
*Adding or editing FTP accounts.&lt;br /&gt;
#click on the '''FTP Accounts''' tab.&lt;br /&gt;
#To edit one click on the little '''Pencil Icon''' to the left, to add one click on the '''Add FTP User''' tab.&lt;br /&gt;
#If you are adding one you will set the Username:, Password: and folder then click the #Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==Virtual Directories==&lt;br /&gt;
*Adding virtual directories to your site.&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click on Virtual Directories under the Files section&lt;br /&gt;
#Click Add&lt;br /&gt;
#Enter the virtual path you need&lt;br /&gt;
#Enter in the actual physical path it is mapped to&lt;br /&gt;
#If this is to be an application, check the Create Application Folder check box&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
==Application Folders==&lt;br /&gt;
To create and manage Application Folders on your site&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click on Application Folders under the Files section&lt;br /&gt;
#Select the site or sub-domain from the drop down box&lt;br /&gt;
#Click continue&lt;br /&gt;
#Select a folder&lt;br /&gt;
#Click Add Application to make it an application folder&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==File Manager== &lt;br /&gt;
*Basic File Operations, file uploading and editing now supported- Zip, GZip, and Tar Archive support.&lt;br /&gt;
#Click on the '''File Manager icon''', then the '''Login icon''' on the next screen.&lt;br /&gt;
#To create files or Directory's outside the WWW root folder right click and click on the '''Create File''' or '''Create Directory''' option.&lt;br /&gt;
#Click the '''Continue Icon''' to add this.&lt;br /&gt;
#To add/edit files in the WWWroot click on the '''wwwroot file'''.&lt;br /&gt;
#once you are in you can add, edit or delete by right clicking and clicking on the options given.&lt;br /&gt;
&lt;br /&gt;
*Upload and Download functions&lt;br /&gt;
#To upload a file, right click the File Manager page, and click Upload&lt;br /&gt;
#Select the file you wish to upload by clicking Choose File&lt;br /&gt;
#Give this file a new name or keep the existing default name&lt;br /&gt;
&lt;br /&gt;
#To download a file, right click the file you want to download&lt;br /&gt;
#Click Download File. Note: This will send you to a new page.&lt;br /&gt;
#Now your browser will be downloading the file in question. Simply check your Downloads folder or hit Ctrl+J to open the Downloads section of your browser and move this file where you want it.&lt;br /&gt;
&lt;br /&gt;
*NEW: Use the search bar at the top of the File Manager to quickly search the file you're looking for.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
&lt;br /&gt;
==Password Protect Folders==&lt;br /&gt;
#Under the Files section click on '''Password Protect'''.&lt;br /&gt;
#Click on '''Manage Protected Folders'''.&lt;br /&gt;
#Browse to and click on the folder that you want to set this up on and check '''Enable Protection'''. &lt;br /&gt;
#Select a user from the list or click on '''Manage Users''', then click '''Add''', and enter username and password then Save. &lt;br /&gt;
&lt;br /&gt;
==IIS Settings==&lt;br /&gt;
*Setting up error pages, default pages, advanced settings, etc.&lt;br /&gt;
===Custom Error pages===&lt;br /&gt;
#Click on '''IIS Settings''' in your WCP&lt;br /&gt;
#Click the edit button next to the error page you want to change&lt;br /&gt;
#Uncheck the '''Use System Default''' checkbox &lt;br /&gt;
#Enter the path to your custom error page &lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
===Mime Types===&lt;br /&gt;
#Click on '''IIS Settings''' in your WCP&lt;br /&gt;
#Scroll to the bottom of the window and click '''Add Mime Type'''&lt;br /&gt;
#Enter the extension for the Mime Type&lt;br /&gt;
#Enter the Mime Type information&lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
*An example Mime Type is below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Extension: .mp3&lt;br /&gt;
Mime Type: audio/mpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information here: [https://wiki.hostek.com/Mime_types Mime Types]&lt;br /&gt;
&lt;br /&gt;
===Default Docs===&lt;br /&gt;
*Select a default document and drag it to the top position to set it as top priority&lt;br /&gt;
*Click '''Add''' to add a default doc&lt;br /&gt;
*Click the red '''X''' to delete a default doc&lt;br /&gt;
*Click a default doc and change the name&lt;br /&gt;
*For example: change '''&amp;quot;index.htm&amp;quot;''' to '''&amp;quot;index.asp&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
===URL Forwarding===&lt;br /&gt;
#In your [https://wcp.hostek.com/ '''WCP'''] click on the '''IIS Settings''' button&lt;br /&gt;
#Navigate to the '''Redirects''' tab&lt;br /&gt;
# If you need a specific folder to redirect somewhere, you can find it using the '''Browse''' button&lt;br /&gt;
##If you simply want the whole site to redirect, leave this box '''blank'''&lt;br /&gt;
#Click '''Save'''. (See below for details on the other options.)&lt;br /&gt;
*'''Permanent Redirect''': Specifies that the server should return the redirect status code 301 rather than the default 302. A 301 status code lets search engines know that the content has been permanently moved and that only the new URL should be indexed.&lt;br /&gt;
*'''Exact URL''': If this is unchecked, then the request URL without the server name is passed along with the query string to the destination URL. This is equivelent to appending the $V$Q variables at the end of the destination URL.&lt;br /&gt;
*'''Exclude Sub Directories''': This means that the folder you choose will not redirect.&lt;br /&gt;
&lt;br /&gt;
===Advanced===&lt;br /&gt;
====Recycle Application Pool====&lt;br /&gt;
If you see a Service Unavailable message on your site, or have a general need to recycle a site's IIS Application Pool, you can do so through this section of WCP. &lt;br /&gt;
#Click the '''IIS Settings''' icon in WCP&lt;br /&gt;
#Click the '''Advanced''' tab in the '''IIS Settings''' section&lt;br /&gt;
#Click the '''Recycle''' button.&lt;br /&gt;
&lt;br /&gt;
==PHP Settings==&lt;br /&gt;
If you notice you need a different version of php or want to check what version you are using you can update it to that version if it is installed to the server or can enable custom php.ini settings to use specifically for your domain.&lt;br /&gt;
#Click the configuration for the domain or subdomain you want updated.&lt;br /&gt;
#Select the version you wish to use.&lt;br /&gt;
#Check the checkbox if you want to enable a custom php.ini file&lt;br /&gt;
#Click save to save the settings.&lt;br /&gt;
&lt;br /&gt;
==ColdFusion==&lt;br /&gt;
===ColdFusion Error Logs===&lt;br /&gt;
====Server Error Logs====&lt;br /&gt;
This section will show any recent errors for your site that were found within ColdFusion's server-wide exception log. Use the dropdown to choose how many hours back you'd like errors retrieved. &lt;br /&gt;
====Application Error Logs====&lt;br /&gt;
This section will show errors created via the cflog tag on your site. For security purposes, your cflog logs will only appear hear if you have given the file name in the cflog tag the name of your domain, ''without the www.'' For example, if your domain is ''your_domain.com'' you would set the file attribute for the cflog tag like: ''file=&amp;quot;your_domain.com&amp;quot;''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
''Note'': Please set the ''type'' of the ''cflog'' tag to either '''error''' or '''fatal''' on our production servers. Use of the ''information'' type is strongly discouraged. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Reference''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/cflog CFLog Documentation]&lt;br /&gt;
&lt;br /&gt;
===Clear Template Cache===&lt;br /&gt;
Within this section you can click the '''Clear Template Cache''' button to clear cached ColdFusion pages for your site. &lt;br /&gt;
&lt;br /&gt;
===ColdFusion Version===&lt;br /&gt;
Within this section of WCP, you can choose which version of ColdFusion you'd like your site to use. &lt;br /&gt;
&lt;br /&gt;
''Note'': You can also specify different ColdFusion versions for different subdomains on your site.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
&lt;br /&gt;
==DNS Editor==&lt;br /&gt;
'''READ FIRST''' When a new domain is added to WCP all DNS records are also created (in most cases). Clicking on the DNS Editor will open a window with these records, for editing, adding and deleting. Most times nothing needs to be done other than pointing your domain to the Primary and Secondary DNS Servers listed under [https://wiki.hostek.com/WCP_(Windows_based_Control_Panel)#Site_Details WCP Site Details].&lt;br /&gt;
&lt;br /&gt;
===Create a new DNS record===&lt;br /&gt;
#Click '''Add DNS''' Record button&lt;br /&gt;
#Enter Name for record (If DNS record name is your domain name please leave this Name - text box blank as the control panel will automatically add your domain name)&lt;br /&gt;
#Choose the Record type (A, CNAME, MX, NS, TXT, SPF, SRV)&lt;br /&gt;
#Enter Data Type&lt;br /&gt;
#Generally leave the TTL (Time To Live) as the default 86400&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===Update DNS records===&lt;br /&gt;
#To update an existing DNS record click the '''Pencil''' icon next to the record you would like to update.&lt;br /&gt;
#You will then be able to change the Name of the record, the Type of record, Data of the record, and Time to Live.&lt;br /&gt;
#Once updated Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===SVR Record Fields===&lt;br /&gt;
*A SVR Record is a &amp;quot;'''S'''er'''v'''ice '''R'''ecord&amp;quot;. It's a specification of data in the Domain Name System defining the location (i.e. the hostname and port number) of servers for specified services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: _service._protocol&lt;br /&gt;
Type: SRV&lt;br /&gt;
Data: Address/Hostname&lt;br /&gt;
Priority: Priority Number&lt;br /&gt;
Weight: Weight Number&lt;br /&gt;
Port: Port Number&lt;br /&gt;
TTL: 86400&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: _sip._udp&lt;br /&gt;
Type: SRV&lt;br /&gt;
Data: sip.mydomain.com&lt;br /&gt;
Priority: 10&lt;br /&gt;
Weight: 5&lt;br /&gt;
Port: 4030&lt;br /&gt;
TTL: 86400&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you are a '''VPS Client''' with a Windows Server and a SmarterMail Active Sync license wanting to use Autodiscover for Outlook, please refer to this SmarterMail Article [https://portal.smartertools.com/kb/a2752/set-up-autodiscover-for-smartermail.aspx here].&lt;br /&gt;
&lt;br /&gt;
===MX Records===&lt;br /&gt;
Here are steps to setup the correct MX Records for our MailSystem:&lt;br /&gt;
*Note: These are setup by Default, and shouldn't need to be added unless changes were made.&lt;br /&gt;
#Go into  the '''DNS Editor''' in WCP.&lt;br /&gt;
#Click '''Add Record'''.&lt;br /&gt;
#In the '''Record Name''' form put &amp;quot; '''mail''' &amp;quot;.&lt;br /&gt;
#Beside '''Type''' select '''A'''.&lt;br /&gt;
#Beside '''Data''' put the IP Address of your MailServer.&lt;br /&gt;
##You can find your MailServer by clicking the '''Site Details''' button in WCP.&lt;br /&gt;
##The IP Address can be found by PINGing the server, or by performing a WHOIS search.&lt;br /&gt;
#Once this is done click '''Save'''. Now you have an '''A Record''' labeled &amp;quot;mail.'''yourdomain'''.com&amp;quot;.&lt;br /&gt;
#You'll want to click '''Add Record''' again.&lt;br /&gt;
#Leave the Record Name blank this time.&lt;br /&gt;
#Beside '''Type''' select '''MX'''.&lt;br /&gt;
#Beside '''Data''' put &amp;quot;mail.'''yourdomain'''.com&amp;quot;.&lt;br /&gt;
#Once you click '''Save''', you will then have an '''MX Record''', which points to &amp;quot;mail.'''yourdomain'''.com&amp;quot;.&lt;br /&gt;
*Congratulations! Now all you need to do is wait for DNS Propagation, which is the 2-to-12hr time period it takes for the internet to update with these new changes.&lt;br /&gt;
&lt;br /&gt;
===SPF Records===&lt;br /&gt;
An SPF Record (simply an entry into the DNS records) is used by mail servers to know if mail coming from an address at your domain is really allowed to be sent from the sending mail server.&lt;br /&gt;
&lt;br /&gt;
To have WCP create an SPF record for you, you can click '''SPF Record''' under the '''Email Section''' and then click the '''Create''' button, or you can use the steps below to create one manually.&lt;br /&gt;
&lt;br /&gt;
If you will be using our servers send email related to your domain, you would generally use an SPF record like the following:&amp;lt;pre&amp;gt;&amp;quot;v=spf1 a mx include:spf.hostek.com -all&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For our Resellers that don't want to use hostek.com, use an SPF Record like:&amp;lt;pre&amp;gt;&amp;quot;v=spf1 a mx include:spf.ezhostingserver.com -all&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Steps to add an SPF Record to your domain:'''&lt;br /&gt;
Assuming that your DNS is managed with us:&lt;br /&gt;
#Log in to your hosting control panel at wcp.hostek.com&lt;br /&gt;
#Open the DNS Editor (DNS Manager) section&lt;br /&gt;
#Click on Add Record. &lt;br /&gt;
#Leave the Name field blank. &lt;br /&gt;
#For the Type, choose TXT&lt;br /&gt;
#For the Data enter the SPF Record detail as you need, using the sample provided above.&lt;br /&gt;
&lt;br /&gt;
'''Basic information related to some SPF Record options:'''&lt;br /&gt;
&lt;br /&gt;
The '''&amp;quot;-all&amp;quot;''' may be adjusted on a per customer basis to any of the following depending on their needs:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-all''' = mail not sent from an address listed in the SPF record should be completely rejected (Hard Fail). Mail that IS sent from an address in the SPF record may be given a lower spam score by some servers.&lt;br /&gt;
&lt;br /&gt;
'''~all''' = mail not sent from an address listed in the SPF record should be given a higher spam score(Soft Fail). Mail that IS sent from an address in the SPF record may be given a lower spam score by some servers.&lt;br /&gt;
&lt;br /&gt;
'''?all''' = mail not sent from an address listed in the SPF record should be treated normally as if the domain did not have an spf record (Neutral). Mail that IS sent from an address in the SPF record may be given a lower spam score by some servers.&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==Sub Domains==&lt;br /&gt;
*A sub-domain is like an extension of your domain name. For example, if your domain name were myfamily.com, a sub-domain would be in the following form: dad.myfamily.com or mom.myfamily.com etc.&lt;br /&gt;
*You can have a sub-domain pointed to any folder within your web site. If a visitor goes directly to that sub-domain he will be taken to that folder, not to your site's main page.&lt;br /&gt;
#Click on the '''Sub Domains icon'''&lt;br /&gt;
#Click &amp;quot;'''Add'''&amp;quot; sub Domain button &lt;br /&gt;
#Enter sub domain name in Name text box. This will automatically populate the Folder text box to a folder with the same name as the subdomain.&lt;br /&gt;
#If you wish this Subdomain to point to a different folder you can click on the folder icon and choose the directory you would like your Sub Domain to point to.&lt;br /&gt;
#Click on the &amp;quot;'''Save'''&amp;quot; Icon.&lt;br /&gt;
#This will create the sub domain record within your domains DNS zone, &lt;br /&gt;
*If the domains name servers are not pointed to us you will need to manually create this record where your domains DNS is hosted.&lt;br /&gt;
[[Category:Control-Panels]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==Domain Alias==&lt;br /&gt;
*This will allow you to point 2 domains to the same website. How to create a Domain&lt;br /&gt;
#To create a domain alias you will click on the ''Domain Aliases icon''&lt;br /&gt;
#Click '''Add Domain Alias''' button&lt;br /&gt;
#Enter your Alias Name&lt;br /&gt;
#Click on the &amp;quot;'''Save'''&amp;quot; Icon.&lt;br /&gt;
*You will need to be sure that your Domain Alias has been registered and has the name servers pointed to the name servers found beneath the Site Details icon.&lt;br /&gt;
&lt;br /&gt;
==Applications==&lt;br /&gt;
# Some helpful video tutorials showing how to install a select few applications easily within the WCP Control Panel are below:&lt;br /&gt;
&lt;br /&gt;
*Joomla - [http://hostek.com/tutorials/joomla_Installation_tutorial.html Installing Joomla Application]&lt;br /&gt;
&lt;br /&gt;
*Wordpress - [http://hostek.com/tutorials/wordpress_Installation_tutorial.html Installing Wordpress Application]&lt;br /&gt;
&lt;br /&gt;
*Mura - [http://hostek.com/tutorials/mura_Installation_tutorial.html Installing Mura Application]&lt;br /&gt;
&lt;br /&gt;
*Magento - [http://hostek.com/tutorials/magento_Installation_tutorial.html Installing Magento Application]&lt;br /&gt;
&lt;br /&gt;
*Oscommerce - [http://hostek.com/tutorials/oscommerce_Installation_tutorial.html Installing OsCommerce Application]&lt;br /&gt;
&lt;br /&gt;
==Email==&lt;br /&gt;
*Below is information on how to manage your email account within the WCP.&lt;br /&gt;
*'''FOR VPS''' You will also have &amp;quot;Admin&amp;quot; access to SmarterMail. Access webmail (click the webmail link in WCP) and login with user &amp;quot;admin&amp;quot; and the primary VPS password.&lt;br /&gt;
&lt;br /&gt;
==Email Users==&lt;br /&gt;
*Allows you to create Email users as well as log directly into users Webmail account&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click '''Users''' icon&lt;br /&gt;
#Click '''Add Email User''' button&lt;br /&gt;
#Enter email user name (Example: if you need the email address &amp;quot;admin@domain.com&amp;quot; enter the user &amp;quot;admin&amp;quot;)&lt;br /&gt;
#Enter password for Email user (**See note below regarding password requirements)&lt;br /&gt;
#Enter Display name (Usually set to the name of the person using the specific email account)&lt;br /&gt;
#Choose if you would like this user to have administrator rights&lt;br /&gt;
#Choose mail box size limit for this specific user&lt;br /&gt;
#Click on the '''Save'''&lt;br /&gt;
#'''NOTE Password requirements''' &lt;br /&gt;
*Minimum Length 6 Characters&lt;br /&gt;
*Must include Uppercase&lt;br /&gt;
*Must include Lowercase&lt;br /&gt;
*Must include Number&lt;br /&gt;
*Must include Special character&lt;br /&gt;
*Password cannot match username&lt;br /&gt;
&lt;br /&gt;
==Edit existing Email user==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click '''Users''' icon&lt;br /&gt;
#Click '''pencil icon''' next to user to update&lt;br /&gt;
#Update information&lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
&lt;br /&gt;
==Web mail==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click '''Login button''' next to user you would like access the mail for&lt;br /&gt;
*Web Mail Provides links to access the Webmail program as well as to access mail before domain propagation to our mail server&lt;br /&gt;
#Click '''Web Mail icon'''&lt;br /&gt;
#If domain is propagated and pointed to our mail server you can click the '''webmail''' link to access the SmarterMail webmail log in screen.&lt;br /&gt;
#If you domain has not yet propagated to our mail server click the &amp;quot;Pr-Propagation Web Mail&amp;quot; link to access the SmarterMail webmail log in screen.&lt;br /&gt;
&lt;br /&gt;
==Mail Forwarding==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
*Allows you to set up an email alias.&lt;br /&gt;
#Click on the '''Forwarding button'''&lt;br /&gt;
#Enter Alias name&lt;br /&gt;
#Enter address for email to this Alias to be forwarded to&lt;br /&gt;
#Click on the '''Save Icon'''&lt;br /&gt;
&lt;br /&gt;
==SPF Records==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
*Allows you to set up a SPF record&lt;br /&gt;
#Click on the '''Advanced''' button and then the '''SPF Record''' button&lt;br /&gt;
#Click the '''Create''' button&lt;br /&gt;
&lt;br /&gt;
==Domain Keys==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
*Allows you to set up Domain Keys&lt;br /&gt;
#Click on the '''Advanced''' button and then the '''Domain Keys''' button&lt;br /&gt;
#Click '''Enable'''&lt;br /&gt;
&lt;br /&gt;
==Mail Logs==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click on the '''Advanced''' button and then the '''Mail Logs''' button&lt;br /&gt;
#Select an email account&lt;br /&gt;
#Select a date and log type&lt;br /&gt;
#Click on Search&lt;br /&gt;
&lt;br /&gt;
==MySQL database==&lt;br /&gt;
*MySQL Allow you to create a MySQL database under your domain&lt;br /&gt;
#Click on '''MySQL icon'''&lt;br /&gt;
#To add new database click '''Add MySQL Database'''&lt;br /&gt;
#Enter Database Name&lt;br /&gt;
#Enter Username&lt;br /&gt;
#Enter Password&lt;br /&gt;
#(If you need a coldfusion DSN place check in check box and provide Coldfusion DSN name)&lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
&lt;br /&gt;
*To create new user for existing database&lt;br /&gt;
#Click '''MySQL icon'''&lt;br /&gt;
#Click '''Add new user button'''&lt;br /&gt;
#Enter Username&lt;br /&gt;
#Enter Password&lt;br /&gt;
#Place check mark in check box for each database you would like this user to have access to.&lt;br /&gt;
#To update the password on existing database user.&lt;br /&gt;
#Click '''MySQL icon'''&lt;br /&gt;
#Click '''pencil icon next to Username'''&lt;br /&gt;
#enter new password&lt;br /&gt;
#Click on the '''Save Icon'''.&lt;br /&gt;
&lt;br /&gt;
*To update the password on existing database user.&lt;br /&gt;
#Click '''MySQL icon'''&lt;br /&gt;
#Click pencil '''icon next to Username'''&lt;br /&gt;
#Enter new password&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==PhpMyAdmin==&lt;br /&gt;
*Allows you to log directly into your MySQL database to manage.&lt;br /&gt;
#Click on '''PhpMyAdmin link'''&lt;br /&gt;
#If you are not logged directly into your MySQL database simply enter the server your database is located on (Can be found by clicking the MySQL icon) and enter your Username and Password.&lt;br /&gt;
#Once logged in your Databases will be displayed on the Left, click on '''database name''' to manage that database.&lt;br /&gt;
*Here is a Video that will show how to create a MySQL database and how to Backup / Restore the database through PhpMyAdmin: [http://hostek.com/tutorials/managing_mysql.html PhpMyAdmin Backup and Restore Video]&lt;br /&gt;
&lt;br /&gt;
==MSSQL==&lt;br /&gt;
===To create MSSQL databases and users===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#To add a new database click '''Add MSSQL''' database&lt;br /&gt;
#Enter Database Name&lt;br /&gt;
#Choose database size&lt;br /&gt;
#Enter or Choose existing Username&lt;br /&gt;
#Enter Password&lt;br /&gt;
#Choose '''Default Collation''' (Usually left as default)&lt;br /&gt;
#Choose '''Recovery Model''' (Usually left as Simple as we make daily full backups of all #databases which we keep for 7 days)&lt;br /&gt;
#Place a Check mark in the box for Coldfusion DataSource if ColdFusion DSN is needed.&lt;br /&gt;
#Enter ColdFusion DSN name.&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To edit an existing MSSQL database===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil icon''' next to database name to edit&lt;br /&gt;
#Edit field necessary&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===Changing the MSSQL Transaction Log (Recovery Model) Settings===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil icon''' next to database name to edit&lt;br /&gt;
#Click the dropdown menu next to '''Recovery Model''' and select either '''Full''' or '''Simple'''&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To edit password for existing MSSQL user===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil next''' to user to edit&lt;br /&gt;
#Update password&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To add new MSSQL user===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Add MSSQL''' User button&lt;br /&gt;
#Enter username&lt;br /&gt;
#Enter password&lt;br /&gt;
#Place checkmark next to each database this users needs access to&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To make an MS SQL user the DB Owner===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil icon''' next to database name to edit&lt;br /&gt;
#Select the owner you wish to be the DB Owner&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==MSSQL Tools (Shared Hosting)==&lt;br /&gt;
*Allows you to log directly into MyLittleAdmin to manage your MSSQL database or MyLittleBackup to backup or restore your MSSQL database.&lt;br /&gt;
#Click '''MSSQL Tools''' icon&lt;br /&gt;
#Select database to Manage/Backup/Restore&lt;br /&gt;
#Select User with access to database needed&lt;br /&gt;
#Choose myLittleAdmin button to manage your MSSQL database&lt;br /&gt;
#Choose myLittleBackup button to backup/restore your database&lt;br /&gt;
&lt;br /&gt;
===To Backup and Download Your MSSQL Database===&lt;br /&gt;
&lt;br /&gt;
#Click '''MSSQL Tools''' icon&lt;br /&gt;
#Select database to Backup.&lt;br /&gt;
#Select User with access to database.&lt;br /&gt;
#Choose the myLittleBackup button.&lt;br /&gt;
#Click 'Backup Databases' at the top left of the new page.&lt;br /&gt;
#Select your database from the drop-down.&lt;br /&gt;
#Click 'OK' on Step 2 if the information looks correct.&lt;br /&gt;
#Name your backup and give it a description.&lt;br /&gt;
#Click 'Backup'.&lt;br /&gt;
#Click the link provided to download your SQL backup file.&lt;br /&gt;
&lt;br /&gt;
===To Restore an MSSQL Backup===&lt;br /&gt;
&lt;br /&gt;
#Click '''MSSQL Tools''' icon&lt;br /&gt;
#Select database to Backup.&lt;br /&gt;
#Select User with access to database.&lt;br /&gt;
#Choose the myLittleBackup button.&lt;br /&gt;
#Click 'Restore databases'&lt;br /&gt;
#Choose the database you want to restore into.&lt;br /&gt;
#Click 'Choose File' and select the SQL backup file on your computer. (Example SQL backup format: Backupname.bak)&lt;br /&gt;
#Click Upload.&lt;br /&gt;
#Click the backup file you just uploaded and press OK. &lt;br /&gt;
#Click Restore.&lt;br /&gt;
&lt;br /&gt;
==DataSources(DSN's)==&lt;br /&gt;
===Create a MySQL or MS SQL Server DSN===&lt;br /&gt;
*Allows to create a DSN for an existing database for your domain.&lt;br /&gt;
#To create a MySQL or MSSQL DataSource&lt;br /&gt;
#Click '''DataSources''' (DSN's) icon&lt;br /&gt;
#Choose MySQL or MSSQL from drop down depending on the database this is connecting to&lt;br /&gt;
#Click '''Add DSN'''&lt;br /&gt;
#Choose DSN type Access/MySQL/MSSQL&lt;br /&gt;
#Enter DSN name&lt;br /&gt;
#Enter Database name DSN will be connecting to&lt;br /&gt;
#Enter Server (Can by found by viewing database DSN is for)&lt;br /&gt;
#Enter Username for database DSN is connecting to&lt;br /&gt;
#Enter Password for database DSN is connecting to&lt;br /&gt;
#Choose if it is a ColdFusion DSN&lt;br /&gt;
#Choose if you need Unicode Support&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
===Create an Access DSN===&lt;br /&gt;
*To create an Access DataSource&lt;br /&gt;
#Click '''DataSources''' (DSN's) icon&lt;br /&gt;
#Choose '''Access''' from drop down menu&lt;br /&gt;
#Enter DSN Name&lt;br /&gt;
#Click on Folder icon to choose correct directory Access Database is located in&lt;br /&gt;
#Enter Username (If one is set for your Access Database, if not this can be left blank)&lt;br /&gt;
#Enter Password (If one is protecting your Database, if not this can be left blank)&lt;br /&gt;
#Choose if it needs to be a ColdFusion DSN&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
===Editing DSNs===&lt;br /&gt;
*To edit existing DSN&lt;br /&gt;
#Click '''DataSources''' (DSN's) icon&lt;br /&gt;
#Click pencil next to DSN to edit&lt;br /&gt;
#Update information&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==Lucee Web Administrator==&lt;br /&gt;
The Lucee Web Administrator gives you access to Lucee-specific settings for your account such as Lucee Datasources and other configuration options.&lt;br /&gt;
===Create a Lucee (formerly Railo) Datasource (DSN)===&lt;br /&gt;
#From within your control panel, click on the &amp;quot;Luce Web Administrator&amp;quot; icon&lt;br /&gt;
#Inside the Lucee Web Administrator click the &amp;quot;Datasources&amp;quot; link from the lefthand navigation menu. &lt;br /&gt;
#Select the database type, enter a name, and click ''Create''.&lt;br /&gt;
#Configure your datasource with all the correct server, username and password. &lt;br /&gt;
#*'''IMPORTANT''': If using MySQL also make sure the option for '''Alias Handling''' is enabled.&lt;br /&gt;
#Click the ''Create'' button, and your DSN will be available for use on your site.&lt;br /&gt;
&lt;br /&gt;
==Security and SSL==&lt;br /&gt;
Installing a new certificate, or re-keying an existing certificate.&lt;br /&gt;
&lt;br /&gt;
===Dedicated SSL===&lt;br /&gt;
'''VPS Hosting''' Request a static IP for sites added to your server which require SSL, we will provision the IP on the server and assign it in WCP for use with installing a Dedicated SSL.&lt;br /&gt;
&lt;br /&gt;
'''Shared Hosting''' If ordering a new certificate from Hostek.com you will be assigned a static IP, if importing from another provider you will need to request a static IP be assigned before the certificate can be activated.&lt;br /&gt;
&lt;br /&gt;
#Login to WCP, (select the domain, in some cases), Security and SSL, '''Dedicated SSL (click)'''&lt;br /&gt;
#Click '''Generate CSR (Certificate Signing Request)'''&lt;br /&gt;
#Fill in the requested information.&lt;br /&gt;
#Click Create&lt;br /&gt;
#Copy the '''Certificate Signing Request (CSR)''', which should be used when placing a new SSL order or re-keying an existing certificate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shared SSL(shared hosting)===&lt;br /&gt;
#Login to WCP, (select the domain, in some cases), Security and SSL, '''Shared SSL (click)'''&lt;br /&gt;
#Click '''Enable'''&lt;br /&gt;
#The URL for your sites shared SSL will be provided.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Manage IPs===&lt;br /&gt;
This tool allows you to specify if an IP is blocked or allowed, and whether your site is by default denying access.&lt;br /&gt;
&lt;br /&gt;
To block an IP:&lt;br /&gt;
#Grab the IP you need blocked from a log or from an email&lt;br /&gt;
#In the Deny IPs tool click Add&lt;br /&gt;
#Paste or type in the IP&lt;br /&gt;
#Choose Block in the drop down menu (By default it's set to Block)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
To block all IPs (Useful if your site is not live yet):&lt;br /&gt;
#Click the Settings tab at the top&lt;br /&gt;
#Open up the drop down menu next to Default Access&lt;br /&gt;
#Choose Block (By default this is Allow)&lt;br /&gt;
&lt;br /&gt;
==Stats==&lt;br /&gt;
*SmarterStats provides very detailed traffic information about your site's day-to-day activities for up to 14-months.&lt;br /&gt;
&lt;br /&gt;
===Enabling SmarterStats===&lt;br /&gt;
#Login to WCP here https://wcp.hostek.com/&lt;br /&gt;
#Click on the '''Stats''' button&lt;br /&gt;
#Click '''Enable SmarterStats'''&lt;br /&gt;
*This will start processing log information from now on, and will report it's findings for your review.&lt;br /&gt;
&lt;br /&gt;
===Resetting a SmarterStats Account Password===&lt;br /&gt;
#Login to WCP here https://wcp.hostek.com/&lt;br /&gt;
#Click on the '''Stats''' button&lt;br /&gt;
#Select the '''Pencil''' icon on the left-side of the chosen user&lt;br /&gt;
#Type a new password in the password box and click '''Save'''&lt;br /&gt;
#Select '''Login''' (on the right-side of the chosen user)&lt;br /&gt;
#Type in the new password that was just setup and click '''Login'''&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
To view your account's quotas and how much resources you have available:&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click the '''Usage''' icon&lt;br /&gt;
&lt;br /&gt;
Here you can see the limits and amount used for the following resources: '''Site Disk Space, Site Bandwidth, Mail Disk Space, MySQL Disk Space,''' and '''MS SQL Disk Space''' (if applicable)&lt;br /&gt;
&lt;br /&gt;
==Cron Jobs==&lt;br /&gt;
To add Cron Jobs to your site:&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click on the Cron Jobs button under the ColdFusion section&lt;br /&gt;
#Click Add&lt;br /&gt;
#Enter a name&lt;br /&gt;
#Enter the URL to be executed&lt;br /&gt;
#Select a  quick time interval or click advanced and set up your interval&lt;br /&gt;
#Click save&lt;br /&gt;
&lt;br /&gt;
==VPS Manager (VPS Accounts)==&lt;br /&gt;
&lt;br /&gt;
Overview of the '''VPS Manager''' section in the control panel.&lt;br /&gt;
&lt;br /&gt;
===Service Groups===&lt;br /&gt;
&lt;br /&gt;
The service groups section allows you to specify which services a domain should use when being created or when databases are added to the domain.  If you only have a single VPS server, the default service group will usually be used for everything.  However, if you have multiple servers, you can use this section to allow new domains to use services on both servers (I.E. Use one server for the website and another for the database).  It is also possible to create service groups that offers fewer services in-case you want to create domains with no dns, no mail, or no website.&lt;br /&gt;
&lt;br /&gt;
Options overview:&lt;br /&gt;
* '''Name''': A name you will use to reference this group of services when creating or modifying a domain&lt;br /&gt;
* '''Site Service''': The server on which the website for this domain will be created.&lt;br /&gt;
* '''Mail Service''': The server on which the mail account for this domain will be created.&lt;br /&gt;
* '''DNS Service''': The server on which the DNS zone for this domain will be created.&lt;br /&gt;
* '''MSSQL Service''': The server on which new MSSQL databases will be created.&lt;br /&gt;
* '''MySQL Service''': The server on which new MySQL databases will be created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server Details===&lt;br /&gt;
&lt;br /&gt;
This page gives a brief overview of resource resource usage on the server and the server's 'Computer Name' as configured in Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Firewall Management===&lt;br /&gt;
This page allows you to manage the Windows Firewall rules for some common ports.&lt;br /&gt;
[[File:Firewall mgmt.png]]&lt;br /&gt;
&lt;br /&gt;
===Restricting Access to a Port===&lt;br /&gt;
If you wish to restrict access to a port on your VPS do the following&lt;br /&gt;
*Open the Firewall Management section within your control panel's VPS Manager&lt;br /&gt;
*Click the pencil icon (edit) next to the service you wish to secure ''(eg. SQL Server, MySQL, Remote Desktop)''&lt;br /&gt;
*In the window that appears, choose one of the following from the ''Port Status'' dropdown menu:&lt;br /&gt;
**'''Closed''': Prevent any public access to the port&lt;br /&gt;
**'''Restricted''': Only allow select IPs access to the port&lt;br /&gt;
*Click ''Save'' once you've made your changes. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
''Example: Restricting Access to SQL Server Port'' &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Firewall sql.png]]&lt;br /&gt;
&lt;br /&gt;
===Service Manager===&lt;br /&gt;
&lt;br /&gt;
This page allows you to start, restart, or stop some common services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Add Domain===&lt;br /&gt;
&lt;br /&gt;
This section allows you to add new VPS domains (Web sites). &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Wcp-vps-add-domain.png]]&lt;br /&gt;
&lt;br /&gt;
After clicking the ''Add Domain'' button enter your site's domain name, FTP username &amp;amp; password, then select the service group and IP address if applicable. Once you click '''Save''' your new domain will be added to the server.&lt;br /&gt;
&lt;br /&gt;
===List Domains===&lt;br /&gt;
&lt;br /&gt;
This page lists existing VPS domains and allows you to remove or modify them.&lt;br /&gt;
&lt;br /&gt;
===Adding Static IPs===&lt;br /&gt;
#Click List Domains&lt;br /&gt;
#Click the Pencil icon next to the domain you want&lt;br /&gt;
#Under the IP click the drop down box (Note: you will need a static IP first. To order one, email support@hostek.com to request one added to your VPS)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
[[Category:Control-Panels]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;br /&gt;
[[Category:Railo-VPS]]&lt;br /&gt;
[[Category:Windows-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Wcp-vps-add-domain.png&amp;diff=2480</id>
		<title>File:Wcp-vps-add-domain.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Wcp-vps-add-domain.png&amp;diff=2480"/>
				<updated>2015-05-12T19:35:57Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ContentBox&amp;diff=2477</id>
		<title>ContentBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ContentBox&amp;diff=2477"/>
				<updated>2015-05-06T17:30:47Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Additional Details about ContentBox */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page contains instructions and links for configuring and using the ContentBox CMS.&lt;br /&gt;
&lt;br /&gt;
All [http://hostek.com/hosting/coldfusion/contentbox-hosting.asp ContentBox CMS hosting] accounts will have the files and database automatically added to new sites.  The ContentBox Installation Page section below has details on completing the initial setup screen.&lt;br /&gt;
&lt;br /&gt;
==CFML versions supported==&lt;br /&gt;
NOTE:  When the ContentBox hosting plan is selected, the appropriate version is selected and the application is auto installed, etc.  &lt;br /&gt;
&lt;br /&gt;
For those trying to get ContentBox working manually, the CFML versions supported are:&lt;br /&gt;
*ColdFusion 9.01&lt;br /&gt;
*ColdFusion 10 (but the upload feature will not work due to CF10 bug with J2EE sessions)&lt;br /&gt;
*Railo 4.0.X and above&lt;br /&gt;
&lt;br /&gt;
==ContentBox Installation==&lt;br /&gt;
&lt;br /&gt;
Instructions for completing the initial setup page for a new ContentBox CMS site.&lt;br /&gt;
&lt;br /&gt;
'''Note that the best way to install ContentBox is via our WCP Applications installer.'''  That takes all the manual part out of it.  If you prefer to install manually, go to http://www.gocontentbox.org/download and download the latest version of ContentBox.  Upload the file to your wwwroot folder to begin the installation.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:  The information below is just to let you know the fields you will encounter.  Do NOT enter your information on this page :)'''&lt;br /&gt;
&lt;br /&gt;
===Administrator===&lt;br /&gt;
&lt;br /&gt;
'''NOTE:  Additional administrators can be added after installation.'''&lt;br /&gt;
&lt;br /&gt;
* First Name &lt;br /&gt;
* Last Name  &lt;br /&gt;
* Email    &lt;br /&gt;
* Username - &lt;br /&gt;
* Password - &lt;br /&gt;
*It is recommended to use a '''strong password''', which should be remembered or kept in a secure place.&lt;br /&gt;
&lt;br /&gt;
===Site Information===&lt;br /&gt;
&lt;br /&gt;
* Populate Site With Sample Data - Adds a sample page, sample post, and sample comments to the site.  '''This is usually best for first time users.'''&lt;br /&gt;
* Site Name - Description provided on installation page.&lt;br /&gt;
* Administrator Email - Description provided on installation page.&lt;br /&gt;
* Outgoing Email - Description provided on installation page.&lt;br /&gt;
* Site Tag Line - Description provided on installation page.&lt;br /&gt;
* Site Description - Description provided on installation page.&lt;br /&gt;
* Site Keywords - Description provided on installation page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Mail Server===&lt;br /&gt;
&lt;br /&gt;
'''NOTE:  All these settings should be left as-is.  The ColdFusion installation will already have these mail settings configured correctly.&lt;br /&gt;
&lt;br /&gt;
* Mail Server&lt;br /&gt;
* Mail Server Username - '''Leave Blank'''&lt;br /&gt;
* Mail Server Password - '''Leave Blank'''&lt;br /&gt;
* Mail SMTP Port - '''Leave Blank'''&lt;br /&gt;
* Use TLS - '''No'''&lt;br /&gt;
* Use SSL - '''No'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Site URL Rewrites===&lt;br /&gt;
&lt;br /&gt;
* Enable Full URL Rewrites - Choose '''Yes''' and select '''iis7'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Start Installation!===&lt;br /&gt;
&lt;br /&gt;
* Click the '''Start Installation!''' button to complete the installation.&lt;br /&gt;
&lt;br /&gt;
==Additional Details about ContentBox==&lt;br /&gt;
&lt;br /&gt;
Official Site for [http://www.ortussolutions.com/products/contentbox ContentBox]&lt;br /&gt;
&lt;br /&gt;
===ContentBox Errors and Solutions===&lt;br /&gt;
====Error in instantiating the cfc modules.contentbox.model.system.EventHandler====&lt;br /&gt;
If you come across this error and are running version 2.0 or lower, please upgrade your ContentBox installation to version 2.1. You can obtain the latest installer from the [http://www.ortussolutions.com/products/contentbox/download ContentBox Download Page]. &lt;br /&gt;
 &lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Add_New_Site_to_Lucee_(formerly_Railo)_VPS&amp;diff=2470</id>
		<title>Add New Site to Lucee (formerly Railo) VPS</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Add_New_Site_to_Lucee_(formerly_Railo)_VPS&amp;diff=2470"/>
				<updated>2015-04-15T18:10:22Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: Jakeh moved page Add New Site to Railo VPS to Add New Site to Lucee (formerly Railo) VPS: updating to include Lucee references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
If your VPS has the WCP or cPanel installed, the server automatically configures a new site in Lucee (formerly Railo) when the domain is added through the control panel. However, if your server doesn't have a control panel and you need to add a site to your server manually, follow the appropriate instructions below.&lt;br /&gt;
&lt;br /&gt;
==Windows VPS - IIS / Tomcat==&lt;br /&gt;
#Add the site in IIS.&lt;br /&gt;
#Add a new virtual directory named &amp;quot;jakarta&amp;quot; to your new site, and have it use &amp;quot;C:\railo\connector&amp;quot; as the physical path.&lt;br /&gt;
#Add the site as a &amp;quot;Host&amp;quot; in Railo's server.xml file, located at c:\railo\tomcat\conf\server.xml. (Be sure to make a backup of the file first.) &amp;lt;br /&amp;gt;When you open the file in notepad, press ctrl+f and search for &amp;quot;&amp;lt;Host name=&amp;quot; (no quotes). Then add the host entry for the new site to this section. For example, your new host entry would look similar to this:&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;Host name=&amp;quot;newdomainname.com&amp;quot;  appBase=&amp;quot;webapps&amp;quot; unpackWARs=&amp;quot;false&amp;quot; autoDeploy=&amp;quot;true&amp;quot; xmlValidation=&amp;quot;false&amp;quot; xmlNamespaceAware=&amp;quot;false&amp;quot;&amp;gt; &amp;lt;Alias&amp;gt;&amp;lt;/Alias&amp;gt; &amp;lt;Context path=&amp;quot;&amp;quot; docBase=&amp;quot;c:\home\newdomainname.com\wwwroot\&amp;quot;/&amp;gt; &amp;lt;/Host&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;You'd just need to be sure to replace the host name and the path in the context docbase with the correct info.&lt;br /&gt;
#*If you need to add an alias to the domain, you would add it within the &amp;quot;Host&amp;quot; entry in an &amp;quot;Alias&amp;quot; tag like below&amp;quot; &amp;lt;pre&amp;gt;&amp;lt;Alias&amp;gt;www.domain1.com&amp;lt;/Alias&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Once this has been done, restart the Apache Tomcat Railo service and your site will begin processing CFML files through Railo.&lt;br /&gt;
&lt;br /&gt;
==Linux VPS - Apache (httpd) / Tomcat==&lt;br /&gt;
#Add the site to Apache. If your server has cPanel but is not integrated with Railo, you can still [[Reseller_Management#Adding_New_Account.28s.29_to_your_Reseller|add the site to Apache via cPanel]].&lt;br /&gt;
#Open your server's Tomcat server.xml file (using vi, pico, etc). This currently defaults to '''/opt/railo/tomcat/conf/server.xml'''.&lt;br /&gt;
#Add a new host entry for the site similar to this: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;Host name=&amp;quot;newdomainname.com&amp;quot;  appBase=&amp;quot;webapps&amp;quot; unpackWARs=&amp;quot;false&amp;quot; autoDeploy=&amp;quot;true&amp;quot; xmlValidation=&amp;quot;false&amp;quot; xmlNamespaceAware=&amp;quot;false&amp;quot;&amp;gt; &amp;lt;Alias&amp;gt;&amp;lt;/Alias&amp;gt; &amp;lt;Context path=&amp;quot;&amp;quot; docBase=&amp;quot;/home/newuser/public_html&amp;quot;/&amp;gt; &amp;lt;/Host&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;Be sure to use the correct domain name/path in the example above.&lt;br /&gt;
#After saving the file, restart Railo using the command below, and your new domain will start processing CFML: &amp;lt;pre&amp;gt;service railo_ctl restart&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessing the Lucee (formerly Railo) Web Admin for my new site==&lt;br /&gt;
The URL for any new site (context) you add to Lucee, will be: http://newsite.com/railo-context/admin/web.cfm  ''(replace newsite.com with the actual domain name)''&lt;br /&gt;
&lt;br /&gt;
==What is the location for my Lucee (formerly Railo) Server Administrator==&lt;br /&gt;
On the desktop of your VPS, you can access the Lucee Server Administrator at this location: http://localhost/railo-context/admin/server.cfm&lt;br /&gt;
&lt;br /&gt;
If your server still runs Railo, you would use this: http://localhost/railo-context/admin/server.cfm&lt;br /&gt;
&lt;br /&gt;
If you are running Lucee on Linux or just wish to access the Server Administrator remotely, replace &amp;quot;localhost&amp;quot; with the IP of your server or a domain name running on your server.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lucee]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Add_New_Site_to_Railo_VPS&amp;diff=2471</id>
		<title>Add New Site to Railo VPS</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Add_New_Site_to_Railo_VPS&amp;diff=2471"/>
				<updated>2015-04-15T18:10:22Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: Jakeh moved page Add New Site to Railo VPS to Add New Site to Lucee (formerly Railo) VPS: updating to include Lucee references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Add New Site to Lucee (formerly Railo) VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Add_New_Site_to_Lucee_(formerly_Railo)_VPS&amp;diff=2469</id>
		<title>Add New Site to Lucee (formerly Railo) VPS</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Add_New_Site_to_Lucee_(formerly_Railo)_VPS&amp;diff=2469"/>
				<updated>2015-04-15T17:58:37Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
If your VPS has the WCP or cPanel installed, the server automatically configures a new site in Lucee (formerly Railo) when the domain is added through the control panel. However, if your server doesn't have a control panel and you need to add a site to your server manually, follow the appropriate instructions below.&lt;br /&gt;
&lt;br /&gt;
==Windows VPS - IIS / Tomcat==&lt;br /&gt;
#Add the site in IIS.&lt;br /&gt;
#Add a new virtual directory named &amp;quot;jakarta&amp;quot; to your new site, and have it use &amp;quot;C:\railo\connector&amp;quot; as the physical path.&lt;br /&gt;
#Add the site as a &amp;quot;Host&amp;quot; in Railo's server.xml file, located at c:\railo\tomcat\conf\server.xml. (Be sure to make a backup of the file first.) &amp;lt;br /&amp;gt;When you open the file in notepad, press ctrl+f and search for &amp;quot;&amp;lt;Host name=&amp;quot; (no quotes). Then add the host entry for the new site to this section. For example, your new host entry would look similar to this:&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;Host name=&amp;quot;newdomainname.com&amp;quot;  appBase=&amp;quot;webapps&amp;quot; unpackWARs=&amp;quot;false&amp;quot; autoDeploy=&amp;quot;true&amp;quot; xmlValidation=&amp;quot;false&amp;quot; xmlNamespaceAware=&amp;quot;false&amp;quot;&amp;gt; &amp;lt;Alias&amp;gt;&amp;lt;/Alias&amp;gt; &amp;lt;Context path=&amp;quot;&amp;quot; docBase=&amp;quot;c:\home\newdomainname.com\wwwroot\&amp;quot;/&amp;gt; &amp;lt;/Host&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;You'd just need to be sure to replace the host name and the path in the context docbase with the correct info.&lt;br /&gt;
#*If you need to add an alias to the domain, you would add it within the &amp;quot;Host&amp;quot; entry in an &amp;quot;Alias&amp;quot; tag like below&amp;quot; &amp;lt;pre&amp;gt;&amp;lt;Alias&amp;gt;www.domain1.com&amp;lt;/Alias&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Once this has been done, restart the Apache Tomcat Railo service and your site will begin processing CFML files through Railo.&lt;br /&gt;
&lt;br /&gt;
==Linux VPS - Apache (httpd) / Tomcat==&lt;br /&gt;
#Add the site to Apache. If your server has cPanel but is not integrated with Railo, you can still [[Reseller_Management#Adding_New_Account.28s.29_to_your_Reseller|add the site to Apache via cPanel]].&lt;br /&gt;
#Open your server's Tomcat server.xml file (using vi, pico, etc). This currently defaults to '''/opt/railo/tomcat/conf/server.xml'''.&lt;br /&gt;
#Add a new host entry for the site similar to this: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;Host name=&amp;quot;newdomainname.com&amp;quot;  appBase=&amp;quot;webapps&amp;quot; unpackWARs=&amp;quot;false&amp;quot; autoDeploy=&amp;quot;true&amp;quot; xmlValidation=&amp;quot;false&amp;quot; xmlNamespaceAware=&amp;quot;false&amp;quot;&amp;gt; &amp;lt;Alias&amp;gt;&amp;lt;/Alias&amp;gt; &amp;lt;Context path=&amp;quot;&amp;quot; docBase=&amp;quot;/home/newuser/public_html&amp;quot;/&amp;gt; &amp;lt;/Host&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;Be sure to use the correct domain name/path in the example above.&lt;br /&gt;
#After saving the file, restart Railo using the command below, and your new domain will start processing CFML: &amp;lt;pre&amp;gt;service railo_ctl restart&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Accessing the Lucee (formerly Railo) Web Admin for my new site==&lt;br /&gt;
The URL for any new site (context) you add to Lucee, will be: http://newsite.com/railo-context/admin/web.cfm  ''(replace newsite.com with the actual domain name)''&lt;br /&gt;
&lt;br /&gt;
==What is the location for my Lucee (formerly Railo) Server Administrator==&lt;br /&gt;
On the desktop of your VPS, you can access the Lucee Server Administrator at this location: http://localhost/railo-context/admin/server.cfm&lt;br /&gt;
&lt;br /&gt;
If your server still runs Railo, you would use this: http://localhost/railo-context/admin/server.cfm&lt;br /&gt;
&lt;br /&gt;
If you are running Lucee on Linux or just wish to access the Server Administrator remotely, replace &amp;quot;localhost&amp;quot; with the IP of your server or a domain name running on your server.&lt;br /&gt;
&lt;br /&gt;
[[Category:Lucee]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=WCP_(Windows_based_Control_Panel)&amp;diff=2457</id>
		<title>WCP (Windows based Control Panel)</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=WCP_(Windows_based_Control_Panel)&amp;diff=2457"/>
				<updated>2015-04-08T15:15:28Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Create a Lucee Datasource (DSN) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==How To Login To My WCP Control Panel==&lt;br /&gt;
#To manage your domain, login to the WCP Control Panel, using the details below&lt;br /&gt;
#URL: '''https://wcp.hostek.com'''/&lt;br /&gt;
#Username: &lt;br /&gt;
#Password: ** same as your cp.hostek.com password **&lt;br /&gt;
*You can also login to the control panel through your billing control panel https://cp.hostek.com/clientarea.php&lt;br /&gt;
#Click on  ''''My Services'''' 'Click the '''small Green arrow''' on the the notepad to the right'&lt;br /&gt;
#Now click the '''Login to Control Panel''' Icon'''&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==Custom URL for the WCP Control Panel==&lt;br /&gt;
The WCP can als be accessed by wcp.your_domain.com&lt;br /&gt;
&lt;br /&gt;
Setup wcp.your_domain.com as an A record for &amp;quot;184.175.108.65&amp;quot; or as a CName record for &amp;quot;wcp.ezhostingserver.com&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Resellers and VPS - WCP White label Settings===&lt;br /&gt;
Resellers and VPS customers can setup their logo in their Reseller control panel, however those additional features will only be available when accessing the control panel using the specific domain they configured within the Reseller Setttings of the control panel. The Reseller settings will be available using '''any''' URL, and as mentioned within these settings the reseller '''URL''' can be setup and other whitelabel options (custom control panel logo, favicon, etc.) making WCP the ultimate Windows Control Panel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Windows VPS]]&lt;br /&gt;
[[Category:Resellers]]&lt;br /&gt;
&lt;br /&gt;
==Adding Additional Control Panel Logins==&lt;br /&gt;
*This will allow you to set up additional control panel logins for you or for others involved in editing or managing your account. You can limit the Permissions or options available for them to manage.&lt;br /&gt;
#Login to the WCP Control Panel, using the details below&lt;br /&gt;
#URL: '''https://wcp.hostek.com'''/&lt;br /&gt;
#Username: &lt;br /&gt;
#Password: ** same as your cp.hostek.com password **&lt;br /&gt;
#Click on the '''Control panel Logins''' tab, then click on the '''Add''' icon.&lt;br /&gt;
#Put the &amp;quot;Username, Password and if you want them to have Limited Permission.&lt;br /&gt;
#If you want them to have Limited Permission then check the '''Limited Permission''' box. This will load a dropdown where you can select what privlages they have to manage.&lt;br /&gt;
#Once you are done click the '''Save''' icon at the bottom of the screen.&lt;br /&gt;
#Once it has been added you or they can login by going to https://wcp.hostek.com/Login.aspx and using the username and password that you set for it.&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:Lucee]]&lt;br /&gt;
==Unlimited Plans - Add Additional Domains==&lt;br /&gt;
You will want to follow these steps in to generate a +1 Control Panel for a separate Domain. (Please note the difference between Registration and Hosting: [https://wiki.hostek.com/Domain_Registration_and_Domain_Name_Management#Domain_Registration_Information_vs._Domain_Hosting_Information  '''here''')] &amp;lt;br clear=all&amp;gt; This would be under your Windows Unlimited account, or your Windows Business/Pro plan.&lt;br /&gt;
&lt;br /&gt;
#Login to your WCP control panel&lt;br /&gt;
#*Windows Unlimited: For adding a third (or more) domain select any domain from the upper right hand corner dropdown box &amp;quot;Domains&amp;quot;.&lt;br /&gt;
#Within the &amp;quot;Domains&amp;quot; box click the &amp;quot;Addon Domains&amp;quot; icon.&lt;br /&gt;
#Click &amp;quot;Add&amp;quot; and enter the following:&lt;br /&gt;
#*Domain Name&lt;br /&gt;
#*Username&lt;br /&gt;
#*Password&lt;br /&gt;
#Click &amp;quot;Save&amp;quot;&lt;br /&gt;
#To manage the domain, you can now select it from the '''Domains''' drop-down list/box.&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
&lt;br /&gt;
==Site Details==&lt;br /&gt;
We recommend you review the &amp;quot;Site Settings&amp;quot; which includes many important details about your domain including:&lt;br /&gt;
&lt;br /&gt;
WCP (login and select domain) &amp;gt; Website Settings &amp;gt; '''Site Details'''&lt;br /&gt;
&lt;br /&gt;
*Testing URL&lt;br /&gt;
*Primary and Secondary DNS&lt;br /&gt;
*Site IP&lt;br /&gt;
*Web Root Path&lt;br /&gt;
*FTP Root Path&lt;br /&gt;
===IIS Version &amp;amp; ColdFusion Version (if applicable)===&lt;br /&gt;
To get your domain's IIS Version and ColdFusion Version (if applicable) log in to WCP and under the Settings section, click on the Site Details option.&lt;br /&gt;
&lt;br /&gt;
==FTP Accounts==&lt;br /&gt;
*Adding or editing FTP accounts.&lt;br /&gt;
#click on the '''FTP Accounts''' tab.&lt;br /&gt;
#To edit one click on the little '''Pencil Icon''' to the left, to add one click on the '''Add FTP User''' tab.&lt;br /&gt;
#If you are adding one you will set the Username:, Password: and folder then click the #Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==Virtual Directories==&lt;br /&gt;
*Adding virtual directories to your site.&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click on Virtual Directories under the Files section&lt;br /&gt;
#Click Add&lt;br /&gt;
#Enter the virtual path you need&lt;br /&gt;
#Enter in the actual physical path it is mapped to&lt;br /&gt;
#If this is to be an application, check the Create Application Folder check box&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
==Application Folders==&lt;br /&gt;
To create and manage Application Folders on your site&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click on Application Folders under the Files section&lt;br /&gt;
#Select the site or sub-domain from the drop down box&lt;br /&gt;
#Click continue&lt;br /&gt;
#Select a folder&lt;br /&gt;
#Click Add Application to make it an application folder&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==File Manager== &lt;br /&gt;
*Basic File Operations, file uploading and editing now supported- Zip, GZip, and Tar Archive support.&lt;br /&gt;
#Click on the '''File Manager icon''', then the '''Login icon''' on the next screen.&lt;br /&gt;
#To create files or Directory's outside the WWW root folder right click and click on the '''Create File''' or '''Create Directory''' option.&lt;br /&gt;
#Click the '''Continue Icon''' to add this.&lt;br /&gt;
#To add/edit files in the WWWroot click on the '''wwwroot file'''.&lt;br /&gt;
#once you are in you can add, edit or delete by right clicking and clicking on the options given.&lt;br /&gt;
&lt;br /&gt;
*Upload and Download functions&lt;br /&gt;
#To upload a file, right click the File Manager page, and click Upload&lt;br /&gt;
#Select the file you wish to upload by clicking Choose File&lt;br /&gt;
#Give this file a new name or keep the existing default name&lt;br /&gt;
&lt;br /&gt;
#To download a file, right click the file you want to download&lt;br /&gt;
#Click Download File. Note: This will send you to a new page.&lt;br /&gt;
#Now your browser will be downloading the file in question. Simply check your Downloads folder or hit Ctrl+J to open the Downloads section of your browser and move this file where you want it.&lt;br /&gt;
&lt;br /&gt;
*NEW: Use the search bar at the top of the File Manager to quickly search the file you're looking for.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
&lt;br /&gt;
==Password Protect Folders==&lt;br /&gt;
#Under the Files section click on '''Password Protect'''.&lt;br /&gt;
#Click on '''Manage Protected Folders'''.&lt;br /&gt;
#Browse to and click on the folder that you want to set this up on and check '''Enable Protection'''. &lt;br /&gt;
#Select a user from the list or click on '''Manage Users''', then click '''Add''', and enter username and password then Save. &lt;br /&gt;
&lt;br /&gt;
==IIS Settings==&lt;br /&gt;
*Setting up error pages, default pages, advanced settings, etc.&lt;br /&gt;
===Custom Error pages===&lt;br /&gt;
#Click on '''IIS Settings''' in your WCP&lt;br /&gt;
#Click the edit button next to the error page you want to change&lt;br /&gt;
#Uncheck the '''Use System Default''' checkbox &lt;br /&gt;
#Enter the path to your custom error page &lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
===Mime Types===&lt;br /&gt;
#Click on '''IIS Settings''' in your WCP&lt;br /&gt;
#Scroll to the bottom of the window and click '''Add Mime Type'''&lt;br /&gt;
#Enter the extension for the Mime Type&lt;br /&gt;
#Enter the Mime Type information&lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
*An example Mime Type is below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Extension: .mp3&lt;br /&gt;
Mime Type: audio/mpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information here: [https://wiki.hostek.com/Mime_types Mime Types]&lt;br /&gt;
&lt;br /&gt;
===Default Docs===&lt;br /&gt;
*Select a default document and drag it to the top position to set it as top priority&lt;br /&gt;
*Click '''Add''' to add a default doc&lt;br /&gt;
*Click the red '''X''' to delete a default doc&lt;br /&gt;
*Click a default doc and change the name&lt;br /&gt;
*For example: change '''&amp;quot;index.htm&amp;quot;''' to '''&amp;quot;index.asp&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
===URL Forwarding===&lt;br /&gt;
#In your [https://wcp.hostek.com/ '''WCP'''] click on the '''IIS Settings''' button&lt;br /&gt;
#Navigate to the '''Redirects''' tab&lt;br /&gt;
# If you need a specific folder to redirect somewhere, you can find it using the '''Browse''' button&lt;br /&gt;
##If you simply want the whole site to redirect, leave this box '''blank'''&lt;br /&gt;
#Click '''Save'''. (See below for details on the other options.)&lt;br /&gt;
*'''Permanent Redirect''': Specifies that the server should return the redirect status code 301 rather than the default 302. A 301 status code lets search engines know that the content has been permanently moved and that only the new URL should be indexed.&lt;br /&gt;
*'''Exact URL''': If this is unchecked, then the request URL without the server name is passed along with the query string to the destination URL. This is equivelent to appending the $V$Q variables at the end of the destination URL.&lt;br /&gt;
*'''Exclude Sub Directories''': This means that the folder you choose will not redirect.&lt;br /&gt;
&lt;br /&gt;
===Advanced===&lt;br /&gt;
====Recycle Application Pool====&lt;br /&gt;
If you see a Service Unavailable message on your site, or have a general need to recycle a site's IIS Application Pool, you can do so through this section of WCP. &lt;br /&gt;
#Click the '''IIS Settings''' icon in WCP&lt;br /&gt;
#Click the '''Advanced''' tab in the '''IIS Settings''' section&lt;br /&gt;
#Click the '''Recycle''' button.&lt;br /&gt;
&lt;br /&gt;
==PHP Settings==&lt;br /&gt;
If you notice you need a different version of php or want to check what version you are using you can update it to that version if it is installed to the server or can enable custom php.ini settings to use specifically for your domain.&lt;br /&gt;
#Click the configuration for the domain or subdomain you want updated.&lt;br /&gt;
#Select the version you wish to use.&lt;br /&gt;
#Check the checkbox if you want to enable a custom php.ini file&lt;br /&gt;
#Click save to save the settings.&lt;br /&gt;
&lt;br /&gt;
==ColdFusion==&lt;br /&gt;
===ColdFusion Error Logs===&lt;br /&gt;
====Server Error Logs====&lt;br /&gt;
This section will show any recent errors for your site that were found within ColdFusion's server-wide exception log. Use the dropdown to choose how many hours back you'd like errors retrieved. &lt;br /&gt;
====Application Error Logs====&lt;br /&gt;
This section will show errors created via the cflog tag on your site. For security purposes, your cflog logs will only appear hear if you have given the file name in the cflog tag the name of your domain, ''without the www.'' For example, if your domain is ''your_domain.com'' you would set the file attribute for the cflog tag like: ''file=&amp;quot;your_domain.com&amp;quot;''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
''Note'': Please set the ''type'' of the ''cflog'' tag to either '''error''' or '''fatal''' on our production servers. Use of the ''information'' type is strongly discouraged. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Reference''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/cflog CFLog Documentation]&lt;br /&gt;
&lt;br /&gt;
===Clear Template Cache===&lt;br /&gt;
Within this section you can click the '''Clear Template Cache''' button to clear cached ColdFusion pages for your site. &lt;br /&gt;
&lt;br /&gt;
===ColdFusion Version===&lt;br /&gt;
Within this section of WCP, you can choose which version of ColdFusion you'd like your site to use. &lt;br /&gt;
&lt;br /&gt;
''Note'': You can also specify different ColdFusion versions for different subdomains on your site.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
&lt;br /&gt;
==DNS Editor==&lt;br /&gt;
'''READ FIRST''' When a new domain is added to WCP all DNS records are also created (in most cases). Clicking on the DNS Editor will open a window with these records, for editing, adding and deleting. Most times nothing needs to be done other than pointing your domain to the Primary and Secondary DNS Servers listed under [https://wiki.hostek.com/WCP_(Windows_based_Control_Panel)#Site_Details WCP Site Details].&lt;br /&gt;
&lt;br /&gt;
===Create a new DNS record===&lt;br /&gt;
#Click '''Add DNS''' Record button&lt;br /&gt;
#Enter Name for record (If DNS record name is your domain name please leave this Name - text box blank as the control panel will automatically add your domain name)&lt;br /&gt;
#Choose the Record type (A, CNAME, MX, NS, TXT, SPF, SRV)&lt;br /&gt;
#Enter Data Type&lt;br /&gt;
#Generally leave the TTL (Time To Live) as the default 86400&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===Update DNS records===&lt;br /&gt;
#To update an existing DNS record click the '''Pencil''' icon next to the record you would like to update.&lt;br /&gt;
#You will then be able to change the Name of the record, the Type of record, Data of the record, and Time to Live.&lt;br /&gt;
#Once updated Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===SVR Record Fields===&lt;br /&gt;
*A SVR Record is a &amp;quot;'''S'''er'''v'''ice '''R'''ecord&amp;quot;. It's a specification of data in the Domain Name System defining the location (i.e. the hostname and port number) of servers for specified services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: _service._protocol&lt;br /&gt;
Type: SRV&lt;br /&gt;
Data: Address/Hostname&lt;br /&gt;
Priority: Priority Number&lt;br /&gt;
Weight: Weight Number&lt;br /&gt;
Port: Port Number&lt;br /&gt;
TTL: 86400&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: _sip._udp&lt;br /&gt;
Type: SRV&lt;br /&gt;
Data: sip.mydomain.com&lt;br /&gt;
Priority: 10&lt;br /&gt;
Weight: 5&lt;br /&gt;
Port: 4030&lt;br /&gt;
TTL: 86400&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you are a '''VPS Client''' with a Windows Server and a SmarterMail Active Sync license wanting to use Autodiscover for Outlook, please refer to this SmarterMail Article [https://portal.smartertools.com/kb/a2752/set-up-autodiscover-for-smartermail.aspx here].&lt;br /&gt;
&lt;br /&gt;
===MX Records===&lt;br /&gt;
Here are steps to setup the correct MX Records for our MailSystem:&lt;br /&gt;
*Note: These are setup by Default, and shouldn't need to be added unless changes were made.&lt;br /&gt;
#Go into  the '''DNS Editor''' in WCP.&lt;br /&gt;
#Click '''Add Record'''.&lt;br /&gt;
#In the '''Record Name''' form put &amp;quot; '''mail''' &amp;quot;.&lt;br /&gt;
#Beside '''Type''' select '''A'''.&lt;br /&gt;
#Beside '''Data''' put the IP Address of your MailServer.&lt;br /&gt;
##You can find your MailServer by clicking the '''Site Details''' button in WCP.&lt;br /&gt;
##The IP Address can be found by PINGing the server, or by performing a WHOIS search.&lt;br /&gt;
#Once this is done click '''Save'''. Now you have an '''A Record''' labeled &amp;quot;mail.'''yourdomain'''.com&amp;quot;.&lt;br /&gt;
#You'll want to click '''Add Record''' again.&lt;br /&gt;
#Leave the Record Name blank this time.&lt;br /&gt;
#Beside '''Type''' select '''MX'''.&lt;br /&gt;
#Beside '''Data''' put &amp;quot;mail.'''yourdomain'''.com&amp;quot;.&lt;br /&gt;
#Once you click '''Save''', you will then have an '''MX Record''', which points to &amp;quot;mail.'''yourdomain'''.com&amp;quot;.&lt;br /&gt;
*Congratulations! Now all you need to do is wait for DNS Propagation, which is the 2-to-12hr time period it takes for the internet to update with these new changes.&lt;br /&gt;
&lt;br /&gt;
===SPF Records===&lt;br /&gt;
An SPF Record (simply an entry into the DNS records) is used by mail servers to know if mail coming from an address at your domain is really allowed to be sent from the sending mail server.&lt;br /&gt;
&lt;br /&gt;
To have WCP create an SPF record for you, you can click '''SPF Record''' under the '''Email Section''' and then click the '''Create''' button, or you can use the steps below to create one manually.&lt;br /&gt;
&lt;br /&gt;
If you will be using our servers send email related to your domain, you would generally use an SPF record like the following:&amp;lt;pre&amp;gt;&amp;quot;v=spf1 a mx include:spf.hostek.com -all&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For our Resellers that don't want to use hostek.com, use an SPF Record like:&amp;lt;pre&amp;gt;&amp;quot;v=spf1 a mx include:spf.ezhostingserver.com -all&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Steps to add an SPF Record to your domain:'''&lt;br /&gt;
Assuming that your DNS is managed with us:&lt;br /&gt;
#Log in to your hosting control panel at wcp.hostek.com&lt;br /&gt;
#Open the DNS Editor (DNS Manager) section&lt;br /&gt;
#Click on Add Record. &lt;br /&gt;
#Leave the Name field blank. &lt;br /&gt;
#For the Type, choose TXT&lt;br /&gt;
#For the Data enter the SPF Record detail as you need, using the sample provided above.&lt;br /&gt;
&lt;br /&gt;
'''Basic information related to some SPF Record options:'''&lt;br /&gt;
&lt;br /&gt;
The '''&amp;quot;-all&amp;quot;''' may be adjusted on a per customer basis to any of the following depending on their needs:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-all''' = mail not sent from an address listed in the SPF record should be completely rejected (Hard Fail). Mail that IS sent from an address in the SPF record may be given a lower spam score by some servers.&lt;br /&gt;
&lt;br /&gt;
'''~all''' = mail not sent from an address listed in the SPF record should be given a higher spam score(Soft Fail). Mail that IS sent from an address in the SPF record may be given a lower spam score by some servers.&lt;br /&gt;
&lt;br /&gt;
'''?all''' = mail not sent from an address listed in the SPF record should be treated normally as if the domain did not have an spf record (Neutral). Mail that IS sent from an address in the SPF record may be given a lower spam score by some servers.&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==Sub Domains==&lt;br /&gt;
*A sub-domain is like an extension of your domain name. For example, if your domain name were myfamily.com, a sub-domain would be in the following form: dad.myfamily.com or mom.myfamily.com etc.&lt;br /&gt;
*You can have a sub-domain pointed to any folder within your web site. If a visitor goes directly to that sub-domain he will be taken to that folder, not to your site's main page.&lt;br /&gt;
#Click on the '''Sub Domains icon'''&lt;br /&gt;
#Click &amp;quot;'''Add'''&amp;quot; sub Domain button &lt;br /&gt;
#Enter sub domain name in Name text box. This will automatically populate the Folder text box to a folder with the same name as the subdomain.&lt;br /&gt;
#If you wish this Subdomain to point to a different folder you can click on the folder icon and choose the directory you would like your Sub Domain to point to.&lt;br /&gt;
#Click on the &amp;quot;'''Save'''&amp;quot; Icon.&lt;br /&gt;
#This will create the sub domain record within your domains DNS zone, &lt;br /&gt;
*If the domains name servers are not pointed to us you will need to manually create this record where your domains DNS is hosted.&lt;br /&gt;
[[Category:Control-Panels]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==Domain Alias==&lt;br /&gt;
*This will allow you to point 2 domains to the same website. How to create a Domain&lt;br /&gt;
#To create a domain alias you will click on the ''Domain Aliases icon''&lt;br /&gt;
#Click '''Add Domain Alias''' button&lt;br /&gt;
#Enter your Alias Name&lt;br /&gt;
#Click on the &amp;quot;'''Save'''&amp;quot; Icon.&lt;br /&gt;
*You will need to be sure that your Domain Alias has been registered and has the name servers pointed to the name servers found beneath the Site Details icon.&lt;br /&gt;
&lt;br /&gt;
==Applications==&lt;br /&gt;
# Some helpful video tutorials showing how to install a select few applications easily within the WCP Control Panel are below:&lt;br /&gt;
&lt;br /&gt;
*Joomla - [http://hostek.com/tutorials/joomla_Installation_tutorial.html Installing Joomla Application]&lt;br /&gt;
&lt;br /&gt;
*Wordpress - [http://hostek.com/tutorials/wordpress_Installation_tutorial.html Installing Wordpress Application]&lt;br /&gt;
&lt;br /&gt;
*Mura - [http://hostek.com/tutorials/mura_Installation_tutorial.html Installing Mura Application]&lt;br /&gt;
&lt;br /&gt;
*Magento - [http://hostek.com/tutorials/magento_Installation_tutorial.html Installing Magento Application]&lt;br /&gt;
&lt;br /&gt;
*Oscommerce - [http://hostek.com/tutorials/oscommerce_Installation_tutorial.html Installing OsCommerce Application]&lt;br /&gt;
&lt;br /&gt;
==Email==&lt;br /&gt;
*Below is information on how to manage your email account within the WCP.&lt;br /&gt;
*'''FOR VPS''' You will also have &amp;quot;Admin&amp;quot; access to SmarterMail. Access webmail (click the webmail link in WCP) and login with user &amp;quot;admin&amp;quot; and the primary VPS password.&lt;br /&gt;
&lt;br /&gt;
==Email Users==&lt;br /&gt;
*Allows you to create Email users as well as log directly into users Webmail account&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click '''Users''' icon&lt;br /&gt;
#Click '''Add Email User''' button&lt;br /&gt;
#Enter email user name (Example: if you need the email address &amp;quot;admin@domain.com&amp;quot; enter the user &amp;quot;admin&amp;quot;)&lt;br /&gt;
#Enter password for Email user (**See note below regarding password requirements)&lt;br /&gt;
#Enter Display name (Usually set to the name of the person using the specific email account)&lt;br /&gt;
#Choose if you would like this user to have administrator rights&lt;br /&gt;
#Choose mail box size limit for this specific user&lt;br /&gt;
#Click on the '''Save'''&lt;br /&gt;
#'''NOTE Password requirements''' &lt;br /&gt;
*Minimum Length 6 Characters&lt;br /&gt;
*Must include Uppercase&lt;br /&gt;
*Must include Lowercase&lt;br /&gt;
*Must include Number&lt;br /&gt;
*Must include Special character&lt;br /&gt;
*Password cannot match username&lt;br /&gt;
&lt;br /&gt;
==Edit existing Email user==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click '''Users''' icon&lt;br /&gt;
#Click '''pencil icon''' next to user to update&lt;br /&gt;
#Update information&lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
&lt;br /&gt;
==Web mail==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click '''Login button''' next to user you would like access the mail for&lt;br /&gt;
*Web Mail Provides links to access the Webmail program as well as to access mail before domain propagation to our mail server&lt;br /&gt;
#Click '''Web Mail icon'''&lt;br /&gt;
#If domain is propagated and pointed to our mail server you can click the '''webmail''' link to access the SmarterMail webmail log in screen.&lt;br /&gt;
#If you domain has not yet propagated to our mail server click the &amp;quot;Pr-Propagation Web Mail&amp;quot; link to access the SmarterMail webmail log in screen.&lt;br /&gt;
&lt;br /&gt;
==Mail Forwarding==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
*Allows you to set up an email alias.&lt;br /&gt;
#Click on the '''Forwarding button'''&lt;br /&gt;
#Enter Alias name&lt;br /&gt;
#Enter address for email to this Alias to be forwarded to&lt;br /&gt;
#Click on the '''Save Icon'''&lt;br /&gt;
&lt;br /&gt;
==SPF Records==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
*Allows you to set up a SPF record&lt;br /&gt;
#Click on the '''Advanced''' button and then the '''SPF Record''' button&lt;br /&gt;
#Click the '''Create''' button&lt;br /&gt;
&lt;br /&gt;
==Domain Keys==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
*Allows you to set up Domain Keys&lt;br /&gt;
#Click on the '''Advanced''' button and then the '''Domain Keys''' button&lt;br /&gt;
#Click '''Enable'''&lt;br /&gt;
&lt;br /&gt;
==Mail Logs==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click on the '''Advanced''' button and then the '''Mail Logs''' button&lt;br /&gt;
#Select an email account&lt;br /&gt;
#Select a date and log type&lt;br /&gt;
#Click on Search&lt;br /&gt;
&lt;br /&gt;
==MySQL database==&lt;br /&gt;
*MySQL Allow you to create a MySQL database under your domain&lt;br /&gt;
#Click on '''MySQL icon'''&lt;br /&gt;
#To add new database click '''Add MySQL Database'''&lt;br /&gt;
#Enter Database Name&lt;br /&gt;
#Enter Username&lt;br /&gt;
#Enter Password&lt;br /&gt;
#(If you need a coldfusion DSN place check in check box and provide Coldfusion DSN name)&lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
&lt;br /&gt;
*To create new user for existing database&lt;br /&gt;
#Click '''MySQL icon'''&lt;br /&gt;
#Click '''Add new user button'''&lt;br /&gt;
#Enter Username&lt;br /&gt;
#Enter Password&lt;br /&gt;
#Place check mark in check box for each database you would like this user to have access to.&lt;br /&gt;
#To update the password on existing database user.&lt;br /&gt;
#Click '''MySQL icon'''&lt;br /&gt;
#Click '''pencil icon next to Username'''&lt;br /&gt;
#enter new password&lt;br /&gt;
#Click on the '''Save Icon'''.&lt;br /&gt;
&lt;br /&gt;
*To update the password on existing database user.&lt;br /&gt;
#Click '''MySQL icon'''&lt;br /&gt;
#Click pencil '''icon next to Username'''&lt;br /&gt;
#Enter new password&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==PhpMyAdmin==&lt;br /&gt;
*Allows you to log directly into your MySQL database to manage.&lt;br /&gt;
#Click on '''PhpMyAdmin link'''&lt;br /&gt;
#If you are not logged directly into your MySQL database simply enter the server your database is located on (Can be found by clicking the MySQL icon) and enter your Username and Password.&lt;br /&gt;
#Once logged in your Databases will be displayed on the Left, click on '''database name''' to manage that database.&lt;br /&gt;
*Here is a Video that will show how to create a MySQL database and how to Backup / Restore the database through PhpMyAdmin: [http://hostek.com/tutorials/managing_mysql.html PhpMyAdmin Backup and Restore Video]&lt;br /&gt;
&lt;br /&gt;
==MSSQL==&lt;br /&gt;
===To create MSSQL databases and users===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#To add a new database click '''Add MSSQL''' database&lt;br /&gt;
#Enter Database Name&lt;br /&gt;
#Choose database size&lt;br /&gt;
#Enter or Choose existing Username&lt;br /&gt;
#Enter Password&lt;br /&gt;
#Choose '''Default Collation''' (Usually left as default)&lt;br /&gt;
#Choose '''Recovery Model''' (Usually left as Simple as we make daily full backups of all #databases which we keep for 7 days)&lt;br /&gt;
#Place a Check mark in the box for Coldfusion DataSource if ColdFusion DSN is needed.&lt;br /&gt;
#Enter ColdFusion DSN name.&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To edit an existing MSSQL database===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil icon''' next to database name to edit&lt;br /&gt;
#Edit field necessary&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===Changing the MSSQL Transaction Log (Recovery Model) Settings===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil icon''' next to database name to edit&lt;br /&gt;
#Click the dropdown menu next to '''Recovery Model''' and select either '''Full''' or '''Simple'''&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To edit password for existing MSSQL user===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil next''' to user to edit&lt;br /&gt;
#Update password&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To add new MSSQL user===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Add MSSQL''' User button&lt;br /&gt;
#Enter username&lt;br /&gt;
#Enter password&lt;br /&gt;
#Place checkmark next to each database this users needs access to&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To make an MS SQL user the DB Owner===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil icon''' next to database name to edit&lt;br /&gt;
#Select the owner you wish to be the DB Owner&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==MSSQL Tools (Shared Hosting)==&lt;br /&gt;
*Allows you to log directly into MyLittleAdmin to manage your MSSQL database or MyLittleBackup to backup or restore your MSSQL database.&lt;br /&gt;
#Click '''MSSQL Tools''' icon&lt;br /&gt;
#Select database to Manage/Backup/Restore&lt;br /&gt;
#Select User with access to database needed&lt;br /&gt;
#Choose myLittleAdmin button to manage your MSSQL database&lt;br /&gt;
#Choose myLittleBackup button to backup/restore your database&lt;br /&gt;
&lt;br /&gt;
===To Backup and Download Your MSSQL Database===&lt;br /&gt;
&lt;br /&gt;
#Click '''MSSQL Tools''' icon&lt;br /&gt;
#Select database to Backup.&lt;br /&gt;
#Select User with access to database.&lt;br /&gt;
#Choose the myLittleBackup button.&lt;br /&gt;
#Click 'Backup Databases' at the top left of the new page.&lt;br /&gt;
#Select your database from the drop-down.&lt;br /&gt;
#Click 'OK' on Step 2 if the information looks correct.&lt;br /&gt;
#Name your backup and give it a description.&lt;br /&gt;
#Click 'Backup'.&lt;br /&gt;
#Click the link provided to download your SQL backup file.&lt;br /&gt;
&lt;br /&gt;
===To Restore an MSSQL Backup===&lt;br /&gt;
&lt;br /&gt;
#Click '''MSSQL Tools''' icon&lt;br /&gt;
#Select database to Backup.&lt;br /&gt;
#Select User with access to database.&lt;br /&gt;
#Choose the myLittleBackup button.&lt;br /&gt;
#Click 'Restore databases'&lt;br /&gt;
#Choose the database you want to restore into.&lt;br /&gt;
#Click 'Choose File' and select the SQL backup file on your computer. (Example SQL backup format: Backupname.bak)&lt;br /&gt;
#Click Upload.&lt;br /&gt;
#Click the backup file you just uploaded and press OK. &lt;br /&gt;
#Click Restore.&lt;br /&gt;
&lt;br /&gt;
==DataSources(DSN's)==&lt;br /&gt;
===Create a MySQL or MS SQL Server DSN===&lt;br /&gt;
*Allows to create a DSN for an existing database for your domain.&lt;br /&gt;
#To create a MySQL or MSSQL DataSource&lt;br /&gt;
#Click '''DataSources''' (DSN's) icon&lt;br /&gt;
#Choose MySQL or MSSQL from drop down depending on the database this is connecting to&lt;br /&gt;
#Click '''Add DSN'''&lt;br /&gt;
#Choose DSN type Access/MySQL/MSSQL&lt;br /&gt;
#Enter DSN name&lt;br /&gt;
#Enter Database name DSN will be connecting to&lt;br /&gt;
#Enter Server (Can by found by viewing database DSN is for)&lt;br /&gt;
#Enter Username for database DSN is connecting to&lt;br /&gt;
#Enter Password for database DSN is connecting to&lt;br /&gt;
#Choose if it is a ColdFusion DSN&lt;br /&gt;
#Choose if you need Unicode Support&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
===Create an Access DSN===&lt;br /&gt;
*To create an Access DataSource&lt;br /&gt;
#Click '''DataSources''' (DSN's) icon&lt;br /&gt;
#Choose '''Access''' from drop down menu&lt;br /&gt;
#Enter DSN Name&lt;br /&gt;
#Click on Folder icon to choose correct directory Access Database is located in&lt;br /&gt;
#Enter Username (If one is set for your Access Database, if not this can be left blank)&lt;br /&gt;
#Enter Password (If one is protecting your Database, if not this can be left blank)&lt;br /&gt;
#Choose if it needs to be a ColdFusion DSN&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
===Editing DSNs===&lt;br /&gt;
*To edit existing DSN&lt;br /&gt;
#Click '''DataSources''' (DSN's) icon&lt;br /&gt;
#Click pencil next to DSN to edit&lt;br /&gt;
#Update information&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==Lucee Web Administrator==&lt;br /&gt;
The Lucee Web Administrator gives you access to Lucee-specific settings for your account such as Lucee Datasources and other configuration options.&lt;br /&gt;
===Create a Lucee (formerly Railo) Datasource (DSN)===&lt;br /&gt;
#From within your control panel, click on the &amp;quot;Luce Web Administrator&amp;quot; icon&lt;br /&gt;
#Inside the Lucee Web Administrator click the &amp;quot;Datasources&amp;quot; link from the lefthand navigation menu. &lt;br /&gt;
#Select the database type, enter a name, and click ''Create''.&lt;br /&gt;
#Configure your datasource with all the correct server, username and password. &lt;br /&gt;
#*'''IMPORTANT''': If using MySQL also make sure the option for '''Alias Handling''' is enabled.&lt;br /&gt;
#Click the ''Create'' button, and your DSN will be available for use on your site.&lt;br /&gt;
&lt;br /&gt;
==Security and SSL==&lt;br /&gt;
Installing a new certificate, or re-keying an existing certificate.&lt;br /&gt;
&lt;br /&gt;
===Dedicated SSL===&lt;br /&gt;
'''VPS Hosting''' Request a static IP for sites added to your server which require SSL, we will provision the IP on the server and assign it in WCP for use with installing a Dedicated SSL.&lt;br /&gt;
&lt;br /&gt;
'''Shared Hosting''' If ordering a new certificate from Hostek.com you will be assigned a static IP, if importing from another provider you will need to request a static IP be assigned before the certificate can be activated.&lt;br /&gt;
&lt;br /&gt;
#Login to WCP, (select the domain, in some cases), Security and SSL, '''Dedicated SSL (click)'''&lt;br /&gt;
#Click '''Generate CSR (Certificate Signing Request)'''&lt;br /&gt;
#Fill in the requested information.&lt;br /&gt;
#Click Create&lt;br /&gt;
#Copy the '''Certificate Signing Request (CSR)''', which should be used when placing a new SSL order or re-keying an existing certificate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shared SSL(shared hosting)===&lt;br /&gt;
#Login to WCP, (select the domain, in some cases), Security and SSL, '''Shared SSL (click)'''&lt;br /&gt;
#Click '''Enable'''&lt;br /&gt;
#The URL for your sites shared SSL will be provided.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Manage IPs===&lt;br /&gt;
This tool allows you to specify if an IP is blocked or allowed, and whether your site is by default denying access.&lt;br /&gt;
&lt;br /&gt;
To block an IP:&lt;br /&gt;
#Grab the IP you need blocked from a log or from an email&lt;br /&gt;
#In the Deny IPs tool click Add&lt;br /&gt;
#Paste or type in the IP&lt;br /&gt;
#Choose Block in the drop down menu (By default it's set to Block)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
To block all IPs (Useful if your site is not live yet):&lt;br /&gt;
#Click the Settings tab at the top&lt;br /&gt;
#Open up the drop down menu next to Default Access&lt;br /&gt;
#Choose Block (By default this is Allow)&lt;br /&gt;
&lt;br /&gt;
==Stats==&lt;br /&gt;
*SmarterStats provides very detailed traffic information about your site's day-to-day activities for up to 14-months.&lt;br /&gt;
&lt;br /&gt;
===Enabling SmarterStats===&lt;br /&gt;
#Login to WCP here https://wcp.hostek.com/&lt;br /&gt;
#Click on the '''Stats''' button&lt;br /&gt;
#Click '''Enable SmarterStats'''&lt;br /&gt;
*This will start processing log information from now on, and will report it's findings for your review.&lt;br /&gt;
&lt;br /&gt;
===Resetting a SmarterStats Account Password===&lt;br /&gt;
#Login to WCP here https://wcp.hostek.com/&lt;br /&gt;
#Click on the '''Stats''' button&lt;br /&gt;
#Select the '''Pencil''' icon on the left-side of the chosen user&lt;br /&gt;
#Type a new password in the password box and click '''Save'''&lt;br /&gt;
#Select '''Login''' (on the right-side of the chosen user)&lt;br /&gt;
#Type in the new password that was just setup and click '''Login'''&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
To view your account's quotas and how much resources you have available:&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click the '''Usage''' icon&lt;br /&gt;
&lt;br /&gt;
Here you can see the limits and amount used for the following resources: '''Site Disk Space, Site Bandwidth, Mail Disk Space, MySQL Disk Space,''' and '''MS SQL Disk Space''' (if applicable)&lt;br /&gt;
&lt;br /&gt;
==Cron Jobs==&lt;br /&gt;
To add Cron Jobs to your site:&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click on the Cron Jobs button under the ColdFusion section&lt;br /&gt;
#Click Add&lt;br /&gt;
#Enter a name&lt;br /&gt;
#Enter the URL to be executed&lt;br /&gt;
#Select a  quick time interval or click advanced and set up your interval&lt;br /&gt;
#Click save&lt;br /&gt;
&lt;br /&gt;
==VPS Manager (VPS Accounts)==&lt;br /&gt;
&lt;br /&gt;
Overview of the '''VPS Manager''' section in the control panel.&lt;br /&gt;
&lt;br /&gt;
===Service Groups===&lt;br /&gt;
&lt;br /&gt;
The service groups section allows you to specify which services a domain should use when being created or when databases are added to the domain.  If you only have a single VPS server, the default service group will usually be used for everything.  However, if you have multiple servers, you can use this section to allow new domains to use services on both servers (I.E. Use one server for the website and another for the database).  It is also possible to create service groups that offers fewer services in-case you want to create domains with no dns, no mail, or no website.&lt;br /&gt;
&lt;br /&gt;
Options overview:&lt;br /&gt;
* '''Name''': A name you will use to reference this group of services when creating or modifying a domain&lt;br /&gt;
* '''Site Service''': The server on which the website for this domain will be created.&lt;br /&gt;
* '''Mail Service''': The server on which the mail account for this domain will be created.&lt;br /&gt;
* '''DNS Service''': The server on which the DNS zone for this domain will be created.&lt;br /&gt;
* '''MSSQL Service''': The server on which new MSSQL databases will be created.&lt;br /&gt;
* '''MySQL Service''': The server on which new MySQL databases will be created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server Details===&lt;br /&gt;
&lt;br /&gt;
This page gives a brief overview of resource resource usage on the server and the server's 'Computer Name' as configured in Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Firewall Management===&lt;br /&gt;
This page allows you to manage the Windows Firewall rules for some common ports.&lt;br /&gt;
[[File:Firewall mgmt.png]]&lt;br /&gt;
&lt;br /&gt;
===Restricting Access to a Port===&lt;br /&gt;
If you wish to restrict access to a port on your VPS do the following&lt;br /&gt;
*Open the Firewall Management section within your control panel's VPS Manager&lt;br /&gt;
*Click the pencil icon (edit) next to the service you wish to secure ''(eg. SQL Server, MySQL, Remote Desktop)''&lt;br /&gt;
*In the window that appears, choose one of the following from the ''Port Status'' dropdown menu:&lt;br /&gt;
**'''Closed''': Prevent any public access to the port&lt;br /&gt;
**'''Restricted''': Only allow select IPs access to the port&lt;br /&gt;
*Click ''Save'' once you've made your changes. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
''Example: Restricting Access to SQL Server Port'' &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Firewall sql.png]]&lt;br /&gt;
&lt;br /&gt;
===Service Manager===&lt;br /&gt;
&lt;br /&gt;
This page allows you to start, restart, or stop some common services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Add Domain===&lt;br /&gt;
&lt;br /&gt;
This page allows you to add new VPS domains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===List Domains===&lt;br /&gt;
&lt;br /&gt;
This page lists existing VPS domains and allows you to remove or modify them.&lt;br /&gt;
&lt;br /&gt;
===Adding Static IPs===&lt;br /&gt;
#Click List Domains&lt;br /&gt;
#Click the Pencil icon next to the domain you want&lt;br /&gt;
#Under the IP click the drop down box (Note: you will need a static IP first. To order one, email support@hostek.com to request one added to your VPS)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
[[Category:Control-Panels]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;br /&gt;
[[Category:Railo-VPS]]&lt;br /&gt;
[[Category:Windows-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=WCP_(Windows_based_Control_Panel)&amp;diff=2456</id>
		<title>WCP (Windows based Control Panel)</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=WCP_(Windows_based_Control_Panel)&amp;diff=2456"/>
				<updated>2015-04-08T15:11:58Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==How To Login To My WCP Control Panel==&lt;br /&gt;
#To manage your domain, login to the WCP Control Panel, using the details below&lt;br /&gt;
#URL: '''https://wcp.hostek.com'''/&lt;br /&gt;
#Username: &lt;br /&gt;
#Password: ** same as your cp.hostek.com password **&lt;br /&gt;
*You can also login to the control panel through your billing control panel https://cp.hostek.com/clientarea.php&lt;br /&gt;
#Click on  ''''My Services'''' 'Click the '''small Green arrow''' on the the notepad to the right'&lt;br /&gt;
#Now click the '''Login to Control Panel''' Icon'''&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==Custom URL for the WCP Control Panel==&lt;br /&gt;
The WCP can als be accessed by wcp.your_domain.com&lt;br /&gt;
&lt;br /&gt;
Setup wcp.your_domain.com as an A record for &amp;quot;184.175.108.65&amp;quot; or as a CName record for &amp;quot;wcp.ezhostingserver.com&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Resellers and VPS - WCP White label Settings===&lt;br /&gt;
Resellers and VPS customers can setup their logo in their Reseller control panel, however those additional features will only be available when accessing the control panel using the specific domain they configured within the Reseller Setttings of the control panel. The Reseller settings will be available using '''any''' URL, and as mentioned within these settings the reseller '''URL''' can be setup and other whitelabel options (custom control panel logo, favicon, etc.) making WCP the ultimate Windows Control Panel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Windows VPS]]&lt;br /&gt;
[[Category:Resellers]]&lt;br /&gt;
&lt;br /&gt;
==Adding Additional Control Panel Logins==&lt;br /&gt;
*This will allow you to set up additional control panel logins for you or for others involved in editing or managing your account. You can limit the Permissions or options available for them to manage.&lt;br /&gt;
#Login to the WCP Control Panel, using the details below&lt;br /&gt;
#URL: '''https://wcp.hostek.com'''/&lt;br /&gt;
#Username: &lt;br /&gt;
#Password: ** same as your cp.hostek.com password **&lt;br /&gt;
#Click on the '''Control panel Logins''' tab, then click on the '''Add''' icon.&lt;br /&gt;
#Put the &amp;quot;Username, Password and if you want them to have Limited Permission.&lt;br /&gt;
#If you want them to have Limited Permission then check the '''Limited Permission''' box. This will load a dropdown where you can select what privlages they have to manage.&lt;br /&gt;
#Once you are done click the '''Save''' icon at the bottom of the screen.&lt;br /&gt;
#Once it has been added you or they can login by going to https://wcp.hostek.com/Login.aspx and using the username and password that you set for it.&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:Lucee]]&lt;br /&gt;
==Unlimited Plans - Add Additional Domains==&lt;br /&gt;
You will want to follow these steps in to generate a +1 Control Panel for a separate Domain. (Please note the difference between Registration and Hosting: [https://wiki.hostek.com/Domain_Registration_and_Domain_Name_Management#Domain_Registration_Information_vs._Domain_Hosting_Information  '''here''')] &amp;lt;br clear=all&amp;gt; This would be under your Windows Unlimited account, or your Windows Business/Pro plan.&lt;br /&gt;
&lt;br /&gt;
#Login to your WCP control panel&lt;br /&gt;
#*Windows Unlimited: For adding a third (or more) domain select any domain from the upper right hand corner dropdown box &amp;quot;Domains&amp;quot;.&lt;br /&gt;
#Within the &amp;quot;Domains&amp;quot; box click the &amp;quot;Addon Domains&amp;quot; icon.&lt;br /&gt;
#Click &amp;quot;Add&amp;quot; and enter the following:&lt;br /&gt;
#*Domain Name&lt;br /&gt;
#*Username&lt;br /&gt;
#*Password&lt;br /&gt;
#Click &amp;quot;Save&amp;quot;&lt;br /&gt;
#To manage the domain, you can now select it from the '''Domains''' drop-down list/box.&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
&lt;br /&gt;
==Site Details==&lt;br /&gt;
We recommend you review the &amp;quot;Site Settings&amp;quot; which includes many important details about your domain including:&lt;br /&gt;
&lt;br /&gt;
WCP (login and select domain) &amp;gt; Website Settings &amp;gt; '''Site Details'''&lt;br /&gt;
&lt;br /&gt;
*Testing URL&lt;br /&gt;
*Primary and Secondary DNS&lt;br /&gt;
*Site IP&lt;br /&gt;
*Web Root Path&lt;br /&gt;
*FTP Root Path&lt;br /&gt;
===IIS Version &amp;amp; ColdFusion Version (if applicable)===&lt;br /&gt;
To get your domain's IIS Version and ColdFusion Version (if applicable) log in to WCP and under the Settings section, click on the Site Details option.&lt;br /&gt;
&lt;br /&gt;
==FTP Accounts==&lt;br /&gt;
*Adding or editing FTP accounts.&lt;br /&gt;
#click on the '''FTP Accounts''' tab.&lt;br /&gt;
#To edit one click on the little '''Pencil Icon''' to the left, to add one click on the '''Add FTP User''' tab.&lt;br /&gt;
#If you are adding one you will set the Username:, Password: and folder then click the #Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==Virtual Directories==&lt;br /&gt;
*Adding virtual directories to your site.&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click on Virtual Directories under the Files section&lt;br /&gt;
#Click Add&lt;br /&gt;
#Enter the virtual path you need&lt;br /&gt;
#Enter in the actual physical path it is mapped to&lt;br /&gt;
#If this is to be an application, check the Create Application Folder check box&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
==Application Folders==&lt;br /&gt;
To create and manage Application Folders on your site&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click on Application Folders under the Files section&lt;br /&gt;
#Select the site or sub-domain from the drop down box&lt;br /&gt;
#Click continue&lt;br /&gt;
#Select a folder&lt;br /&gt;
#Click Add Application to make it an application folder&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==File Manager== &lt;br /&gt;
*Basic File Operations, file uploading and editing now supported- Zip, GZip, and Tar Archive support.&lt;br /&gt;
#Click on the '''File Manager icon''', then the '''Login icon''' on the next screen.&lt;br /&gt;
#To create files or Directory's outside the WWW root folder right click and click on the '''Create File''' or '''Create Directory''' option.&lt;br /&gt;
#Click the '''Continue Icon''' to add this.&lt;br /&gt;
#To add/edit files in the WWWroot click on the '''wwwroot file'''.&lt;br /&gt;
#once you are in you can add, edit or delete by right clicking and clicking on the options given.&lt;br /&gt;
&lt;br /&gt;
*Upload and Download functions&lt;br /&gt;
#To upload a file, right click the File Manager page, and click Upload&lt;br /&gt;
#Select the file you wish to upload by clicking Choose File&lt;br /&gt;
#Give this file a new name or keep the existing default name&lt;br /&gt;
&lt;br /&gt;
#To download a file, right click the file you want to download&lt;br /&gt;
#Click Download File. Note: This will send you to a new page.&lt;br /&gt;
#Now your browser will be downloading the file in question. Simply check your Downloads folder or hit Ctrl+J to open the Downloads section of your browser and move this file where you want it.&lt;br /&gt;
&lt;br /&gt;
*NEW: Use the search bar at the top of the File Manager to quickly search the file you're looking for.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
&lt;br /&gt;
==Password Protect Folders==&lt;br /&gt;
#Under the Files section click on '''Password Protect'''.&lt;br /&gt;
#Click on '''Manage Protected Folders'''.&lt;br /&gt;
#Browse to and click on the folder that you want to set this up on and check '''Enable Protection'''. &lt;br /&gt;
#Select a user from the list or click on '''Manage Users''', then click '''Add''', and enter username and password then Save. &lt;br /&gt;
&lt;br /&gt;
==IIS Settings==&lt;br /&gt;
*Setting up error pages, default pages, advanced settings, etc.&lt;br /&gt;
===Custom Error pages===&lt;br /&gt;
#Click on '''IIS Settings''' in your WCP&lt;br /&gt;
#Click the edit button next to the error page you want to change&lt;br /&gt;
#Uncheck the '''Use System Default''' checkbox &lt;br /&gt;
#Enter the path to your custom error page &lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
===Mime Types===&lt;br /&gt;
#Click on '''IIS Settings''' in your WCP&lt;br /&gt;
#Scroll to the bottom of the window and click '''Add Mime Type'''&lt;br /&gt;
#Enter the extension for the Mime Type&lt;br /&gt;
#Enter the Mime Type information&lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
*An example Mime Type is below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Extension: .mp3&lt;br /&gt;
Mime Type: audio/mpeg&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
More information here: [https://wiki.hostek.com/Mime_types Mime Types]&lt;br /&gt;
&lt;br /&gt;
===Default Docs===&lt;br /&gt;
*Select a default document and drag it to the top position to set it as top priority&lt;br /&gt;
*Click '''Add''' to add a default doc&lt;br /&gt;
*Click the red '''X''' to delete a default doc&lt;br /&gt;
*Click a default doc and change the name&lt;br /&gt;
*For example: change '''&amp;quot;index.htm&amp;quot;''' to '''&amp;quot;index.asp&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
===URL Forwarding===&lt;br /&gt;
#In your [https://wcp.hostek.com/ '''WCP'''] click on the '''IIS Settings''' button&lt;br /&gt;
#Navigate to the '''Redirects''' tab&lt;br /&gt;
# If you need a specific folder to redirect somewhere, you can find it using the '''Browse''' button&lt;br /&gt;
##If you simply want the whole site to redirect, leave this box '''blank'''&lt;br /&gt;
#Click '''Save'''. (See below for details on the other options.)&lt;br /&gt;
*'''Permanent Redirect''': Specifies that the server should return the redirect status code 301 rather than the default 302. A 301 status code lets search engines know that the content has been permanently moved and that only the new URL should be indexed.&lt;br /&gt;
*'''Exact URL''': If this is unchecked, then the request URL without the server name is passed along with the query string to the destination URL. This is equivelent to appending the $V$Q variables at the end of the destination URL.&lt;br /&gt;
*'''Exclude Sub Directories''': This means that the folder you choose will not redirect.&lt;br /&gt;
&lt;br /&gt;
===Advanced===&lt;br /&gt;
====Recycle Application Pool====&lt;br /&gt;
If you see a Service Unavailable message on your site, or have a general need to recycle a site's IIS Application Pool, you can do so through this section of WCP. &lt;br /&gt;
#Click the '''IIS Settings''' icon in WCP&lt;br /&gt;
#Click the '''Advanced''' tab in the '''IIS Settings''' section&lt;br /&gt;
#Click the '''Recycle''' button.&lt;br /&gt;
&lt;br /&gt;
==PHP Settings==&lt;br /&gt;
If you notice you need a different version of php or want to check what version you are using you can update it to that version if it is installed to the server or can enable custom php.ini settings to use specifically for your domain.&lt;br /&gt;
#Click the configuration for the domain or subdomain you want updated.&lt;br /&gt;
#Select the version you wish to use.&lt;br /&gt;
#Check the checkbox if you want to enable a custom php.ini file&lt;br /&gt;
#Click save to save the settings.&lt;br /&gt;
&lt;br /&gt;
==ColdFusion==&lt;br /&gt;
===ColdFusion Error Logs===&lt;br /&gt;
====Server Error Logs====&lt;br /&gt;
This section will show any recent errors for your site that were found within ColdFusion's server-wide exception log. Use the dropdown to choose how many hours back you'd like errors retrieved. &lt;br /&gt;
====Application Error Logs====&lt;br /&gt;
This section will show errors created via the cflog tag on your site. For security purposes, your cflog logs will only appear hear if you have given the file name in the cflog tag the name of your domain, ''without the www.'' For example, if your domain is ''your_domain.com'' you would set the file attribute for the cflog tag like: ''file=&amp;quot;your_domain.com&amp;quot;''.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
''Note'': Please set the ''type'' of the ''cflog'' tag to either '''error''' or '''fatal''' on our production servers. Use of the ''information'' type is strongly discouraged. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Reference''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/cflog CFLog Documentation]&lt;br /&gt;
&lt;br /&gt;
===Clear Template Cache===&lt;br /&gt;
Within this section you can click the '''Clear Template Cache''' button to clear cached ColdFusion pages for your site. &lt;br /&gt;
&lt;br /&gt;
===ColdFusion Version===&lt;br /&gt;
Within this section of WCP, you can choose which version of ColdFusion you'd like your site to use. &lt;br /&gt;
&lt;br /&gt;
''Note'': You can also specify different ColdFusion versions for different subdomains on your site.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
&lt;br /&gt;
==DNS Editor==&lt;br /&gt;
'''READ FIRST''' When a new domain is added to WCP all DNS records are also created (in most cases). Clicking on the DNS Editor will open a window with these records, for editing, adding and deleting. Most times nothing needs to be done other than pointing your domain to the Primary and Secondary DNS Servers listed under [https://wiki.hostek.com/WCP_(Windows_based_Control_Panel)#Site_Details WCP Site Details].&lt;br /&gt;
&lt;br /&gt;
===Create a new DNS record===&lt;br /&gt;
#Click '''Add DNS''' Record button&lt;br /&gt;
#Enter Name for record (If DNS record name is your domain name please leave this Name - text box blank as the control panel will automatically add your domain name)&lt;br /&gt;
#Choose the Record type (A, CNAME, MX, NS, TXT, SPF, SRV)&lt;br /&gt;
#Enter Data Type&lt;br /&gt;
#Generally leave the TTL (Time To Live) as the default 86400&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===Update DNS records===&lt;br /&gt;
#To update an existing DNS record click the '''Pencil''' icon next to the record you would like to update.&lt;br /&gt;
#You will then be able to change the Name of the record, the Type of record, Data of the record, and Time to Live.&lt;br /&gt;
#Once updated Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===SVR Record Fields===&lt;br /&gt;
*A SVR Record is a &amp;quot;'''S'''er'''v'''ice '''R'''ecord&amp;quot;. It's a specification of data in the Domain Name System defining the location (i.e. the hostname and port number) of servers for specified services.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: _service._protocol&lt;br /&gt;
Type: SRV&lt;br /&gt;
Data: Address/Hostname&lt;br /&gt;
Priority: Priority Number&lt;br /&gt;
Weight: Weight Number&lt;br /&gt;
Port: Port Number&lt;br /&gt;
TTL: 86400&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: _sip._udp&lt;br /&gt;
Type: SRV&lt;br /&gt;
Data: sip.mydomain.com&lt;br /&gt;
Priority: 10&lt;br /&gt;
Weight: 5&lt;br /&gt;
Port: 4030&lt;br /&gt;
TTL: 86400&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*If you are a '''VPS Client''' with a Windows Server and a SmarterMail Active Sync license wanting to use Autodiscover for Outlook, please refer to this SmarterMail Article [https://portal.smartertools.com/kb/a2752/set-up-autodiscover-for-smartermail.aspx here].&lt;br /&gt;
&lt;br /&gt;
===MX Records===&lt;br /&gt;
Here are steps to setup the correct MX Records for our MailSystem:&lt;br /&gt;
*Note: These are setup by Default, and shouldn't need to be added unless changes were made.&lt;br /&gt;
#Go into  the '''DNS Editor''' in WCP.&lt;br /&gt;
#Click '''Add Record'''.&lt;br /&gt;
#In the '''Record Name''' form put &amp;quot; '''mail''' &amp;quot;.&lt;br /&gt;
#Beside '''Type''' select '''A'''.&lt;br /&gt;
#Beside '''Data''' put the IP Address of your MailServer.&lt;br /&gt;
##You can find your MailServer by clicking the '''Site Details''' button in WCP.&lt;br /&gt;
##The IP Address can be found by PINGing the server, or by performing a WHOIS search.&lt;br /&gt;
#Once this is done click '''Save'''. Now you have an '''A Record''' labeled &amp;quot;mail.'''yourdomain'''.com&amp;quot;.&lt;br /&gt;
#You'll want to click '''Add Record''' again.&lt;br /&gt;
#Leave the Record Name blank this time.&lt;br /&gt;
#Beside '''Type''' select '''MX'''.&lt;br /&gt;
#Beside '''Data''' put &amp;quot;mail.'''yourdomain'''.com&amp;quot;.&lt;br /&gt;
#Once you click '''Save''', you will then have an '''MX Record''', which points to &amp;quot;mail.'''yourdomain'''.com&amp;quot;.&lt;br /&gt;
*Congratulations! Now all you need to do is wait for DNS Propagation, which is the 2-to-12hr time period it takes for the internet to update with these new changes.&lt;br /&gt;
&lt;br /&gt;
===SPF Records===&lt;br /&gt;
An SPF Record (simply an entry into the DNS records) is used by mail servers to know if mail coming from an address at your domain is really allowed to be sent from the sending mail server.&lt;br /&gt;
&lt;br /&gt;
To have WCP create an SPF record for you, you can click '''SPF Record''' under the '''Email Section''' and then click the '''Create''' button, or you can use the steps below to create one manually.&lt;br /&gt;
&lt;br /&gt;
If you will be using our servers send email related to your domain, you would generally use an SPF record like the following:&amp;lt;pre&amp;gt;&amp;quot;v=spf1 a mx include:spf.hostek.com -all&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For our Resellers that don't want to use hostek.com, use an SPF Record like:&amp;lt;pre&amp;gt;&amp;quot;v=spf1 a mx include:spf.ezhostingserver.com -all&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Steps to add an SPF Record to your domain:'''&lt;br /&gt;
Assuming that your DNS is managed with us:&lt;br /&gt;
#Log in to your hosting control panel at wcp.hostek.com&lt;br /&gt;
#Open the DNS Editor (DNS Manager) section&lt;br /&gt;
#Click on Add Record. &lt;br /&gt;
#Leave the Name field blank. &lt;br /&gt;
#For the Type, choose TXT&lt;br /&gt;
#For the Data enter the SPF Record detail as you need, using the sample provided above.&lt;br /&gt;
&lt;br /&gt;
'''Basic information related to some SPF Record options:'''&lt;br /&gt;
&lt;br /&gt;
The '''&amp;quot;-all&amp;quot;''' may be adjusted on a per customer basis to any of the following depending on their needs:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''-all''' = mail not sent from an address listed in the SPF record should be completely rejected (Hard Fail). Mail that IS sent from an address in the SPF record may be given a lower spam score by some servers.&lt;br /&gt;
&lt;br /&gt;
'''~all''' = mail not sent from an address listed in the SPF record should be given a higher spam score(Soft Fail). Mail that IS sent from an address in the SPF record may be given a lower spam score by some servers.&lt;br /&gt;
&lt;br /&gt;
'''?all''' = mail not sent from an address listed in the SPF record should be treated normally as if the domain did not have an spf record (Neutral). Mail that IS sent from an address in the SPF record may be given a lower spam score by some servers.&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==Sub Domains==&lt;br /&gt;
*A sub-domain is like an extension of your domain name. For example, if your domain name were myfamily.com, a sub-domain would be in the following form: dad.myfamily.com or mom.myfamily.com etc.&lt;br /&gt;
*You can have a sub-domain pointed to any folder within your web site. If a visitor goes directly to that sub-domain he will be taken to that folder, not to your site's main page.&lt;br /&gt;
#Click on the '''Sub Domains icon'''&lt;br /&gt;
#Click &amp;quot;'''Add'''&amp;quot; sub Domain button &lt;br /&gt;
#Enter sub domain name in Name text box. This will automatically populate the Folder text box to a folder with the same name as the subdomain.&lt;br /&gt;
#If you wish this Subdomain to point to a different folder you can click on the folder icon and choose the directory you would like your Sub Domain to point to.&lt;br /&gt;
#Click on the &amp;quot;'''Save'''&amp;quot; Icon.&lt;br /&gt;
#This will create the sub domain record within your domains DNS zone, &lt;br /&gt;
*If the domains name servers are not pointed to us you will need to manually create this record where your domains DNS is hosted.&lt;br /&gt;
[[Category:Control-Panels]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
&lt;br /&gt;
==Domain Alias==&lt;br /&gt;
*This will allow you to point 2 domains to the same website. How to create a Domain&lt;br /&gt;
#To create a domain alias you will click on the ''Domain Aliases icon''&lt;br /&gt;
#Click '''Add Domain Alias''' button&lt;br /&gt;
#Enter your Alias Name&lt;br /&gt;
#Click on the &amp;quot;'''Save'''&amp;quot; Icon.&lt;br /&gt;
*You will need to be sure that your Domain Alias has been registered and has the name servers pointed to the name servers found beneath the Site Details icon.&lt;br /&gt;
&lt;br /&gt;
==Applications==&lt;br /&gt;
# Some helpful video tutorials showing how to install a select few applications easily within the WCP Control Panel are below:&lt;br /&gt;
&lt;br /&gt;
*Joomla - [http://hostek.com/tutorials/joomla_Installation_tutorial.html Installing Joomla Application]&lt;br /&gt;
&lt;br /&gt;
*Wordpress - [http://hostek.com/tutorials/wordpress_Installation_tutorial.html Installing Wordpress Application]&lt;br /&gt;
&lt;br /&gt;
*Mura - [http://hostek.com/tutorials/mura_Installation_tutorial.html Installing Mura Application]&lt;br /&gt;
&lt;br /&gt;
*Magento - [http://hostek.com/tutorials/magento_Installation_tutorial.html Installing Magento Application]&lt;br /&gt;
&lt;br /&gt;
*Oscommerce - [http://hostek.com/tutorials/oscommerce_Installation_tutorial.html Installing OsCommerce Application]&lt;br /&gt;
&lt;br /&gt;
==Email==&lt;br /&gt;
*Below is information on how to manage your email account within the WCP.&lt;br /&gt;
*'''FOR VPS''' You will also have &amp;quot;Admin&amp;quot; access to SmarterMail. Access webmail (click the webmail link in WCP) and login with user &amp;quot;admin&amp;quot; and the primary VPS password.&lt;br /&gt;
&lt;br /&gt;
==Email Users==&lt;br /&gt;
*Allows you to create Email users as well as log directly into users Webmail account&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click '''Users''' icon&lt;br /&gt;
#Click '''Add Email User''' button&lt;br /&gt;
#Enter email user name (Example: if you need the email address &amp;quot;admin@domain.com&amp;quot; enter the user &amp;quot;admin&amp;quot;)&lt;br /&gt;
#Enter password for Email user (**See note below regarding password requirements)&lt;br /&gt;
#Enter Display name (Usually set to the name of the person using the specific email account)&lt;br /&gt;
#Choose if you would like this user to have administrator rights&lt;br /&gt;
#Choose mail box size limit for this specific user&lt;br /&gt;
#Click on the '''Save'''&lt;br /&gt;
#'''NOTE Password requirements''' &lt;br /&gt;
*Minimum Length 6 Characters&lt;br /&gt;
*Must include Uppercase&lt;br /&gt;
*Must include Lowercase&lt;br /&gt;
*Must include Number&lt;br /&gt;
*Must include Special character&lt;br /&gt;
*Password cannot match username&lt;br /&gt;
&lt;br /&gt;
==Edit existing Email user==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click '''Users''' icon&lt;br /&gt;
#Click '''pencil icon''' next to user to update&lt;br /&gt;
#Update information&lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
&lt;br /&gt;
==Web mail==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click '''Login button''' next to user you would like access the mail for&lt;br /&gt;
*Web Mail Provides links to access the Webmail program as well as to access mail before domain propagation to our mail server&lt;br /&gt;
#Click '''Web Mail icon'''&lt;br /&gt;
#If domain is propagated and pointed to our mail server you can click the '''webmail''' link to access the SmarterMail webmail log in screen.&lt;br /&gt;
#If you domain has not yet propagated to our mail server click the &amp;quot;Pr-Propagation Web Mail&amp;quot; link to access the SmarterMail webmail log in screen.&lt;br /&gt;
&lt;br /&gt;
==Mail Forwarding==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
*Allows you to set up an email alias.&lt;br /&gt;
#Click on the '''Forwarding button'''&lt;br /&gt;
#Enter Alias name&lt;br /&gt;
#Enter address for email to this Alias to be forwarded to&lt;br /&gt;
#Click on the '''Save Icon'''&lt;br /&gt;
&lt;br /&gt;
==SPF Records==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
*Allows you to set up a SPF record&lt;br /&gt;
#Click on the '''Advanced''' button and then the '''SPF Record''' button&lt;br /&gt;
#Click the '''Create''' button&lt;br /&gt;
&lt;br /&gt;
==Domain Keys==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
*Allows you to set up Domain Keys&lt;br /&gt;
#Click on the '''Advanced''' button and then the '''Domain Keys''' button&lt;br /&gt;
#Click '''Enable'''&lt;br /&gt;
&lt;br /&gt;
==Mail Logs==&lt;br /&gt;
#Once you are logged into your WCP account, under the Email Section&lt;br /&gt;
#Click on the '''Advanced''' button and then the '''Mail Logs''' button&lt;br /&gt;
#Select an email account&lt;br /&gt;
#Select a date and log type&lt;br /&gt;
#Click on Search&lt;br /&gt;
&lt;br /&gt;
==MySQL database==&lt;br /&gt;
*MySQL Allow you to create a MySQL database under your domain&lt;br /&gt;
#Click on '''MySQL icon'''&lt;br /&gt;
#To add new database click '''Add MySQL Database'''&lt;br /&gt;
#Enter Database Name&lt;br /&gt;
#Enter Username&lt;br /&gt;
#Enter Password&lt;br /&gt;
#(If you need a coldfusion DSN place check in check box and provide Coldfusion DSN name)&lt;br /&gt;
#Click '''Save'''&lt;br /&gt;
&lt;br /&gt;
*To create new user for existing database&lt;br /&gt;
#Click '''MySQL icon'''&lt;br /&gt;
#Click '''Add new user button'''&lt;br /&gt;
#Enter Username&lt;br /&gt;
#Enter Password&lt;br /&gt;
#Place check mark in check box for each database you would like this user to have access to.&lt;br /&gt;
#To update the password on existing database user.&lt;br /&gt;
#Click '''MySQL icon'''&lt;br /&gt;
#Click '''pencil icon next to Username'''&lt;br /&gt;
#enter new password&lt;br /&gt;
#Click on the '''Save Icon'''.&lt;br /&gt;
&lt;br /&gt;
*To update the password on existing database user.&lt;br /&gt;
#Click '''MySQL icon'''&lt;br /&gt;
#Click pencil '''icon next to Username'''&lt;br /&gt;
#Enter new password&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==PhpMyAdmin==&lt;br /&gt;
*Allows you to log directly into your MySQL database to manage.&lt;br /&gt;
#Click on '''PhpMyAdmin link'''&lt;br /&gt;
#If you are not logged directly into your MySQL database simply enter the server your database is located on (Can be found by clicking the MySQL icon) and enter your Username and Password.&lt;br /&gt;
#Once logged in your Databases will be displayed on the Left, click on '''database name''' to manage that database.&lt;br /&gt;
*Here is a Video that will show how to create a MySQL database and how to Backup / Restore the database through PhpMyAdmin: [http://hostek.com/tutorials/managing_mysql.html PhpMyAdmin Backup and Restore Video]&lt;br /&gt;
&lt;br /&gt;
==MSSQL==&lt;br /&gt;
===To create MSSQL databases and users===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#To add a new database click '''Add MSSQL''' database&lt;br /&gt;
#Enter Database Name&lt;br /&gt;
#Choose database size&lt;br /&gt;
#Enter or Choose existing Username&lt;br /&gt;
#Enter Password&lt;br /&gt;
#Choose '''Default Collation''' (Usually left as default)&lt;br /&gt;
#Choose '''Recovery Model''' (Usually left as Simple as we make daily full backups of all #databases which we keep for 7 days)&lt;br /&gt;
#Place a Check mark in the box for Coldfusion DataSource if ColdFusion DSN is needed.&lt;br /&gt;
#Enter ColdFusion DSN name.&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To edit an existing MSSQL database===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil icon''' next to database name to edit&lt;br /&gt;
#Edit field necessary&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===Changing the MSSQL Transaction Log (Recovery Model) Settings===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil icon''' next to database name to edit&lt;br /&gt;
#Click the dropdown menu next to '''Recovery Model''' and select either '''Full''' or '''Simple'''&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To edit password for existing MSSQL user===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil next''' to user to edit&lt;br /&gt;
#Update password&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To add new MSSQL user===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Add MSSQL''' User button&lt;br /&gt;
#Enter username&lt;br /&gt;
#Enter password&lt;br /&gt;
#Place checkmark next to each database this users needs access to&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
===To make an MS SQL user the DB Owner===&lt;br /&gt;
#Click '''MSSQL icon'''&lt;br /&gt;
#Click '''Pencil icon''' next to database name to edit&lt;br /&gt;
#Select the owner you wish to be the DB Owner&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==MSSQL Tools (Shared Hosting)==&lt;br /&gt;
*Allows you to log directly into MyLittleAdmin to manage your MSSQL database or MyLittleBackup to backup or restore your MSSQL database.&lt;br /&gt;
#Click '''MSSQL Tools''' icon&lt;br /&gt;
#Select database to Manage/Backup/Restore&lt;br /&gt;
#Select User with access to database needed&lt;br /&gt;
#Choose myLittleAdmin button to manage your MSSQL database&lt;br /&gt;
#Choose myLittleBackup button to backup/restore your database&lt;br /&gt;
&lt;br /&gt;
===To Backup and Download Your MSSQL Database===&lt;br /&gt;
&lt;br /&gt;
#Click '''MSSQL Tools''' icon&lt;br /&gt;
#Select database to Backup.&lt;br /&gt;
#Select User with access to database.&lt;br /&gt;
#Choose the myLittleBackup button.&lt;br /&gt;
#Click 'Backup Databases' at the top left of the new page.&lt;br /&gt;
#Select your database from the drop-down.&lt;br /&gt;
#Click 'OK' on Step 2 if the information looks correct.&lt;br /&gt;
#Name your backup and give it a description.&lt;br /&gt;
#Click 'Backup'.&lt;br /&gt;
#Click the link provided to download your SQL backup file.&lt;br /&gt;
&lt;br /&gt;
===To Restore an MSSQL Backup===&lt;br /&gt;
&lt;br /&gt;
#Click '''MSSQL Tools''' icon&lt;br /&gt;
#Select database to Backup.&lt;br /&gt;
#Select User with access to database.&lt;br /&gt;
#Choose the myLittleBackup button.&lt;br /&gt;
#Click 'Restore databases'&lt;br /&gt;
#Choose the database you want to restore into.&lt;br /&gt;
#Click 'Choose File' and select the SQL backup file on your computer. (Example SQL backup format: Backupname.bak)&lt;br /&gt;
#Click Upload.&lt;br /&gt;
#Click the backup file you just uploaded and press OK. &lt;br /&gt;
#Click Restore.&lt;br /&gt;
&lt;br /&gt;
==DataSources(DSN's)==&lt;br /&gt;
===Create a MySQL or MS SQL Server DSN===&lt;br /&gt;
*Allows to create a DSN for an existing database for your domain.&lt;br /&gt;
#To create a MySQL or MSSQL DataSource&lt;br /&gt;
#Click '''DataSources''' (DSN's) icon&lt;br /&gt;
#Choose MySQL or MSSQL from drop down depending on the database this is connecting to&lt;br /&gt;
#Click '''Add DSN'''&lt;br /&gt;
#Choose DSN type Access/MySQL/MSSQL&lt;br /&gt;
#Enter DSN name&lt;br /&gt;
#Enter Database name DSN will be connecting to&lt;br /&gt;
#Enter Server (Can by found by viewing database DSN is for)&lt;br /&gt;
#Enter Username for database DSN is connecting to&lt;br /&gt;
#Enter Password for database DSN is connecting to&lt;br /&gt;
#Choose if it is a ColdFusion DSN&lt;br /&gt;
#Choose if you need Unicode Support&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
===Create an Access DSN===&lt;br /&gt;
*To create an Access DataSource&lt;br /&gt;
#Click '''DataSources''' (DSN's) icon&lt;br /&gt;
#Choose '''Access''' from drop down menu&lt;br /&gt;
#Enter DSN Name&lt;br /&gt;
#Click on Folder icon to choose correct directory Access Database is located in&lt;br /&gt;
#Enter Username (If one is set for your Access Database, if not this can be left blank)&lt;br /&gt;
#Enter Password (If one is protecting your Database, if not this can be left blank)&lt;br /&gt;
#Choose if it needs to be a ColdFusion DSN&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
===Editing DSNs===&lt;br /&gt;
*To edit existing DSN&lt;br /&gt;
#Click '''DataSources''' (DSN's) icon&lt;br /&gt;
#Click pencil next to DSN to edit&lt;br /&gt;
#Update information&lt;br /&gt;
#Click on the '''Save''' Icon.&lt;br /&gt;
&lt;br /&gt;
==Lucee Web Administrator==&lt;br /&gt;
The Lucee Web Administrator gives you access to Lucee-specific settings for your account such as Lucee Datasources and other configuration options.&lt;br /&gt;
===Create a Lucee Datasource (DSN)===&lt;br /&gt;
#From within your control panel, click on the &amp;quot;Luce Web Administrator&amp;quot; icon&lt;br /&gt;
#Inside the Lucee Web Administrator click the &amp;quot;Datasources&amp;quot; link from the lefthand navigation menu. &lt;br /&gt;
#Select the database type, enter a name, and click ''Create''.&lt;br /&gt;
#Configure your datasource with all the correct server, username and password. &lt;br /&gt;
#*'''IMPORTANT''': If using MySQL also make sure the option for '''Alias Handling''' is enabled.&lt;br /&gt;
#Click the ''Create'' button, and your DSN will be available for use on your site.&lt;br /&gt;
&lt;br /&gt;
==Security and SSL==&lt;br /&gt;
Installing a new certificate, or re-keying an existing certificate.&lt;br /&gt;
&lt;br /&gt;
===Dedicated SSL===&lt;br /&gt;
'''VPS Hosting''' Request a static IP for sites added to your server which require SSL, we will provision the IP on the server and assign it in WCP for use with installing a Dedicated SSL.&lt;br /&gt;
&lt;br /&gt;
'''Shared Hosting''' If ordering a new certificate from Hostek.com you will be assigned a static IP, if importing from another provider you will need to request a static IP be assigned before the certificate can be activated.&lt;br /&gt;
&lt;br /&gt;
#Login to WCP, (select the domain, in some cases), Security and SSL, '''Dedicated SSL (click)'''&lt;br /&gt;
#Click '''Generate CSR (Certificate Signing Request)'''&lt;br /&gt;
#Fill in the requested information.&lt;br /&gt;
#Click Create&lt;br /&gt;
#Copy the '''Certificate Signing Request (CSR)''', which should be used when placing a new SSL order or re-keying an existing certificate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Shared SSL(shared hosting)===&lt;br /&gt;
#Login to WCP, (select the domain, in some cases), Security and SSL, '''Shared SSL (click)'''&lt;br /&gt;
#Click '''Enable'''&lt;br /&gt;
#The URL for your sites shared SSL will be provided.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Manage IPs===&lt;br /&gt;
This tool allows you to specify if an IP is blocked or allowed, and whether your site is by default denying access.&lt;br /&gt;
&lt;br /&gt;
To block an IP:&lt;br /&gt;
#Grab the IP you need blocked from a log or from an email&lt;br /&gt;
#In the Deny IPs tool click Add&lt;br /&gt;
#Paste or type in the IP&lt;br /&gt;
#Choose Block in the drop down menu (By default it's set to Block)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
To block all IPs (Useful if your site is not live yet):&lt;br /&gt;
#Click the Settings tab at the top&lt;br /&gt;
#Open up the drop down menu next to Default Access&lt;br /&gt;
#Choose Block (By default this is Allow)&lt;br /&gt;
&lt;br /&gt;
==Stats==&lt;br /&gt;
*SmarterStats provides very detailed traffic information about your site's day-to-day activities for up to 14-months.&lt;br /&gt;
&lt;br /&gt;
===Enabling SmarterStats===&lt;br /&gt;
#Login to WCP here https://wcp.hostek.com/&lt;br /&gt;
#Click on the '''Stats''' button&lt;br /&gt;
#Click '''Enable SmarterStats'''&lt;br /&gt;
*This will start processing log information from now on, and will report it's findings for your review.&lt;br /&gt;
&lt;br /&gt;
===Resetting a SmarterStats Account Password===&lt;br /&gt;
#Login to WCP here https://wcp.hostek.com/&lt;br /&gt;
#Click on the '''Stats''' button&lt;br /&gt;
#Select the '''Pencil''' icon on the left-side of the chosen user&lt;br /&gt;
#Type a new password in the password box and click '''Save'''&lt;br /&gt;
#Select '''Login''' (on the right-side of the chosen user)&lt;br /&gt;
#Type in the new password that was just setup and click '''Login'''&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
To view your account's quotas and how much resources you have available:&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click the '''Usage''' icon&lt;br /&gt;
&lt;br /&gt;
Here you can see the limits and amount used for the following resources: '''Site Disk Space, Site Bandwidth, Mail Disk Space, MySQL Disk Space,''' and '''MS SQL Disk Space''' (if applicable)&lt;br /&gt;
&lt;br /&gt;
==Cron Jobs==&lt;br /&gt;
To add Cron Jobs to your site:&lt;br /&gt;
#Log in to WCP&lt;br /&gt;
#Click on the Cron Jobs button under the ColdFusion section&lt;br /&gt;
#Click Add&lt;br /&gt;
#Enter a name&lt;br /&gt;
#Enter the URL to be executed&lt;br /&gt;
#Select a  quick time interval or click advanced and set up your interval&lt;br /&gt;
#Click save&lt;br /&gt;
&lt;br /&gt;
==VPS Manager (VPS Accounts)==&lt;br /&gt;
&lt;br /&gt;
Overview of the '''VPS Manager''' section in the control panel.&lt;br /&gt;
&lt;br /&gt;
===Service Groups===&lt;br /&gt;
&lt;br /&gt;
The service groups section allows you to specify which services a domain should use when being created or when databases are added to the domain.  If you only have a single VPS server, the default service group will usually be used for everything.  However, if you have multiple servers, you can use this section to allow new domains to use services on both servers (I.E. Use one server for the website and another for the database).  It is also possible to create service groups that offers fewer services in-case you want to create domains with no dns, no mail, or no website.&lt;br /&gt;
&lt;br /&gt;
Options overview:&lt;br /&gt;
* '''Name''': A name you will use to reference this group of services when creating or modifying a domain&lt;br /&gt;
* '''Site Service''': The server on which the website for this domain will be created.&lt;br /&gt;
* '''Mail Service''': The server on which the mail account for this domain will be created.&lt;br /&gt;
* '''DNS Service''': The server on which the DNS zone for this domain will be created.&lt;br /&gt;
* '''MSSQL Service''': The server on which new MSSQL databases will be created.&lt;br /&gt;
* '''MySQL Service''': The server on which new MySQL databases will be created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Server Details===&lt;br /&gt;
&lt;br /&gt;
This page gives a brief overview of resource resource usage on the server and the server's 'Computer Name' as configured in Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Firewall Management===&lt;br /&gt;
This page allows you to manage the Windows Firewall rules for some common ports.&lt;br /&gt;
[[File:Firewall mgmt.png]]&lt;br /&gt;
&lt;br /&gt;
===Restricting Access to a Port===&lt;br /&gt;
If you wish to restrict access to a port on your VPS do the following&lt;br /&gt;
*Open the Firewall Management section within your control panel's VPS Manager&lt;br /&gt;
*Click the pencil icon (edit) next to the service you wish to secure ''(eg. SQL Server, MySQL, Remote Desktop)''&lt;br /&gt;
*In the window that appears, choose one of the following from the ''Port Status'' dropdown menu:&lt;br /&gt;
**'''Closed''': Prevent any public access to the port&lt;br /&gt;
**'''Restricted''': Only allow select IPs access to the port&lt;br /&gt;
*Click ''Save'' once you've made your changes. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
''Example: Restricting Access to SQL Server Port'' &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:Firewall sql.png]]&lt;br /&gt;
&lt;br /&gt;
===Service Manager===&lt;br /&gt;
&lt;br /&gt;
This page allows you to start, restart, or stop some common services.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Add Domain===&lt;br /&gt;
&lt;br /&gt;
This page allows you to add new VPS domains.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===List Domains===&lt;br /&gt;
&lt;br /&gt;
This page lists existing VPS domains and allows you to remove or modify them.&lt;br /&gt;
&lt;br /&gt;
===Adding Static IPs===&lt;br /&gt;
#Click List Domains&lt;br /&gt;
#Click the Pencil icon next to the domain you want&lt;br /&gt;
#Under the IP click the drop down box (Note: you will need a static IP first. To order one, email support@hostek.com to request one added to your VPS)&lt;br /&gt;
#Click Save&lt;br /&gt;
&lt;br /&gt;
[[Category:Control-Panels]]&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;br /&gt;
[[Category:Railo-VPS]]&lt;br /&gt;
[[Category:Windows-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Robots.txt&amp;diff=2446</id>
		<title>Robots.txt</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Robots.txt&amp;diff=2446"/>
				<updated>2015-03-25T18:41:39Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Robots.txt File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Robots.txt File===&lt;br /&gt;
We suggest creating a '''robots.txt''' file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time. Second to prevent specific bots from crawling the website. We suggest the following defaults, however you might want to add or remove the user agents denied, and adjust the crawl rate.&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;&lt;br /&gt;
User-agent: *&lt;br /&gt;
Crawl-delay: 2&lt;br /&gt;
&lt;br /&gt;
User-agent: Baiduspider&lt;br /&gt;
Disallow: /&lt;br /&gt;
&lt;br /&gt;
User-agent: Sosospider&lt;br /&gt;
Disallow: /&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2444</id>
		<title>ColdFusion Tips &amp; Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2444"/>
				<updated>2015-03-24T20:25:18Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* HTML5 Audio Player with ColdFusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Converting Application.cfm to Application.cfc==&lt;br /&gt;
Using an '''Application.cfc''' configuration file offers some advantages over the older style '''Application.cfm''' configuration files. Some of the main features that an Application.cfc file give you are &amp;quot;functions triggered by Application, Session, Request, and Error events&amp;quot; and &amp;quot;Application-Level Mappings and Custom Tag Paths&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are only a few steps required to convert an application to use an Application.cfc file:&lt;br /&gt;
&lt;br /&gt;
NOTE: You should ensure that you have a backup of any files before making changes to them.&lt;br /&gt;
&lt;br /&gt;
===Create an '''Application.cfc''' file===&lt;br /&gt;
&lt;br /&gt;
Below is an example '''Application.cfc''' file with the minimum requirements:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Setup '''onRequest''' function in '''Application.cfc''' to include the '''Application.cfm''' file&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if an Application.cfm file already exists in the root of the application. Below is what the Application.cfc file will look like after this addition:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Copy application settings from the '''cfapplication''' tag and remove the '''cfapplication''' tag===&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if a cfapplication tag is used within the application. Each attribute of the cfapplication tag will need to be copied into the cfscript section at the top of the Application.cfc with the pattern [this.attributeName = &amp;quot;value&amp;quot;;].&lt;br /&gt;
&lt;br /&gt;
For example. The below cfapplication tag would be converted into our Application.cfc example as follows:&lt;br /&gt;
&lt;br /&gt;
'''cfapplication''' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication&lt;br /&gt;
	name = &amp;quot;my_app_name&amp;quot;&lt;br /&gt;
	sessionManagement = &amp;quot;Yes&amp;quot;&lt;br /&gt;
	sessionTimeout = &amp;quot;#createTimeSpan(0,0,20,0)#&amp;quot;&lt;br /&gt;
	setClientCookies = &amp;quot;Yes&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Application.cfc''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = &amp;quot;my_app_name&amp;quot;; // app name from old cfapplication tag&lt;br /&gt;
		this.sessionManagement = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
		this.sessionTimeout = CreateTimeSpan(0,0,20,0);&lt;br /&gt;
		this.setClientCookies = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Do not forget to remove the '''cfapplication''' tag after copying the settings into the '''Application.cfc''' file.&lt;br /&gt;
&lt;br /&gt;
Now that the change is complete, this is a good time to test the application to ensure everything is working correctly with the new setup.&lt;br /&gt;
&lt;br /&gt;
==Per-Application ColdFusion Mappings==&lt;br /&gt;
In ColdFusion 8 and above, it is possible to create per-application mappings through your site's Application.cfc file. If you wish to convert to using an Application.cfc file, follow the steps [[ColdFusion_Tips_%26_Tricks#Converting_Application.cfm_to_Application|here]]. &lt;br /&gt;
&lt;br /&gt;
Once you have your Application.cfc created, you will insert the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.mappings[&amp;quot;/test&amp;quot;]=&amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On your site though, you would change &amp;quot;/test&amp;quot; to the name of your mapping. IMPORTANT: You need to include the forward slash before the name of your mapping. Also, change &amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot; to the full physical path to the folder you wish to map. &lt;br /&gt;
'''Note''': The physical path to your FTP root is listed in the &amp;quot;Site Settings&amp;quot; of your control panel at wcp.hostek.com.&lt;br /&gt;
&lt;br /&gt;
To call a template named &amp;quot;testing.cfm&amp;quot; in the &amp;quot;test&amp;quot; directory we just mapped, you would use this line: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;/test/testing.cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-Application Custom Tag Paths==&lt;br /&gt;
Starting in ColdFusion 8, ColdFusion allows creation of Custom Tag Paths in each site's Application.cfc file. This allows you to create and manage your Custom Tag Paths without having to use CF Administrator (ie. submit a support ticket). The following steps will help you create a Custom Tag Path:&lt;br /&gt;
&lt;br /&gt;
If you do not already have an Application.cfc file in your site's Web root, create one now.&lt;br /&gt;
Place the following code in the Application.cfc file and save:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=&amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you'd replace &amp;quot;yourdomain.com&amp;quot; with your domain name, and &amp;quot;customtagfolder&amp;quot; with the name of the folder you created for your custom tags. &lt;br /&gt;
&lt;br /&gt;
Now you have successfully added your custom tag path. If you have multiple tag paths to add, try using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=ListAppend(THIS.customtagpaths, &amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Per-application Robust Exception Information Settings==&lt;br /&gt;
To enable Robust Exception Information on a ColdFusion application, you will need to add the following to the top of the site's ''Application.cfc'' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = true /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Alternatively, if you wish to ensure Robust Exception Information is ''always'' disabled for an application, add this to the site's ''Application.cfc'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = false /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-application JSON Prefix==&lt;br /&gt;
To enable the JSON Prefix for your application add the following to the site's '''Application.cfc''' file, and adjust the '''secureJSONPrefix''' as desired:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = true&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSONPrefix = &amp;quot;//&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can disable this feature using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = false&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Restart a ColdFusion Application==&lt;br /&gt;
If you ever need to restart your site's ColdFusion application (to pick up a setting change, etc), you can do so via the ApplicationStop() function in ColdFusion 9+. &lt;br /&gt;
&lt;br /&gt;
To use this you can create a file (ex: restart.cfm) containing the following code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset ApplicationStop() /&amp;gt;&lt;br /&gt;
&amp;lt;cflocation url=&amp;quot;index.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When you run the file containing that code your ColdFusion Application will be stopped (flushing your application scope), and when the browser is redirected to the index page the application will start again.&lt;br /&gt;
==CFHTTP Connection Failures over HTTPS==&lt;br /&gt;
===Fixing cfhttp Failures on Shared Hosting===&lt;br /&gt;
If you try to use &amp;lt;cfhttp&amp;gt; to connect to a secure site (over HTTPS), you may receive the following error: &amp;quot;Connection Failure: Status code unavailable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this add the following code to your site's &amp;quot;Application.cfm&amp;quot; file (below the 'cfapplication' tag):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- fix for HTTPS connection failures ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif NOT isDefined(&amp;quot;Application.sslfix&amp;quot;)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity = createObject(&amp;quot;java&amp;quot;, &amp;quot;java.security.Security&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity.removeProvider(&amp;quot;JsafeJCE&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset Application.sslfix = true /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If your site uses an &amp;quot;Application.cfc&amp;quot; file instead, then just place that code in the &amp;quot;'onApplicationStart()&amp;quot; method of that file. After making that adjustment you'll need to restart your ColdFusion application as [[ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application|shown here]]. If you still run into issues though, you will need to [https://support.hostek.com/ submit a support ticket] asking our team to install the remote site's SSL certificate into ColdFusion's Java Certificate Store.&lt;br /&gt;
&lt;br /&gt;
===Fixing cfhttp Failures on VPS Hosting===&lt;br /&gt;
If you are having issues connecting to a site or file from with ColdFusion over HTTPS, you can import the remote site's SSL certificate into the the Java SSL Certificate Store used by ColdFusion.&lt;br /&gt;
====Fixing cfhttp Connection Failures with Keytool====&lt;br /&gt;
'''1) Set Java environment'''&amp;lt;br&amp;gt;&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable in the next command. For '''example''', you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
In that case, you would use '''C:\ColdFusion10\jre''' as the value of JAVA_HOME as shown below. Open a command prompt and issue the following commands:&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set JAVA_HOME=C:\ColdFusion10\jre&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set PATH=%PATH%;%JAVA_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, use the following commands (case-sensitive) in your terminal:&lt;br /&gt;
This '''example''' assumes that the JRE is located at ''/opt/coldfusion10/jre''&lt;br /&gt;
    export JAVA_HOME=/opt/coldfusion10/jre&lt;br /&gt;
    export PATH=$PATH:/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
'''2) List the Keystore Contents'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Java installation is at ''C:\ColdFusion10\jre'', then navigate to '''C:\ColdFusion10\jre\bin''':&lt;br /&gt;
    cd C:\ColdFusion10\jre\bin&lt;br /&gt;
If you're using a '''Linux/cPanel''' server, use this command instead:&lt;br /&gt;
    cd /opt/coldfusion10/jre/bin&lt;br /&gt;
&lt;br /&gt;
Now you can list the keystore contents ''(Windows &amp;amp; Linux)'':&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 76 entries&lt;br /&gt;
&lt;br /&gt;
'''3) Import certificate in to keystore and list to check added '''&amp;lt;br&amp;gt;&lt;br /&gt;
''(assumes you've downloaded the certificate to '''c:\temp\inet.cer''' (Windows) or '''/temp/inet.cer''' (Linux/cPanel)''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file c:\temp\inet.cer&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file /temp/inet.cer&lt;br /&gt;
    Trust this certificate? [no]: y&lt;br /&gt;
    Certificate was added to keystore&lt;br /&gt;
&lt;br /&gt;
Now verify the keystore contains your new certificate&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 77 entries&lt;br /&gt;
&lt;br /&gt;
'''4) Restart the ColdFusion application service so the keystore is re-read.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''5) Run your cfhttp request - HTTPS works now!'''&lt;br /&gt;
&lt;br /&gt;
====Fixing cfhttp Connection Failures with Portecle====&lt;br /&gt;
If you'd rather import certificates into the Java SSL Keystore through a GUI, follow these directions to use a tool named Portecle to do so:&lt;br /&gt;
&lt;br /&gt;
#Ensure your JAVA_HOME variable is set correctly as described above.&lt;br /&gt;
#Download Portecle from Sourceforge: [http://sourceforge.net/projects/portecle/ Portecle Project Homepage]&lt;br /&gt;
#Extract the files&lt;br /&gt;
#Open a Command Prompt and navigate to the extracted directory&lt;br /&gt;
#Issue this command to launch Portecle: &amp;lt;pre&amp;gt;java -jar portecle.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#In Notepad, open your jvm.config file to find the JVM PATH for ColdFusion's JVM; look for '''java.home={path here}'''&lt;br /&gt;
#In Portecle click ''File'', ''Open Keystore File''&lt;br /&gt;
#Browse to {JVM PATH}\jre\lib\security to the path, and open the cacerts file; Enter Password: '''changeit'''&lt;br /&gt;
#Click on '''Tools''', '''Import Trusted Certificate''', select the certificate you wish to import.&lt;br /&gt;
#*To obtain the certificate, you can navigate in a browser to the site where the certificate resides, then download the certificate to a CER (X.509 format) file through the browser.&lt;br /&gt;
#Click '''OK''' to import and '''YES''' to accept the certificate as ''trusted''.&lt;br /&gt;
#Click OK again, usually you won't need to change the Alias name;click OK to finish.&lt;br /&gt;
#Click '''File''', '''Save Keystore'''.&lt;br /&gt;
Close Portecle.&lt;br /&gt;
====Fixing CFHTTP Failures Related to Cached DNS Records====&lt;br /&gt;
This solution will prevent Java from caching DNS records for the life of the ColdFusion process. Instead, Java will refresh its records periodically.&lt;br /&gt;
&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable to find the location of the Java installation used by ColdFusion. &lt;br /&gt;
&lt;br /&gt;
For '''example''', on '''Windows''' you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
On '''Linux''' you may see this:&lt;br /&gt;
    java.home=/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
Navigate to the '''security''' folder within the Java installation used by ColdFusion. For '''example''':&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows''' ''(open in Windows Explorer)''&lt;br /&gt;
    C:\ColdFusion10\jre\lib\security\&lt;br /&gt;
'''Linux\cPanel'''&lt;br /&gt;
    cd /opt/coldfusion10/jre/lib/security/&lt;br /&gt;
&lt;br /&gt;
Back-up, then edit the '''java.security''' file within that folder and change the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
'''From'''&lt;br /&gt;
    #networkaddress.cache.ttl=-1&lt;br /&gt;
'''To'''&lt;br /&gt;
    networkaddress.cache.ttl=600&lt;br /&gt;
&lt;br /&gt;
''Note:'' The above value refreshes DNS records every 600 seconds ''(10 minutes)''. You may adjust it to whatever you feel is appropriate for your server.&lt;br /&gt;
&lt;br /&gt;
Now '''Save''' the file then '''Restart ColdFusion''', and the new DNS caching setting will take effect.&lt;br /&gt;
&lt;br /&gt;
==CFMAIL Multi-Part Emails==&lt;br /&gt;
Sending emails with both Text and HTML parts helps reduce the chance of your messages getting caught by a mail server's spam filter. It also helps ensure your recipients can read the message regardless of the mail client being used. The easiest way to do this is to store your message in a variable using &amp;lt;cfsavecontent&amp;gt; then adding it to &amp;lt;cfmail&amp;gt; using &amp;lt;cfmailpart&amp;gt; as shown in the example below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Store your message in a variable ---&amp;gt;&lt;br /&gt;
&amp;lt;cfsavecontent variable=&amp;quot;myemailcontent&amp;quot;&amp;gt;&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
This is some plain text. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;And this is some more text in HTML. It will appear in plain-text for anyone who views the Text part of this email, though.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/cfsavecontent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- Function to strip HTML from message while preserving line breaks ---&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name= &amp;quot;textMessage&amp;quot; access= &amp;quot;public&amp;quot; returntype= &amp;quot;string&amp;quot; hint= &amp;quot;Converts an html email message into a nicely formatted with line breaks plain text message&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfargument name= &amp;quot;string&amp;quot; required= &amp;quot;true&amp;quot; type= &amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfscript&amp;gt;&lt;br /&gt;
      var pattern = &amp;quot; &amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
      var CRLF = chr( 13) &amp;amp; chr( 10);&lt;br /&gt;
      var message = ReplaceNoCase(arguments.string, pattern, CRLF , &amp;quot;ALL&amp;quot;);&lt;br /&gt;
      pattern = &amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;;&lt;br /&gt;
    &amp;lt;/cfscript&amp;gt;&lt;br /&gt;
    &amp;lt;cfreturn REReplaceNoCase(message, pattern, &amp;quot;&amp;quot; , &amp;quot;ALL&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!--- Now send the email. When adding the Text part, we'll use the textMessage() function we just created to strip out HTML tags. ---&amp;gt;&lt;br /&gt;
&amp;lt;cfmail from=&amp;quot;sender@domain.com&amp;quot; to=&amp;quot;recipient@anotherdomain.com&amp;quot; subject=&amp;quot;Multi-part Email with CFMAIL&amp;quot; type=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/plain&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#textmessage(myemailcontent)#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/html&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#myemailcontent#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: [http://cookbooks.adobe.com/post_CFMAIL_the_right_way-17875.html CFMAIL the right way]&lt;br /&gt;
&lt;br /&gt;
==Scheduling Tasks in ColdFusion==&lt;br /&gt;
On occasion shared ColdFusion hosting customers need to setup Scheduled Task to run files on a cycle. &lt;br /&gt;
&lt;br /&gt;
This can be done with the following steps, making use of ColdFusion's &amp;lt;cfschedule&amp;gt; tag:&lt;br /&gt;
&lt;br /&gt;
#Create a file locally using any text editor, save the file with the .CFM extension (example: setschedule_example.cfm).&lt;br /&gt;
#Copy and past in the code example below taken from ''ColdFusion's Documentation'' and save.&lt;br /&gt;
#Replace the data in the example note the following recommendations.&amp;lt;br /&amp;gt;!- Name each file made for creating a schedule with the name of the task so you can reference the task later if needed. Specific naming will also make it more difficult for someone to randomly run the file.&amp;lt;br /&amp;gt;!- If you need to schedule a job to run monthly on any date in the range 28-31, read about how ColdFusion will handle the scheduling in the ColdFuison8 documentation referenced below.&lt;br /&gt;
#Working example, the code example below is a working tested solution for getting the weather for a specific zip code and the task to email the results.&lt;br /&gt;
&lt;br /&gt;
'''Scheduled Task'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- This sets the initial task, if your just wanting to set the schedule --&amp;gt;&lt;br /&gt;
&amp;lt;cfschedule action = &amp;quot;update&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot; &lt;br /&gt;
    operation = &amp;quot;HTTPRequest&amp;quot;&lt;br /&gt;
    url = &amp;quot;http://test.hostek.net/weather_send.cfm&amp;quot;&lt;br /&gt;
    startDate = &amp;quot;7/6/09&amp;quot;&lt;br /&gt;
    startTime = &amp;quot;09:30 AM&amp;quot;&lt;br /&gt;
    interval = &amp;quot;3600&amp;quot;&lt;br /&gt;
    resolveURL = &amp;quot;Yes&amp;quot;&lt;br /&gt;
    requestTimeOut = &amp;quot;600&amp;quot;&lt;br /&gt;
    mode = &amp;quot;application&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task created to be deleted, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;delete&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task to be paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;pause&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task resumed if paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;resume&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Weather Collector'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;CF External Weather Checker&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfset zip=&amp;quot;12345&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;cfinvoke webservice=&amp;quot;http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl&amp;quot; method=&amp;quot;getCityWeatherByZIP&amp;quot; returnvariable=&amp;quot;aWeatherReturn&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cfinvokeargument name=&amp;quot;ZIP&amp;quot; value=&amp;quot;#zip#&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aWeatherReturn.temperature EQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt; I cannot get the weather for #zip# external http connections must be DOWN.&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;cfset message=&amp;quot;The temperature for #zip# (Your city) is #aWeatherReturn.temperature# degrees.&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif message NEQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfmail from = &amp;quot;weather.server@test.com&amp;quot; to = &amp;quot;test@test.com&amp;quot; subject = &amp;quot;Weather checker&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#message#&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note''': We highly recommend setting the ''mode'' attribute of cfschedule to ''application''. This will ensure your site's application is the only one allowed to modify the task. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''More information on using CFSchedule'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/cfschedule Adobe ColdFusion Documentation - CFSchedule]&lt;br /&gt;
*[http://www.isummation.com/blog/configuring-coldfusion-scheduled-tasks-using-the-cfschedule-tag/ iSummation Blog - Configuring ColdFusion Scheduled Tasks using the CFSCHEDULE tag]&lt;br /&gt;
&lt;br /&gt;
==Session Management - Handling Bots and Spiders==&lt;br /&gt;
===Robots.txt File===&lt;br /&gt;
First and foremost we suggest creating a robots.txt file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time. Second to prevent specific bots from crawling the website. &lt;br /&gt;
&lt;br /&gt;
Please see our [[Robots|robots.txt article]] for more information on implementing a robots.txt on your site.&lt;br /&gt;
&lt;br /&gt;
===Lower Session Timeouts for Bots and Spiders===&lt;br /&gt;
Next we suggest setting your session timeout specifically lower for bots and spiders. These spiders and bots will crawl a page and when a session (ColdFusion) is created, it will persist during then entire page load. The page fully loaded allows the bot or spider to get the information from the Web page AND allows the session to expire quickly protecting ColdFusion from effects similar to a memory leak. &lt;br /&gt;
&lt;br /&gt;
To do this, implement the appropriate solution for your site below:&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfm'''====&lt;br /&gt;
Place this code at the top of your Application.cfm file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then use the '''REQUEST.sessionTimeout''' variable to specify the session timeout period in your '''cfapplication''' tag: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication name=&amp;quot;myawesomeapp&amp;quot;&lt;br /&gt;
     sessionmanagement=&amp;quot;Yes&amp;quot;&lt;br /&gt;
     sessiontimeout=&amp;quot;#REQUEST.sessionTimeout#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (tag-based)====&lt;br /&gt;
If you primarily use cfml tags in your Application.cfc, you can set the Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
 &amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (cfscript)====&lt;br /&gt;
If instead, you're using cfscipt in your Application.cfc, you'll set the custom Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
// This checks if a cookie is created, for bots this will return false and use the low session timeout&lt;br /&gt;
if (StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) || StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)){&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,30,0);&lt;br /&gt;
} else {&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,0,2);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.bennadel.com/blog/1083-ColdFusion-Session-Management-And-Spiders-Bots.htm Session Management code examples for the Application.cfm]&lt;br /&gt;
&lt;br /&gt;
==Creating Client Variables Tables for MySQL Databases==&lt;br /&gt;
If you need your datasource set up as a ColdFusion Client Variables Store, you can enable the '''Client Variables'' option in your ColdFusion datasource within the WCP control panel. &lt;br /&gt;
&lt;br /&gt;
Please note, if your datasource MySQL DSN, you'll need to create the necessary tables prior to using the Client Variable Store. To do this you would need to create two tables, one named &amp;quot;cdata&amp;quot; and one named &amp;quot;cglobal&amp;quot;. The SQL you'd use to create those tables is below:&lt;br /&gt;
&lt;br /&gt;
Table: '''cdata'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
 CREATE TABLE IF NOT EXISTS cdata (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          app varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          PRIMARY KEY (cfid,app)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Table: '''cglobal'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS cglobal (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          lvisit timestamp,&lt;br /&gt;
          KEY cfid (cfid),&lt;br /&gt;
          KEY lvisit (lvisit)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Output CF Error details without CFDump==&lt;br /&gt;
It is common in an error handler that you want to output all of the error details to the screen, a file, or an email. Therefore, the cfdump tag is commonly used for this; and, while this works well in development, it is not always the best practice on a production site because of the performance of the cfdump tag due to its use of reflection (Runtime type introspection).&lt;br /&gt;
&lt;br /&gt;
A better performing alternative is to output the information you want directly from the Error/Exception struct within a 'cfoutput' tag. This can be done by looking up the cferror structure or the cfcatch structure in the ColdFusion docs to see what is available and what values you might want to output:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Error''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cferror&amp;lt;br /&amp;gt;&lt;br /&gt;
'''CFCatch''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cfcatch&lt;br /&gt;
&lt;br /&gt;
===Cfdump Custom Tag Alternative===&lt;br /&gt;
You can also use the following link to download an example CF custom tag that will give a similar error output as when using the cfdump tag on an error variable:&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the custom tag's usage:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the error handler specified in your 'cferror' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cf_OutputError Error=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code would replace:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfdump var=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in a cfcatch block:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cftry&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;cfcatch&amp;gt;&lt;br /&gt;
   &amp;lt;cf_OutputCFCatch CFCatch=&amp;quot;#CFCatch#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/cfcatch&amp;gt;&lt;br /&gt;
&amp;lt;/cftry&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configure ColdFusion to Handle html and htm Files==&lt;br /&gt;
===Enable HTML/HTM as CFML on Shared Accounts===&lt;br /&gt;
On our ColdFusion servers, the best way to process HTML files (.html, .htm) as ColdFusion/CFML (.cfm files) is by using a set of rewrite rules that route the HTML files through a ColdFusion &amp;quot;controller&amp;quot; script. The main benefits of this approach are that it is easy to implement on a site-by-site basis, and it works with any version of ColdFusion. To implement this approach on your site, follow the steps below:&lt;br /&gt;
====Step 1: Add Rewrite Rules to Route HTML Files through the CFM Controller====&lt;br /&gt;
If you have a '.htaccess' file in your webroot, add the rules below to the top of that file. Otherwise, create a file named '.htaccess' in your site's web root and place these rules within it:&lt;br /&gt;
=====For Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.html htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====For Sites Using .HTM Files=====&lt;br /&gt;
'''NOTE:''' If your site uses ''.htm'' files instead of ''.html'' files, use this set of rules instead. The only difference is ''html'' is replaced with ''.htm''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.htm htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 2: Create the ColdFusion Controller Script (htmlcontrol.cfm)====&lt;br /&gt;
Now we just need to create a ColdFusion script that will process the HTML files. To do this, create a file named '''htmlcontrol.cfm''' within your site's web root. Place this CFML code within the file:&lt;br /&gt;
=====CFML for Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.html&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====CFML for Sites Using .HTM Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.htm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you save the controller script, your site will begin processing any ColdFusion/CFML code within your HTML files.&lt;br /&gt;
===Enable HTML/HTM as CFML on a VPS===&lt;br /&gt;
In case you need to process ColdFusion code in your .htm or .html files, here is what you will need to do to get this to work. This is based on using ColdFusion on one of our dedicated server hosting accounts on a Windows server.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This will affect every site on the server, so use cautiously.&lt;br /&gt;
&lt;br /&gt;
First, you will need to edit the web.xml file located generally at C:\ColdFusion10\cfusion\wwwroot\WEB-INF&lt;br /&gt;
&lt;br /&gt;
Open this file and look for '''coldfusion_mapping_1'''.&lt;br /&gt;
&lt;br /&gt;
Scroll down the file until you see the last number increment like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;servlet-mapping id=&amp;quot;macromedia_mapping_15&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then add the following right below the closing &amp;lt;/servlet-mapping&amp;gt; of the last number increment item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_16&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_17&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_18&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_19&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save this file and exit.&lt;br /&gt;
&lt;br /&gt;
Now in IIS, setup a mapping for the site:&lt;br /&gt;
#In IIS 7+ click the server name section (right below the '''Start Page''' in the left-hand navigation), then double-click the '''Handler Mappings''' icon.&lt;br /&gt;
#Select and &amp;quot;edit&amp;quot; the '''*.cfm''' record and copy the value of &amp;quot;executable&amp;quot;. Now hit Cancel and then click '''Add Script Map'''. &lt;br /&gt;
#Paste the executable value copied from the '''*.cfm''' record and type '''*.htm''' into the '''Request Path''' and hit OK. &lt;br /&gt;
#Repeat the above steps to add a handler for '''*.html''' &lt;br /&gt;
&lt;br /&gt;
Lastly, open the '''uriworkermap.properties''' file for your ColdFusion 10 IIS Connector in a text editor such as Notepad. On a standard ColdFusion installation this is located at: &amp;lt;pre&amp;gt;C:\ColdFusion10\config\wsconfig\1\uriworkermap.properties&amp;lt;/pre&amp;gt;&lt;br /&gt;
Copy the following lines, paste them at the bottom of the file, then save and close the file: &amp;lt;pre&amp;gt;/*.html = cfusion&lt;br /&gt;
/*.htm = cfusion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the ColdFusion service and IIS. ColdFusion should begin processing CFML within htm/html files now.&lt;br /&gt;
&lt;br /&gt;
==Increase the ColdFusion Post Parameters Limit==&lt;br /&gt;
===ColdFusion 10===&lt;br /&gt;
In ColdFusion 10, you can easily increase the value of ColdFusion's '''postParametersLimit''' via the ColdFusion Administrator. Once logged into the ColdFusion Administrator, click the '''Settings''' link then scroll to the bottom of the page. Set the value for the Post Parameters Limit to the desired limit and click the submit button. &lt;br /&gt;
===ColdFusion 9 and below===&lt;br /&gt;
To adjust the Post Parameters Limit setting in ColdFusion 9 and below, you will have to edit the server's '''neo-runtime.xml''' file which is located here on a standard installation: &amp;lt;pre&amp;gt;C:\ColdFusion9\lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open that file in a text editor such as Notepad, then search for the '''postSizeLimit''' tag. It will look similar to this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postSizeLimit'&amp;gt;&amp;lt;number&amp;gt;100.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediately after that set of tags, paste this chunk of text: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postParametersLimit'&amp;gt;&amp;lt;number&amp;gt;1000.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once you've adjusted the file, you'll just need to save your changes and restart ColdFusion for the new setting to go into effect. '''Note''': The value of '''1000''' is just an example, so you can increase it as needed. &lt;br /&gt;
&lt;br /&gt;
==Loading custom Java library or Java Libraries (jar or class files) in ColdFusion 10==&lt;br /&gt;
ColdFusion 10 makes it easy to load Java libraries into your ColdFusion application without having to restart ColdFusion. All that's required is your application define the 'THIS.javaSettings' attribute within the site's Application.cfc like below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.javaSettings = {LoadPaths = [&amp;quot;/javafiles/&amp;quot;], loadColdFusionClassPath = true, reloadOnChange=false}/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will check the ''javafiles'' directory in your Web root for 'jar' and 'class' files and make any libraries within the directory accessible from your ColdFusion application. If you modify the JAR files in your ''javafiles'' directory though, ColdFusion will need to be restarted to load the new versions of the JAR files. &lt;br /&gt;
&lt;br /&gt;
'''References''': &lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/Enhanced+Java+integration+in+ColdFusion+10 Adobe ColdFusion Documentation - Enhanced Java Integration in ColdFusion]&lt;br /&gt;
*[http://www.raymondcamden.com/2014/6/16/Issue-with-ColdFusion-JavaSettings-and-ReloadOnChange Ray Camden's Blog - Issue with ColdFusion JavaSettings and ReloadOnChange]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Permission denied for creating Java object: coldfusion.server.ServiceFactory''==&lt;br /&gt;
===When using Mura or using Transfer ORM===&lt;br /&gt;
====Issue====&lt;br /&gt;
If you are using '''Mura''' or using '''Transfer ORM''' and you get this error, ''Permission denied for creating Java object: coldfusion.server.ServiceFactory'', you are likely using an outdated version of Mura and also are probably on a ColdFusion 9 server. The Transfer ORM component causing this issue has not been updated to work with ColdFusion 9. There is a quick fix though:&lt;br /&gt;
====Solution====&lt;br /&gt;
Find the file named CFMLVersion.cfc which should be at '''/wwwroot/requirements/transfer/com/factory'''.&lt;br /&gt;
&lt;br /&gt;
Edit that file and find the line that has:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And change that to:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;) OR server.coldfusion.productversion.startsWith(&amp;quot;9&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save the file and it should now work.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Since this is likely running an outdated version of Mura, we highly recommend updating Mura to the latest version to take advantage of numerous performance and security enhancements.&lt;br /&gt;
===When using DataMgr===&lt;br /&gt;
If you get this error while using DataMgr.cfc, the changes described below will solve this problem:&lt;br /&gt;
&lt;br /&gt;
Here is the section of code from the original DataMgr.cfc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection = getConnection()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset db = connection.getMetaData().getDatabaseProductName()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection.close()&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = db2&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is what the modified code should look like (this sample assume MySQL)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of changes''':&lt;br /&gt;
&lt;br /&gt;
These 3 lines were commented out:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line needed quotes around db2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And lastly, this line needed added:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you are using an ''MS Access'' database instead of ''MySQL'', replace '''MYSQL''' with '''msaccessjet''' on the line that is added.&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Security: The requested template has been denied access to {file/directory}''==&lt;br /&gt;
===Issue===&lt;br /&gt;
Our shared servers have ColdFusion Sandbox Security enabled, which requires absolute filesystem paths to be provided to tags and functions that interact with the filesystem. If you receive an error that starts with ''Security: The requested template has been denied access to ...'', then it is followed by a relative path, you'll need to replace the relative path with a full path.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
One way to do this is to hard-code the path (''d:\home\sitename.com\wwwroot\filename.jpg''), but that can cause portability problems if your site is ever moved to a different environment. &lt;br /&gt;
&lt;br /&gt;
A better way to do this would be to &amp;quot;wrap&amp;quot; your relative path with the '''ExpandPath()''' function. The ''ExpandPath()'' function will automatically detect the absolute filesystem path to the file, and ColdFusion will no longer give you a permissions error. &lt;br /&gt;
&lt;br /&gt;
'''More info''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/ExpandPath Adobe Documentation - ExpandPath]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion COM Object Error ''java.lang.RuntimeException: Can not use native code: Initialisation failed''==&lt;br /&gt;
The error ''java.lang.RuntimeException: Can not use native code: Initialisation failed'' is related to calling a 32-bit COM object from within a 64-bit ColdFusion installation. &lt;br /&gt;
&lt;br /&gt;
The simplest way to bypass this error is to write a small ASP Webservice to proxy the call to the COM object as shown in '''Option 2''' of this blog post: [http://coldfusion9.blogspot.com/2010/05/32-bit-components-on-64-bit-coldfusion.html 32-bit Components on 64-bit ColdFusion]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can [https://support.hostek.com/ ask Support] to move your site to a 32-bit ColdFusion server.&lt;br /&gt;
&lt;br /&gt;
==Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated Server==&lt;br /&gt;
To use Seefusion, visit the address mentioned in your server's Welcome email.&lt;br /&gt;
&lt;br /&gt;
Once loaded, you'll see a summary of memory consumption, average response time, number of requests processed by ColdFusion per second, and a view of currently running ColdFusion requests. &lt;br /&gt;
===Finding Scripts to Optimize===&lt;br /&gt;
When using Seefusion it is helpful to look at the '''Slow''' section of the request monitor. This will show you recent requests that took longer than 8 seconds to complete, giving you a good idea of what scripts need optimization. &lt;br /&gt;
===Stack Tracing with Seefusion===&lt;br /&gt;
Additionally, when a request is running in the '''Active''' section of Seefusion's request monitor, you can click the paper stack icon to the left of the request to view a stack trace of the request. A stack trace tells you what line of code is currently being processed by the request. &lt;br /&gt;
&lt;br /&gt;
Once the stack trace loads, start at the top and work your way down until you find a recognizable path to a ColdFusion template (''eg. c:\home\mysite.com\wwwroot\index.cfm: 47''). This tells you the template currently being executed followed by the line number being processed at that moment in time. If a request consistently shows the same line of code in subsequent stack traces, then you've found the main area to focus on optimizing.&lt;br /&gt;
&lt;br /&gt;
To make deciphering stack traces easier, you can also click the '''Seestack''' button at the top of the stack trace window. This will send the stack trace to a service that will analyze the trace and attempt to tell you where you need to focus.&lt;br /&gt;
&lt;br /&gt;
===Viewing Metrics over Time===&lt;br /&gt;
If you want to watch how response times and memory utilization in a more granular manner than the dashboard graphs show, you'll want to click the '''Counters''' button at the top of SeeFusion. Once on the Counters page you can select a time interval, then have Seefusion display performance metrics at the interval you selected. This is helpful to ensure requests are completing quickly and not exhausting ColdFusion's memory.&lt;br /&gt;
&lt;br /&gt;
==How to Wrap Your ColdFusion DSN with Seefusion==&lt;br /&gt;
If you wish to have Seefusion monitor your server's query activity, you'll need to &amp;quot;wrap&amp;quot; your DSN with SeeFusion's JDBC driver so Seefusion can monitor the DSN's activity. &lt;br /&gt;
===Install SeeDSN===&lt;br /&gt;
SeeDSN is a plugin for ColdFusion Administrator that makes it easy to wrap a DSN with Seefusion. Follow these directions to install SeeDSN:&lt;br /&gt;
#Download the SeeDSN archive [http://www.seefusion.com/seedsn_v1.1.zip here].&lt;br /&gt;
#Extract the '''seedsn''' folder within the archive to your '''/CFIDE/Administrator/''' folder. This means it will be located at ''/CFIDE/Administrator/seedsn'' once extracted. &lt;br /&gt;
#Move ''/CFIDE/Administrator/seedsn/custommenu.xml'' to ''/CFIDE/Administrator/custommenu.xml''&lt;br /&gt;
===Add Seefusion.jar to the ColdFusion Classpath===&lt;br /&gt;
In order for ColdFusion to use Seefusion's JDBC driver, you'll need to ensure '''seefusion.jar''' is on your ColdFusion class path. Follow these directions to add seefusion.jar to the Coldfusion class path:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Click the '''Java and JVM''' link on the left, under Server Settings.&lt;br /&gt;
#In the box labeled '''ColdFusion Class Path''' add the path to your '''seefusion.jar''' file and click ''Submit Changes''. For example, if it is located in ColdFusion's &amp;quot;WEB-INF\lib&amp;quot; folder, you can add this to the Class Path: '''{application.home}/wwwroot/WEB-INF/lib/seefusion.jar'''. &lt;br /&gt;
#*Each path in the ColdFusion Class Path is separated by a comma, so be sure to add a comma right before the path to seefusion.jar (do not add any spaces).&lt;br /&gt;
#Restart ColdFusion after modifying the class path&lt;br /&gt;
&lt;br /&gt;
===Wrap a DSN using SeeDSN===&lt;br /&gt;
Once you've installed SeeDSN and restarted ColdFusion, you can wrap a DSN with the SeeFusion JDBC driver. Follow these instructions to do so: &lt;br /&gt;
#Log into ColdFusion Administrator&lt;br /&gt;
#Expand the ''SeeFusion'' navigation menu on the left and click '''Datasource Wrapper'''&lt;br /&gt;
#On the ''Datasource Wrapper'' page, you'll see a list of DSNs on your server. To wrap a DSN, click the ''Start'' [[File:Start.png]] icon next to your DSN. SeeDSN will automatically wrap your DSN with the SeeFusion driver and display '''OK''' if it is successful.&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/ WebApper Blog - Using SeeDSN JDBC Wrapping Tool]&lt;br /&gt;
&lt;br /&gt;
==Using fckEditor on ColdFusion 10 or Higher==&lt;br /&gt;
When getting the following error for fckEditor:&lt;br /&gt;
 '''&amp;quot;The server didn't reply with a proper XML data. Please check your configuration.&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
If you are on a ColdFusion 10+ server this will be cause by the '''FileUpload()''' function that is being used.&lt;br /&gt;
In ColdFusion 10+ ''FileUpload'' is a built-in function name, so you'll need to rename the ''FileUpload'' function used in fckeditor.&lt;br /&gt;
You can update the text for fckeditor by changing all instances of &amp;quot;FileUpload&amp;quot; to &amp;quot;fckFileUpload&amp;quot; to remove this conflict.&lt;br /&gt;
&lt;br /&gt;
==Optimze CFIMAGE Rendering in Three Steps==&lt;br /&gt;
===USE===&lt;br /&gt;
When full size images are required, re-sized images need to be used for displaying smaller images or thumbnails and the application needs to perform at optimal speed for displaying images in a browser. &lt;br /&gt;
&lt;br /&gt;
===KEY POINTS===&lt;br /&gt;
Except for during development cfimage '''action=&amp;quot;writeToBrowser&amp;quot;''' should not be used to display images.&lt;br /&gt;
Use CFIMAGE to resize images ''ONCE'', if possible during upload but if page timeouts make this impossible break up the task by using a CFC to check and re-size images as needed.&lt;br /&gt;
&lt;br /&gt;
===SUMMARY===&lt;br /&gt;
Those sites that display many images often times also upload many photos via form or via FTP and need to display both the FULL size images and smaller images for thumb nails or ''(small, med, large)'' optional sizes. The process of uploading images using CFFile can impose time constraints specifically for large files, or if the coldfusion page timeouts are set lower than is possible for large file upload and re-size jobs. To overcome this issue we can write a simple CFC for resizing the images after the upload is complete and the page is run for the first time. This will be ideal for either form based upload or FTP upload making this solution very versatile. &lt;br /&gt;
&lt;br /&gt;
====Step 1 - Create the CFC for re-sizing and writing images to disk====&lt;br /&gt;
&lt;br /&gt;
Create file &amp;quot;GetResizedImage.cfc&amp;quot; in the directory with the CFM files that display images.&lt;br /&gt;
Use the code below for the contents of this file and modify as needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;GetImage&amp;quot; hint=&amp;quot;Re-sizes images for display in album&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the image path where photos exist ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset imgpath = &amp;quot;imgdir/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the domain path, allows reuse resized images on other sites ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset domain = &amp;quot;domain.com&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Re-writes image extension if for alternates of JPG, and adds _resized to differentiate from fullsize images ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset rfile= &amp;quot;#REReplace(&amp;quot;#img#&amp;quot;,&amp;quot;.(jpg|JPG|JPEG|jpeg)&amp;quot;,&amp;quot;_resized.jpg&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Checks if file is already resized ---&amp;gt;&lt;br /&gt;
        &amp;lt;cfif FileExists(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp;&amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#rfile#&amp;quot;)&amp;gt;&lt;br /&gt;
           &amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;!--- Resizes image if it has not been done already ---&amp;gt;&lt;br /&gt;
            &amp;lt;cfset myImage=ImageNew(URLDecode(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp; &amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#img#&amp;quot;))&amp;gt;&lt;br /&gt;
                    &amp;lt;cfset ImageResize(myImage,&amp;quot;175&amp;quot;,&amp;quot;175&amp;quot;,&amp;quot;bilinear&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;!--- Saves image, and to eliminate problems with url friendly encoding when getting our images re-replace %20 with no-space ---&amp;gt;&lt;br /&gt;
                    &amp;lt;cfimage source=&amp;quot;#myImage#&amp;quot; action=&amp;quot;write&amp;quot; overwrite=true destination=&amp;quot;d:\home\#domain#\wwwroot\#imgpath##REReplace(&amp;quot;#rfile#&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot; &amp;quot;,&amp;quot;ALL&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the new path for the image for browser output ---&amp;gt;&lt;br /&gt;
			&amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;!--- Return the image variable ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfreturn myImage&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2 - Invoke the CFC====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Generate image name from query ---&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput query=&amp;quot;MyEvent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Invoke CFC to check if resized image exists, if not resize and output URL for resized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvoke component=&amp;quot;GetResizedImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare what part of the CFC handles checking / getting the image ---&amp;gt;&lt;br /&gt;
	method=&amp;quot;GetImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare variable that will pass back the new image name ---&amp;gt;&lt;br /&gt;
	returnvariable=&amp;quot;myImage&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvokeargument name=&amp;quot;img&amp;quot; value=&amp;quot;#event.Pic#&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&amp;lt;!--- Display re-sized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;img src=&amp;quot;#myImage#&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;     &lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 3 - Test====&lt;br /&gt;
The proposed solution cut page load times from 20+ seconds to below one second after the first page load. During the FIRST or FIRST FEW times the page loads all the re-sizing will be done.&lt;br /&gt;
&lt;br /&gt;
===Q and A===&lt;br /&gt;
'''Question''': Checking if a file exists each time the page loads is excessive.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Answer''': We agree but it's much better than resizing every image each time the page loads.&lt;br /&gt;
&lt;br /&gt;
==How to create Services for Additional ColdFusion Instances==&lt;br /&gt;
If you've created additional ColdFusion instances on your VPS/Dedicated Server, and ColdFusion was unable to create the Services for those instances just do the following:&lt;br /&gt;
&lt;br /&gt;
#Open a Command Prompt as Administrator&lt;br /&gt;
#Run this command, replacing INSTANCE with the actual name of your new ColdFusion instance: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;sc create &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; binPath= &amp;quot;C:\ColdFusion10\INSTANCE\bin\coldfusionsvc.exe&amp;quot; displayname= &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; start= auto&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start your instance through the Windows Services Manager. If you need to know how to create additional ColdFusion instances, please see this guide from Adobe: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSAB4367BA-6D91-4c69-8DBA-E2839394658A.html Defining Additional ColdFusion Instances]&lt;br /&gt;
&lt;br /&gt;
Once you've created the instances, you can attach them to your Web server as described here: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363a5d-7ffc.html Web Server Configuration]&lt;br /&gt;
&lt;br /&gt;
If you're using IIS, this video has a great walkthrough for using the ColdFusion Web Server Connector tool: [http://blogs.coldfusion.com/post.cfm/video-learn-about-iis-connectors-in-coldfusion10 Learn About ColdFusion IIS Connectors]&lt;br /&gt;
&lt;br /&gt;
==How to Fix Error: Value '0000-00-00' can not be represented as java.sql.Date==&lt;br /&gt;
If your application has null values in a MySQL datetime/date column you may encounter the error &amp;quot;Value '0000-00-00' can not be represented as java.sql.Date&amp;quot;. The easiest way to fix this is by adding the parameter '''zeroDateTimeBehavior=convertToNull''' to your site's DSN [http://helpx.adobe.com/coldfusion/kb/mysql-error-java-sql-sqlexception.html as recommended by Adobe].&lt;br /&gt;
===How to Fix Null DateTime Error - '''Shared Hosting'''===&lt;br /&gt;
#Log into your site's WCP control panel&lt;br /&gt;
#Click the ''DataSources (DSNs)'' button&lt;br /&gt;
#Click the ''Edit'' icon next to your DataSource (DSN)&lt;br /&gt;
#Add the following to the '''JDBC Query Parameters''' field: &amp;lt;pre&amp;gt;zeroDateTimeBehavior=convertToNull&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' To add multiple JDBC Query Parameters, separate each name/value pair by an ''''&amp;amp;''''. &lt;br /&gt;
''Example: zeroDateTimeBehavior=convertToNull&amp;amp;characterEncoding=UTF-8''&lt;br /&gt;
===How to Fix Null DateTime Error - '''VPS Hosting'''===&lt;br /&gt;
If your site uses WCP to manage its DSNs, you may utilize the Shared Hosting solution. Otherwise, follow the steps below:&lt;br /&gt;
#Log into ColdFusion Administrator on your VPS/Dedicated Server. &lt;br /&gt;
#Navigate to the &amp;quot;Data Sources&amp;quot; page and click your site's DSN name.&lt;br /&gt;
#On the page that opens add '''?zeroDateTimeBehavior=convertToNull''' to the end of the JDBC URL field.&lt;br /&gt;
#Click '''Submit''' and your site should no longer display the date representation error.&lt;br /&gt;
&lt;br /&gt;
==Find the Java Version Used by ColdFusion or Railo==&lt;br /&gt;
This CFML code will report the version of Java used by your ColdFusion or Railo server:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;#CreateObject(&amp;quot;java&amp;quot;, &amp;quot;java.lang.System&amp;quot;).getProperty(&amp;quot;java.version&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference:''' [http://www.petefreitag.com/item/743.cfm Pete Freitag's Blog - What Version of Java is ColdFusion Using?]&lt;br /&gt;
&lt;br /&gt;
==Reset ColdFusion Admin Password on CF 10+ VPS==&lt;br /&gt;
===Reset CF Admin Password - Windows VPS===&lt;br /&gt;
*On your VPS, open a command prompt window as Administrator&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.bat'' script: &amp;lt;pre&amp;gt;.\passwordreset.bat&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===Reset CF Admin Password - cPanel/Linux VPS===&lt;br /&gt;
*SSH into your VPS&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd /opt/ColdFusion10/cfusion/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.sh'' script: &amp;lt;pre&amp;gt;./passwordreset.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
==ColdFusion 11+ PDF Generation: How to Fix 'No Service Manager is Available' Error==&lt;br /&gt;
If you receive the error '''No Service Manager is Available''' when trying to generate PDFs or use the cfhtmltopdf tag on your ColdFusion 11+ VPS, do the following to fix it:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Expand ''Data &amp;amp; Services'', then click the '''PDF Service''' link&lt;br /&gt;
#On the next page, you should see an entry for ''localhost'' under the list of PDF Service Managers&lt;br /&gt;
#If the localhost service manager is not enabled, click the ''Enable'' button to the left of the manager name. (The button looks like a ''play'' button)&lt;br /&gt;
#Try using cfhtmlpdf now, and see if it works. &lt;br /&gt;
&lt;br /&gt;
If you still have any issues after enabling the service manager, try restarting the '''ColdFusion Addon Services''' Windows service and test again.&lt;br /&gt;
&lt;br /&gt;
==HTML5 Audio Player with ColdFusion==&lt;br /&gt;
This player uses an list named ''Tunes'' within the ''session'' scope to store a list of mp3 names. After populating the list, you can use this code as the foundation for an HTML audio player that plays each song in the list.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfif action is &amp;quot;play_next_tune&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfset myArray=ListtoArray(session.Tunes)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset T_max=Arraylen(myArray)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset session.track=session.track+1&amp;gt;&lt;br /&gt;
	&amp;lt;cfif session.track GT T_max&amp;gt;&lt;br /&gt;
		 &amp;lt;cfset session.track=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
		 &amp;lt;cflocation url=&amp;quot;tunespage.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
		&amp;lt;audio controls id=&amp;quot;myVideo&amp;quot; autoplay&amp;gt;&lt;br /&gt;
		&amp;lt;source src=&amp;quot;path/#myarray[session.track]#&amp;quot; type=&amp;quot;audio/mpeg&amp;quot;&amp;gt;&lt;br /&gt;
		Your browser does not support the audio element.&lt;br /&gt;
		&amp;lt;/audio&amp;gt;&lt;br /&gt;
	&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
		document.getElementById('myVideo').addEventListener(&amp;quot;ended&amp;quot;,function() {&lt;br /&gt;
		window.location.href=&amp;quot;tunespage.cfm?action=play_next_tune&amp;quot;;&lt;br /&gt;
		});&lt;br /&gt;
	&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2443</id>
		<title>ColdFusion Tips &amp; Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2443"/>
				<updated>2015-03-24T20:24:52Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Reset ColdFusion Admin Password on CF 10+ VPS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Converting Application.cfm to Application.cfc==&lt;br /&gt;
Using an '''Application.cfc''' configuration file offers some advantages over the older style '''Application.cfm''' configuration files. Some of the main features that an Application.cfc file give you are &amp;quot;functions triggered by Application, Session, Request, and Error events&amp;quot; and &amp;quot;Application-Level Mappings and Custom Tag Paths&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are only a few steps required to convert an application to use an Application.cfc file:&lt;br /&gt;
&lt;br /&gt;
NOTE: You should ensure that you have a backup of any files before making changes to them.&lt;br /&gt;
&lt;br /&gt;
===Create an '''Application.cfc''' file===&lt;br /&gt;
&lt;br /&gt;
Below is an example '''Application.cfc''' file with the minimum requirements:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Setup '''onRequest''' function in '''Application.cfc''' to include the '''Application.cfm''' file&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if an Application.cfm file already exists in the root of the application. Below is what the Application.cfc file will look like after this addition:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Copy application settings from the '''cfapplication''' tag and remove the '''cfapplication''' tag===&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if a cfapplication tag is used within the application. Each attribute of the cfapplication tag will need to be copied into the cfscript section at the top of the Application.cfc with the pattern [this.attributeName = &amp;quot;value&amp;quot;;].&lt;br /&gt;
&lt;br /&gt;
For example. The below cfapplication tag would be converted into our Application.cfc example as follows:&lt;br /&gt;
&lt;br /&gt;
'''cfapplication''' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication&lt;br /&gt;
	name = &amp;quot;my_app_name&amp;quot;&lt;br /&gt;
	sessionManagement = &amp;quot;Yes&amp;quot;&lt;br /&gt;
	sessionTimeout = &amp;quot;#createTimeSpan(0,0,20,0)#&amp;quot;&lt;br /&gt;
	setClientCookies = &amp;quot;Yes&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Application.cfc''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = &amp;quot;my_app_name&amp;quot;; // app name from old cfapplication tag&lt;br /&gt;
		this.sessionManagement = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
		this.sessionTimeout = CreateTimeSpan(0,0,20,0);&lt;br /&gt;
		this.setClientCookies = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Do not forget to remove the '''cfapplication''' tag after copying the settings into the '''Application.cfc''' file.&lt;br /&gt;
&lt;br /&gt;
Now that the change is complete, this is a good time to test the application to ensure everything is working correctly with the new setup.&lt;br /&gt;
&lt;br /&gt;
==Per-Application ColdFusion Mappings==&lt;br /&gt;
In ColdFusion 8 and above, it is possible to create per-application mappings through your site's Application.cfc file. If you wish to convert to using an Application.cfc file, follow the steps [[ColdFusion_Tips_%26_Tricks#Converting_Application.cfm_to_Application|here]]. &lt;br /&gt;
&lt;br /&gt;
Once you have your Application.cfc created, you will insert the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.mappings[&amp;quot;/test&amp;quot;]=&amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On your site though, you would change &amp;quot;/test&amp;quot; to the name of your mapping. IMPORTANT: You need to include the forward slash before the name of your mapping. Also, change &amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot; to the full physical path to the folder you wish to map. &lt;br /&gt;
'''Note''': The physical path to your FTP root is listed in the &amp;quot;Site Settings&amp;quot; of your control panel at wcp.hostek.com.&lt;br /&gt;
&lt;br /&gt;
To call a template named &amp;quot;testing.cfm&amp;quot; in the &amp;quot;test&amp;quot; directory we just mapped, you would use this line: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;/test/testing.cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-Application Custom Tag Paths==&lt;br /&gt;
Starting in ColdFusion 8, ColdFusion allows creation of Custom Tag Paths in each site's Application.cfc file. This allows you to create and manage your Custom Tag Paths without having to use CF Administrator (ie. submit a support ticket). The following steps will help you create a Custom Tag Path:&lt;br /&gt;
&lt;br /&gt;
If you do not already have an Application.cfc file in your site's Web root, create one now.&lt;br /&gt;
Place the following code in the Application.cfc file and save:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=&amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you'd replace &amp;quot;yourdomain.com&amp;quot; with your domain name, and &amp;quot;customtagfolder&amp;quot; with the name of the folder you created for your custom tags. &lt;br /&gt;
&lt;br /&gt;
Now you have successfully added your custom tag path. If you have multiple tag paths to add, try using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=ListAppend(THIS.customtagpaths, &amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Per-application Robust Exception Information Settings==&lt;br /&gt;
To enable Robust Exception Information on a ColdFusion application, you will need to add the following to the top of the site's ''Application.cfc'' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = true /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Alternatively, if you wish to ensure Robust Exception Information is ''always'' disabled for an application, add this to the site's ''Application.cfc'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = false /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-application JSON Prefix==&lt;br /&gt;
To enable the JSON Prefix for your application add the following to the site's '''Application.cfc''' file, and adjust the '''secureJSONPrefix''' as desired:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = true&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSONPrefix = &amp;quot;//&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can disable this feature using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = false&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Restart a ColdFusion Application==&lt;br /&gt;
If you ever need to restart your site's ColdFusion application (to pick up a setting change, etc), you can do so via the ApplicationStop() function in ColdFusion 9+. &lt;br /&gt;
&lt;br /&gt;
To use this you can create a file (ex: restart.cfm) containing the following code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset ApplicationStop() /&amp;gt;&lt;br /&gt;
&amp;lt;cflocation url=&amp;quot;index.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When you run the file containing that code your ColdFusion Application will be stopped (flushing your application scope), and when the browser is redirected to the index page the application will start again.&lt;br /&gt;
==CFHTTP Connection Failures over HTTPS==&lt;br /&gt;
===Fixing cfhttp Failures on Shared Hosting===&lt;br /&gt;
If you try to use &amp;lt;cfhttp&amp;gt; to connect to a secure site (over HTTPS), you may receive the following error: &amp;quot;Connection Failure: Status code unavailable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this add the following code to your site's &amp;quot;Application.cfm&amp;quot; file (below the 'cfapplication' tag):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- fix for HTTPS connection failures ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif NOT isDefined(&amp;quot;Application.sslfix&amp;quot;)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity = createObject(&amp;quot;java&amp;quot;, &amp;quot;java.security.Security&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity.removeProvider(&amp;quot;JsafeJCE&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset Application.sslfix = true /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If your site uses an &amp;quot;Application.cfc&amp;quot; file instead, then just place that code in the &amp;quot;'onApplicationStart()&amp;quot; method of that file. After making that adjustment you'll need to restart your ColdFusion application as [[ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application|shown here]]. If you still run into issues though, you will need to [https://support.hostek.com/ submit a support ticket] asking our team to install the remote site's SSL certificate into ColdFusion's Java Certificate Store.&lt;br /&gt;
&lt;br /&gt;
===Fixing cfhttp Failures on VPS Hosting===&lt;br /&gt;
If you are having issues connecting to a site or file from with ColdFusion over HTTPS, you can import the remote site's SSL certificate into the the Java SSL Certificate Store used by ColdFusion.&lt;br /&gt;
====Fixing cfhttp Connection Failures with Keytool====&lt;br /&gt;
'''1) Set Java environment'''&amp;lt;br&amp;gt;&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable in the next command. For '''example''', you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
In that case, you would use '''C:\ColdFusion10\jre''' as the value of JAVA_HOME as shown below. Open a command prompt and issue the following commands:&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set JAVA_HOME=C:\ColdFusion10\jre&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set PATH=%PATH%;%JAVA_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, use the following commands (case-sensitive) in your terminal:&lt;br /&gt;
This '''example''' assumes that the JRE is located at ''/opt/coldfusion10/jre''&lt;br /&gt;
    export JAVA_HOME=/opt/coldfusion10/jre&lt;br /&gt;
    export PATH=$PATH:/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
'''2) List the Keystore Contents'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Java installation is at ''C:\ColdFusion10\jre'', then navigate to '''C:\ColdFusion10\jre\bin''':&lt;br /&gt;
    cd C:\ColdFusion10\jre\bin&lt;br /&gt;
If you're using a '''Linux/cPanel''' server, use this command instead:&lt;br /&gt;
    cd /opt/coldfusion10/jre/bin&lt;br /&gt;
&lt;br /&gt;
Now you can list the keystore contents ''(Windows &amp;amp; Linux)'':&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 76 entries&lt;br /&gt;
&lt;br /&gt;
'''3) Import certificate in to keystore and list to check added '''&amp;lt;br&amp;gt;&lt;br /&gt;
''(assumes you've downloaded the certificate to '''c:\temp\inet.cer''' (Windows) or '''/temp/inet.cer''' (Linux/cPanel)''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file c:\temp\inet.cer&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file /temp/inet.cer&lt;br /&gt;
    Trust this certificate? [no]: y&lt;br /&gt;
    Certificate was added to keystore&lt;br /&gt;
&lt;br /&gt;
Now verify the keystore contains your new certificate&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 77 entries&lt;br /&gt;
&lt;br /&gt;
'''4) Restart the ColdFusion application service so the keystore is re-read.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''5) Run your cfhttp request - HTTPS works now!'''&lt;br /&gt;
&lt;br /&gt;
====Fixing cfhttp Connection Failures with Portecle====&lt;br /&gt;
If you'd rather import certificates into the Java SSL Keystore through a GUI, follow these directions to use a tool named Portecle to do so:&lt;br /&gt;
&lt;br /&gt;
#Ensure your JAVA_HOME variable is set correctly as described above.&lt;br /&gt;
#Download Portecle from Sourceforge: [http://sourceforge.net/projects/portecle/ Portecle Project Homepage]&lt;br /&gt;
#Extract the files&lt;br /&gt;
#Open a Command Prompt and navigate to the extracted directory&lt;br /&gt;
#Issue this command to launch Portecle: &amp;lt;pre&amp;gt;java -jar portecle.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#In Notepad, open your jvm.config file to find the JVM PATH for ColdFusion's JVM; look for '''java.home={path here}'''&lt;br /&gt;
#In Portecle click ''File'', ''Open Keystore File''&lt;br /&gt;
#Browse to {JVM PATH}\jre\lib\security to the path, and open the cacerts file; Enter Password: '''changeit'''&lt;br /&gt;
#Click on '''Tools''', '''Import Trusted Certificate''', select the certificate you wish to import.&lt;br /&gt;
#*To obtain the certificate, you can navigate in a browser to the site where the certificate resides, then download the certificate to a CER (X.509 format) file through the browser.&lt;br /&gt;
#Click '''OK''' to import and '''YES''' to accept the certificate as ''trusted''.&lt;br /&gt;
#Click OK again, usually you won't need to change the Alias name;click OK to finish.&lt;br /&gt;
#Click '''File''', '''Save Keystore'''.&lt;br /&gt;
Close Portecle.&lt;br /&gt;
====Fixing CFHTTP Failures Related to Cached DNS Records====&lt;br /&gt;
This solution will prevent Java from caching DNS records for the life of the ColdFusion process. Instead, Java will refresh its records periodically.&lt;br /&gt;
&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable to find the location of the Java installation used by ColdFusion. &lt;br /&gt;
&lt;br /&gt;
For '''example''', on '''Windows''' you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
On '''Linux''' you may see this:&lt;br /&gt;
    java.home=/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
Navigate to the '''security''' folder within the Java installation used by ColdFusion. For '''example''':&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows''' ''(open in Windows Explorer)''&lt;br /&gt;
    C:\ColdFusion10\jre\lib\security\&lt;br /&gt;
'''Linux\cPanel'''&lt;br /&gt;
    cd /opt/coldfusion10/jre/lib/security/&lt;br /&gt;
&lt;br /&gt;
Back-up, then edit the '''java.security''' file within that folder and change the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
'''From'''&lt;br /&gt;
    #networkaddress.cache.ttl=-1&lt;br /&gt;
'''To'''&lt;br /&gt;
    networkaddress.cache.ttl=600&lt;br /&gt;
&lt;br /&gt;
''Note:'' The above value refreshes DNS records every 600 seconds ''(10 minutes)''. You may adjust it to whatever you feel is appropriate for your server.&lt;br /&gt;
&lt;br /&gt;
Now '''Save''' the file then '''Restart ColdFusion''', and the new DNS caching setting will take effect.&lt;br /&gt;
&lt;br /&gt;
==CFMAIL Multi-Part Emails==&lt;br /&gt;
Sending emails with both Text and HTML parts helps reduce the chance of your messages getting caught by a mail server's spam filter. It also helps ensure your recipients can read the message regardless of the mail client being used. The easiest way to do this is to store your message in a variable using &amp;lt;cfsavecontent&amp;gt; then adding it to &amp;lt;cfmail&amp;gt; using &amp;lt;cfmailpart&amp;gt; as shown in the example below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Store your message in a variable ---&amp;gt;&lt;br /&gt;
&amp;lt;cfsavecontent variable=&amp;quot;myemailcontent&amp;quot;&amp;gt;&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
This is some plain text. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;And this is some more text in HTML. It will appear in plain-text for anyone who views the Text part of this email, though.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/cfsavecontent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- Function to strip HTML from message while preserving line breaks ---&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name= &amp;quot;textMessage&amp;quot; access= &amp;quot;public&amp;quot; returntype= &amp;quot;string&amp;quot; hint= &amp;quot;Converts an html email message into a nicely formatted with line breaks plain text message&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfargument name= &amp;quot;string&amp;quot; required= &amp;quot;true&amp;quot; type= &amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfscript&amp;gt;&lt;br /&gt;
      var pattern = &amp;quot; &amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
      var CRLF = chr( 13) &amp;amp; chr( 10);&lt;br /&gt;
      var message = ReplaceNoCase(arguments.string, pattern, CRLF , &amp;quot;ALL&amp;quot;);&lt;br /&gt;
      pattern = &amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;;&lt;br /&gt;
    &amp;lt;/cfscript&amp;gt;&lt;br /&gt;
    &amp;lt;cfreturn REReplaceNoCase(message, pattern, &amp;quot;&amp;quot; , &amp;quot;ALL&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!--- Now send the email. When adding the Text part, we'll use the textMessage() function we just created to strip out HTML tags. ---&amp;gt;&lt;br /&gt;
&amp;lt;cfmail from=&amp;quot;sender@domain.com&amp;quot; to=&amp;quot;recipient@anotherdomain.com&amp;quot; subject=&amp;quot;Multi-part Email with CFMAIL&amp;quot; type=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/plain&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#textmessage(myemailcontent)#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/html&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#myemailcontent#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: [http://cookbooks.adobe.com/post_CFMAIL_the_right_way-17875.html CFMAIL the right way]&lt;br /&gt;
&lt;br /&gt;
==Scheduling Tasks in ColdFusion==&lt;br /&gt;
On occasion shared ColdFusion hosting customers need to setup Scheduled Task to run files on a cycle. &lt;br /&gt;
&lt;br /&gt;
This can be done with the following steps, making use of ColdFusion's &amp;lt;cfschedule&amp;gt; tag:&lt;br /&gt;
&lt;br /&gt;
#Create a file locally using any text editor, save the file with the .CFM extension (example: setschedule_example.cfm).&lt;br /&gt;
#Copy and past in the code example below taken from ''ColdFusion's Documentation'' and save.&lt;br /&gt;
#Replace the data in the example note the following recommendations.&amp;lt;br /&amp;gt;!- Name each file made for creating a schedule with the name of the task so you can reference the task later if needed. Specific naming will also make it more difficult for someone to randomly run the file.&amp;lt;br /&amp;gt;!- If you need to schedule a job to run monthly on any date in the range 28-31, read about how ColdFusion will handle the scheduling in the ColdFuison8 documentation referenced below.&lt;br /&gt;
#Working example, the code example below is a working tested solution for getting the weather for a specific zip code and the task to email the results.&lt;br /&gt;
&lt;br /&gt;
'''Scheduled Task'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- This sets the initial task, if your just wanting to set the schedule --&amp;gt;&lt;br /&gt;
&amp;lt;cfschedule action = &amp;quot;update&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot; &lt;br /&gt;
    operation = &amp;quot;HTTPRequest&amp;quot;&lt;br /&gt;
    url = &amp;quot;http://test.hostek.net/weather_send.cfm&amp;quot;&lt;br /&gt;
    startDate = &amp;quot;7/6/09&amp;quot;&lt;br /&gt;
    startTime = &amp;quot;09:30 AM&amp;quot;&lt;br /&gt;
    interval = &amp;quot;3600&amp;quot;&lt;br /&gt;
    resolveURL = &amp;quot;Yes&amp;quot;&lt;br /&gt;
    requestTimeOut = &amp;quot;600&amp;quot;&lt;br /&gt;
    mode = &amp;quot;application&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task created to be deleted, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;delete&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task to be paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;pause&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task resumed if paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;resume&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Weather Collector'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;CF External Weather Checker&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfset zip=&amp;quot;12345&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;cfinvoke webservice=&amp;quot;http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl&amp;quot; method=&amp;quot;getCityWeatherByZIP&amp;quot; returnvariable=&amp;quot;aWeatherReturn&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cfinvokeargument name=&amp;quot;ZIP&amp;quot; value=&amp;quot;#zip#&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aWeatherReturn.temperature EQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt; I cannot get the weather for #zip# external http connections must be DOWN.&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;cfset message=&amp;quot;The temperature for #zip# (Your city) is #aWeatherReturn.temperature# degrees.&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif message NEQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfmail from = &amp;quot;weather.server@test.com&amp;quot; to = &amp;quot;test@test.com&amp;quot; subject = &amp;quot;Weather checker&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#message#&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note''': We highly recommend setting the ''mode'' attribute of cfschedule to ''application''. This will ensure your site's application is the only one allowed to modify the task. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''More information on using CFSchedule'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/cfschedule Adobe ColdFusion Documentation - CFSchedule]&lt;br /&gt;
*[http://www.isummation.com/blog/configuring-coldfusion-scheduled-tasks-using-the-cfschedule-tag/ iSummation Blog - Configuring ColdFusion Scheduled Tasks using the CFSCHEDULE tag]&lt;br /&gt;
&lt;br /&gt;
==Session Management - Handling Bots and Spiders==&lt;br /&gt;
===Robots.txt File===&lt;br /&gt;
First and foremost we suggest creating a robots.txt file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time. Second to prevent specific bots from crawling the website. &lt;br /&gt;
&lt;br /&gt;
Please see our [[Robots|robots.txt article]] for more information on implementing a robots.txt on your site.&lt;br /&gt;
&lt;br /&gt;
===Lower Session Timeouts for Bots and Spiders===&lt;br /&gt;
Next we suggest setting your session timeout specifically lower for bots and spiders. These spiders and bots will crawl a page and when a session (ColdFusion) is created, it will persist during then entire page load. The page fully loaded allows the bot or spider to get the information from the Web page AND allows the session to expire quickly protecting ColdFusion from effects similar to a memory leak. &lt;br /&gt;
&lt;br /&gt;
To do this, implement the appropriate solution for your site below:&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfm'''====&lt;br /&gt;
Place this code at the top of your Application.cfm file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then use the '''REQUEST.sessionTimeout''' variable to specify the session timeout period in your '''cfapplication''' tag: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication name=&amp;quot;myawesomeapp&amp;quot;&lt;br /&gt;
     sessionmanagement=&amp;quot;Yes&amp;quot;&lt;br /&gt;
     sessiontimeout=&amp;quot;#REQUEST.sessionTimeout#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (tag-based)====&lt;br /&gt;
If you primarily use cfml tags in your Application.cfc, you can set the Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
 &amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (cfscript)====&lt;br /&gt;
If instead, you're using cfscipt in your Application.cfc, you'll set the custom Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
// This checks if a cookie is created, for bots this will return false and use the low session timeout&lt;br /&gt;
if (StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) || StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)){&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,30,0);&lt;br /&gt;
} else {&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,0,2);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.bennadel.com/blog/1083-ColdFusion-Session-Management-And-Spiders-Bots.htm Session Management code examples for the Application.cfm]&lt;br /&gt;
&lt;br /&gt;
==Creating Client Variables Tables for MySQL Databases==&lt;br /&gt;
If you need your datasource set up as a ColdFusion Client Variables Store, you can enable the '''Client Variables'' option in your ColdFusion datasource within the WCP control panel. &lt;br /&gt;
&lt;br /&gt;
Please note, if your datasource MySQL DSN, you'll need to create the necessary tables prior to using the Client Variable Store. To do this you would need to create two tables, one named &amp;quot;cdata&amp;quot; and one named &amp;quot;cglobal&amp;quot;. The SQL you'd use to create those tables is below:&lt;br /&gt;
&lt;br /&gt;
Table: '''cdata'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
 CREATE TABLE IF NOT EXISTS cdata (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          app varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          PRIMARY KEY (cfid,app)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Table: '''cglobal'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS cglobal (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          lvisit timestamp,&lt;br /&gt;
          KEY cfid (cfid),&lt;br /&gt;
          KEY lvisit (lvisit)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Output CF Error details without CFDump==&lt;br /&gt;
It is common in an error handler that you want to output all of the error details to the screen, a file, or an email. Therefore, the cfdump tag is commonly used for this; and, while this works well in development, it is not always the best practice on a production site because of the performance of the cfdump tag due to its use of reflection (Runtime type introspection).&lt;br /&gt;
&lt;br /&gt;
A better performing alternative is to output the information you want directly from the Error/Exception struct within a 'cfoutput' tag. This can be done by looking up the cferror structure or the cfcatch structure in the ColdFusion docs to see what is available and what values you might want to output:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Error''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cferror&amp;lt;br /&amp;gt;&lt;br /&gt;
'''CFCatch''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cfcatch&lt;br /&gt;
&lt;br /&gt;
===Cfdump Custom Tag Alternative===&lt;br /&gt;
You can also use the following link to download an example CF custom tag that will give a similar error output as when using the cfdump tag on an error variable:&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the custom tag's usage:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the error handler specified in your 'cferror' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cf_OutputError Error=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code would replace:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfdump var=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in a cfcatch block:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cftry&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;cfcatch&amp;gt;&lt;br /&gt;
   &amp;lt;cf_OutputCFCatch CFCatch=&amp;quot;#CFCatch#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/cfcatch&amp;gt;&lt;br /&gt;
&amp;lt;/cftry&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configure ColdFusion to Handle html and htm Files==&lt;br /&gt;
===Enable HTML/HTM as CFML on Shared Accounts===&lt;br /&gt;
On our ColdFusion servers, the best way to process HTML files (.html, .htm) as ColdFusion/CFML (.cfm files) is by using a set of rewrite rules that route the HTML files through a ColdFusion &amp;quot;controller&amp;quot; script. The main benefits of this approach are that it is easy to implement on a site-by-site basis, and it works with any version of ColdFusion. To implement this approach on your site, follow the steps below:&lt;br /&gt;
====Step 1: Add Rewrite Rules to Route HTML Files through the CFM Controller====&lt;br /&gt;
If you have a '.htaccess' file in your webroot, add the rules below to the top of that file. Otherwise, create a file named '.htaccess' in your site's web root and place these rules within it:&lt;br /&gt;
=====For Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.html htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====For Sites Using .HTM Files=====&lt;br /&gt;
'''NOTE:''' If your site uses ''.htm'' files instead of ''.html'' files, use this set of rules instead. The only difference is ''html'' is replaced with ''.htm''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.htm htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 2: Create the ColdFusion Controller Script (htmlcontrol.cfm)====&lt;br /&gt;
Now we just need to create a ColdFusion script that will process the HTML files. To do this, create a file named '''htmlcontrol.cfm''' within your site's web root. Place this CFML code within the file:&lt;br /&gt;
=====CFML for Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.html&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====CFML for Sites Using .HTM Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.htm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you save the controller script, your site will begin processing any ColdFusion/CFML code within your HTML files.&lt;br /&gt;
===Enable HTML/HTM as CFML on a VPS===&lt;br /&gt;
In case you need to process ColdFusion code in your .htm or .html files, here is what you will need to do to get this to work. This is based on using ColdFusion on one of our dedicated server hosting accounts on a Windows server.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This will affect every site on the server, so use cautiously.&lt;br /&gt;
&lt;br /&gt;
First, you will need to edit the web.xml file located generally at C:\ColdFusion10\cfusion\wwwroot\WEB-INF&lt;br /&gt;
&lt;br /&gt;
Open this file and look for '''coldfusion_mapping_1'''.&lt;br /&gt;
&lt;br /&gt;
Scroll down the file until you see the last number increment like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;servlet-mapping id=&amp;quot;macromedia_mapping_15&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then add the following right below the closing &amp;lt;/servlet-mapping&amp;gt; of the last number increment item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_16&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_17&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_18&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_19&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save this file and exit.&lt;br /&gt;
&lt;br /&gt;
Now in IIS, setup a mapping for the site:&lt;br /&gt;
#In IIS 7+ click the server name section (right below the '''Start Page''' in the left-hand navigation), then double-click the '''Handler Mappings''' icon.&lt;br /&gt;
#Select and &amp;quot;edit&amp;quot; the '''*.cfm''' record and copy the value of &amp;quot;executable&amp;quot;. Now hit Cancel and then click '''Add Script Map'''. &lt;br /&gt;
#Paste the executable value copied from the '''*.cfm''' record and type '''*.htm''' into the '''Request Path''' and hit OK. &lt;br /&gt;
#Repeat the above steps to add a handler for '''*.html''' &lt;br /&gt;
&lt;br /&gt;
Lastly, open the '''uriworkermap.properties''' file for your ColdFusion 10 IIS Connector in a text editor such as Notepad. On a standard ColdFusion installation this is located at: &amp;lt;pre&amp;gt;C:\ColdFusion10\config\wsconfig\1\uriworkermap.properties&amp;lt;/pre&amp;gt;&lt;br /&gt;
Copy the following lines, paste them at the bottom of the file, then save and close the file: &amp;lt;pre&amp;gt;/*.html = cfusion&lt;br /&gt;
/*.htm = cfusion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the ColdFusion service and IIS. ColdFusion should begin processing CFML within htm/html files now.&lt;br /&gt;
&lt;br /&gt;
==Increase the ColdFusion Post Parameters Limit==&lt;br /&gt;
===ColdFusion 10===&lt;br /&gt;
In ColdFusion 10, you can easily increase the value of ColdFusion's '''postParametersLimit''' via the ColdFusion Administrator. Once logged into the ColdFusion Administrator, click the '''Settings''' link then scroll to the bottom of the page. Set the value for the Post Parameters Limit to the desired limit and click the submit button. &lt;br /&gt;
===ColdFusion 9 and below===&lt;br /&gt;
To adjust the Post Parameters Limit setting in ColdFusion 9 and below, you will have to edit the server's '''neo-runtime.xml''' file which is located here on a standard installation: &amp;lt;pre&amp;gt;C:\ColdFusion9\lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open that file in a text editor such as Notepad, then search for the '''postSizeLimit''' tag. It will look similar to this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postSizeLimit'&amp;gt;&amp;lt;number&amp;gt;100.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediately after that set of tags, paste this chunk of text: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postParametersLimit'&amp;gt;&amp;lt;number&amp;gt;1000.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once you've adjusted the file, you'll just need to save your changes and restart ColdFusion for the new setting to go into effect. '''Note''': The value of '''1000''' is just an example, so you can increase it as needed. &lt;br /&gt;
&lt;br /&gt;
==Loading custom Java library or Java Libraries (jar or class files) in ColdFusion 10==&lt;br /&gt;
ColdFusion 10 makes it easy to load Java libraries into your ColdFusion application without having to restart ColdFusion. All that's required is your application define the 'THIS.javaSettings' attribute within the site's Application.cfc like below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.javaSettings = {LoadPaths = [&amp;quot;/javafiles/&amp;quot;], loadColdFusionClassPath = true, reloadOnChange=false}/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will check the ''javafiles'' directory in your Web root for 'jar' and 'class' files and make any libraries within the directory accessible from your ColdFusion application. If you modify the JAR files in your ''javafiles'' directory though, ColdFusion will need to be restarted to load the new versions of the JAR files. &lt;br /&gt;
&lt;br /&gt;
'''References''': &lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/Enhanced+Java+integration+in+ColdFusion+10 Adobe ColdFusion Documentation - Enhanced Java Integration in ColdFusion]&lt;br /&gt;
*[http://www.raymondcamden.com/2014/6/16/Issue-with-ColdFusion-JavaSettings-and-ReloadOnChange Ray Camden's Blog - Issue with ColdFusion JavaSettings and ReloadOnChange]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Permission denied for creating Java object: coldfusion.server.ServiceFactory''==&lt;br /&gt;
===When using Mura or using Transfer ORM===&lt;br /&gt;
====Issue====&lt;br /&gt;
If you are using '''Mura''' or using '''Transfer ORM''' and you get this error, ''Permission denied for creating Java object: coldfusion.server.ServiceFactory'', you are likely using an outdated version of Mura and also are probably on a ColdFusion 9 server. The Transfer ORM component causing this issue has not been updated to work with ColdFusion 9. There is a quick fix though:&lt;br /&gt;
====Solution====&lt;br /&gt;
Find the file named CFMLVersion.cfc which should be at '''/wwwroot/requirements/transfer/com/factory'''.&lt;br /&gt;
&lt;br /&gt;
Edit that file and find the line that has:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And change that to:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;) OR server.coldfusion.productversion.startsWith(&amp;quot;9&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save the file and it should now work.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Since this is likely running an outdated version of Mura, we highly recommend updating Mura to the latest version to take advantage of numerous performance and security enhancements.&lt;br /&gt;
===When using DataMgr===&lt;br /&gt;
If you get this error while using DataMgr.cfc, the changes described below will solve this problem:&lt;br /&gt;
&lt;br /&gt;
Here is the section of code from the original DataMgr.cfc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection = getConnection()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset db = connection.getMetaData().getDatabaseProductName()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection.close()&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = db2&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is what the modified code should look like (this sample assume MySQL)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of changes''':&lt;br /&gt;
&lt;br /&gt;
These 3 lines were commented out:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line needed quotes around db2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And lastly, this line needed added:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you are using an ''MS Access'' database instead of ''MySQL'', replace '''MYSQL''' with '''msaccessjet''' on the line that is added.&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Security: The requested template has been denied access to {file/directory}''==&lt;br /&gt;
===Issue===&lt;br /&gt;
Our shared servers have ColdFusion Sandbox Security enabled, which requires absolute filesystem paths to be provided to tags and functions that interact with the filesystem. If you receive an error that starts with ''Security: The requested template has been denied access to ...'', then it is followed by a relative path, you'll need to replace the relative path with a full path.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
One way to do this is to hard-code the path (''d:\home\sitename.com\wwwroot\filename.jpg''), but that can cause portability problems if your site is ever moved to a different environment. &lt;br /&gt;
&lt;br /&gt;
A better way to do this would be to &amp;quot;wrap&amp;quot; your relative path with the '''ExpandPath()''' function. The ''ExpandPath()'' function will automatically detect the absolute filesystem path to the file, and ColdFusion will no longer give you a permissions error. &lt;br /&gt;
&lt;br /&gt;
'''More info''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/ExpandPath Adobe Documentation - ExpandPath]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion COM Object Error ''java.lang.RuntimeException: Can not use native code: Initialisation failed''==&lt;br /&gt;
The error ''java.lang.RuntimeException: Can not use native code: Initialisation failed'' is related to calling a 32-bit COM object from within a 64-bit ColdFusion installation. &lt;br /&gt;
&lt;br /&gt;
The simplest way to bypass this error is to write a small ASP Webservice to proxy the call to the COM object as shown in '''Option 2''' of this blog post: [http://coldfusion9.blogspot.com/2010/05/32-bit-components-on-64-bit-coldfusion.html 32-bit Components on 64-bit ColdFusion]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can [https://support.hostek.com/ ask Support] to move your site to a 32-bit ColdFusion server.&lt;br /&gt;
&lt;br /&gt;
==Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated Server==&lt;br /&gt;
To use Seefusion, visit the address mentioned in your server's Welcome email.&lt;br /&gt;
&lt;br /&gt;
Once loaded, you'll see a summary of memory consumption, average response time, number of requests processed by ColdFusion per second, and a view of currently running ColdFusion requests. &lt;br /&gt;
===Finding Scripts to Optimize===&lt;br /&gt;
When using Seefusion it is helpful to look at the '''Slow''' section of the request monitor. This will show you recent requests that took longer than 8 seconds to complete, giving you a good idea of what scripts need optimization. &lt;br /&gt;
===Stack Tracing with Seefusion===&lt;br /&gt;
Additionally, when a request is running in the '''Active''' section of Seefusion's request monitor, you can click the paper stack icon to the left of the request to view a stack trace of the request. A stack trace tells you what line of code is currently being processed by the request. &lt;br /&gt;
&lt;br /&gt;
Once the stack trace loads, start at the top and work your way down until you find a recognizable path to a ColdFusion template (''eg. c:\home\mysite.com\wwwroot\index.cfm: 47''). This tells you the template currently being executed followed by the line number being processed at that moment in time. If a request consistently shows the same line of code in subsequent stack traces, then you've found the main area to focus on optimizing.&lt;br /&gt;
&lt;br /&gt;
To make deciphering stack traces easier, you can also click the '''Seestack''' button at the top of the stack trace window. This will send the stack trace to a service that will analyze the trace and attempt to tell you where you need to focus.&lt;br /&gt;
&lt;br /&gt;
===Viewing Metrics over Time===&lt;br /&gt;
If you want to watch how response times and memory utilization in a more granular manner than the dashboard graphs show, you'll want to click the '''Counters''' button at the top of SeeFusion. Once on the Counters page you can select a time interval, then have Seefusion display performance metrics at the interval you selected. This is helpful to ensure requests are completing quickly and not exhausting ColdFusion's memory.&lt;br /&gt;
&lt;br /&gt;
==How to Wrap Your ColdFusion DSN with Seefusion==&lt;br /&gt;
If you wish to have Seefusion monitor your server's query activity, you'll need to &amp;quot;wrap&amp;quot; your DSN with SeeFusion's JDBC driver so Seefusion can monitor the DSN's activity. &lt;br /&gt;
===Install SeeDSN===&lt;br /&gt;
SeeDSN is a plugin for ColdFusion Administrator that makes it easy to wrap a DSN with Seefusion. Follow these directions to install SeeDSN:&lt;br /&gt;
#Download the SeeDSN archive [http://www.seefusion.com/seedsn_v1.1.zip here].&lt;br /&gt;
#Extract the '''seedsn''' folder within the archive to your '''/CFIDE/Administrator/''' folder. This means it will be located at ''/CFIDE/Administrator/seedsn'' once extracted. &lt;br /&gt;
#Move ''/CFIDE/Administrator/seedsn/custommenu.xml'' to ''/CFIDE/Administrator/custommenu.xml''&lt;br /&gt;
===Add Seefusion.jar to the ColdFusion Classpath===&lt;br /&gt;
In order for ColdFusion to use Seefusion's JDBC driver, you'll need to ensure '''seefusion.jar''' is on your ColdFusion class path. Follow these directions to add seefusion.jar to the Coldfusion class path:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Click the '''Java and JVM''' link on the left, under Server Settings.&lt;br /&gt;
#In the box labeled '''ColdFusion Class Path''' add the path to your '''seefusion.jar''' file and click ''Submit Changes''. For example, if it is located in ColdFusion's &amp;quot;WEB-INF\lib&amp;quot; folder, you can add this to the Class Path: '''{application.home}/wwwroot/WEB-INF/lib/seefusion.jar'''. &lt;br /&gt;
#*Each path in the ColdFusion Class Path is separated by a comma, so be sure to add a comma right before the path to seefusion.jar (do not add any spaces).&lt;br /&gt;
#Restart ColdFusion after modifying the class path&lt;br /&gt;
&lt;br /&gt;
===Wrap a DSN using SeeDSN===&lt;br /&gt;
Once you've installed SeeDSN and restarted ColdFusion, you can wrap a DSN with the SeeFusion JDBC driver. Follow these instructions to do so: &lt;br /&gt;
#Log into ColdFusion Administrator&lt;br /&gt;
#Expand the ''SeeFusion'' navigation menu on the left and click '''Datasource Wrapper'''&lt;br /&gt;
#On the ''Datasource Wrapper'' page, you'll see a list of DSNs on your server. To wrap a DSN, click the ''Start'' [[File:Start.png]] icon next to your DSN. SeeDSN will automatically wrap your DSN with the SeeFusion driver and display '''OK''' if it is successful.&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/ WebApper Blog - Using SeeDSN JDBC Wrapping Tool]&lt;br /&gt;
&lt;br /&gt;
==Using fckEditor on ColdFusion 10 or Higher==&lt;br /&gt;
When getting the following error for fckEditor:&lt;br /&gt;
 '''&amp;quot;The server didn't reply with a proper XML data. Please check your configuration.&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
If you are on a ColdFusion 10+ server this will be cause by the '''FileUpload()''' function that is being used.&lt;br /&gt;
In ColdFusion 10+ ''FileUpload'' is a built-in function name, so you'll need to rename the ''FileUpload'' function used in fckeditor.&lt;br /&gt;
You can update the text for fckeditor by changing all instances of &amp;quot;FileUpload&amp;quot; to &amp;quot;fckFileUpload&amp;quot; to remove this conflict.&lt;br /&gt;
&lt;br /&gt;
==Optimze CFIMAGE Rendering in Three Steps==&lt;br /&gt;
===USE===&lt;br /&gt;
When full size images are required, re-sized images need to be used for displaying smaller images or thumbnails and the application needs to perform at optimal speed for displaying images in a browser. &lt;br /&gt;
&lt;br /&gt;
===KEY POINTS===&lt;br /&gt;
Except for during development cfimage '''action=&amp;quot;writeToBrowser&amp;quot;''' should not be used to display images.&lt;br /&gt;
Use CFIMAGE to resize images ''ONCE'', if possible during upload but if page timeouts make this impossible break up the task by using a CFC to check and re-size images as needed.&lt;br /&gt;
&lt;br /&gt;
===SUMMARY===&lt;br /&gt;
Those sites that display many images often times also upload many photos via form or via FTP and need to display both the FULL size images and smaller images for thumb nails or ''(small, med, large)'' optional sizes. The process of uploading images using CFFile can impose time constraints specifically for large files, or if the coldfusion page timeouts are set lower than is possible for large file upload and re-size jobs. To overcome this issue we can write a simple CFC for resizing the images after the upload is complete and the page is run for the first time. This will be ideal for either form based upload or FTP upload making this solution very versatile. &lt;br /&gt;
&lt;br /&gt;
====Step 1 - Create the CFC for re-sizing and writing images to disk====&lt;br /&gt;
&lt;br /&gt;
Create file &amp;quot;GetResizedImage.cfc&amp;quot; in the directory with the CFM files that display images.&lt;br /&gt;
Use the code below for the contents of this file and modify as needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;GetImage&amp;quot; hint=&amp;quot;Re-sizes images for display in album&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the image path where photos exist ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset imgpath = &amp;quot;imgdir/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the domain path, allows reuse resized images on other sites ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset domain = &amp;quot;domain.com&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Re-writes image extension if for alternates of JPG, and adds _resized to differentiate from fullsize images ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset rfile= &amp;quot;#REReplace(&amp;quot;#img#&amp;quot;,&amp;quot;.(jpg|JPG|JPEG|jpeg)&amp;quot;,&amp;quot;_resized.jpg&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Checks if file is already resized ---&amp;gt;&lt;br /&gt;
        &amp;lt;cfif FileExists(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp;&amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#rfile#&amp;quot;)&amp;gt;&lt;br /&gt;
           &amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;!--- Resizes image if it has not been done already ---&amp;gt;&lt;br /&gt;
            &amp;lt;cfset myImage=ImageNew(URLDecode(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp; &amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#img#&amp;quot;))&amp;gt;&lt;br /&gt;
                    &amp;lt;cfset ImageResize(myImage,&amp;quot;175&amp;quot;,&amp;quot;175&amp;quot;,&amp;quot;bilinear&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;!--- Saves image, and to eliminate problems with url friendly encoding when getting our images re-replace %20 with no-space ---&amp;gt;&lt;br /&gt;
                    &amp;lt;cfimage source=&amp;quot;#myImage#&amp;quot; action=&amp;quot;write&amp;quot; overwrite=true destination=&amp;quot;d:\home\#domain#\wwwroot\#imgpath##REReplace(&amp;quot;#rfile#&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot; &amp;quot;,&amp;quot;ALL&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the new path for the image for browser output ---&amp;gt;&lt;br /&gt;
			&amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;!--- Return the image variable ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfreturn myImage&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2 - Invoke the CFC====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Generate image name from query ---&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput query=&amp;quot;MyEvent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Invoke CFC to check if resized image exists, if not resize and output URL for resized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvoke component=&amp;quot;GetResizedImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare what part of the CFC handles checking / getting the image ---&amp;gt;&lt;br /&gt;
	method=&amp;quot;GetImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare variable that will pass back the new image name ---&amp;gt;&lt;br /&gt;
	returnvariable=&amp;quot;myImage&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvokeargument name=&amp;quot;img&amp;quot; value=&amp;quot;#event.Pic#&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&amp;lt;!--- Display re-sized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;img src=&amp;quot;#myImage#&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;     &lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 3 - Test====&lt;br /&gt;
The proposed solution cut page load times from 20+ seconds to below one second after the first page load. During the FIRST or FIRST FEW times the page loads all the re-sizing will be done.&lt;br /&gt;
&lt;br /&gt;
===Q and A===&lt;br /&gt;
'''Question''': Checking if a file exists each time the page loads is excessive.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Answer''': We agree but it's much better than resizing every image each time the page loads.&lt;br /&gt;
&lt;br /&gt;
==How to create Services for Additional ColdFusion Instances==&lt;br /&gt;
If you've created additional ColdFusion instances on your VPS/Dedicated Server, and ColdFusion was unable to create the Services for those instances just do the following:&lt;br /&gt;
&lt;br /&gt;
#Open a Command Prompt as Administrator&lt;br /&gt;
#Run this command, replacing INSTANCE with the actual name of your new ColdFusion instance: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;sc create &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; binPath= &amp;quot;C:\ColdFusion10\INSTANCE\bin\coldfusionsvc.exe&amp;quot; displayname= &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; start= auto&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start your instance through the Windows Services Manager. If you need to know how to create additional ColdFusion instances, please see this guide from Adobe: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSAB4367BA-6D91-4c69-8DBA-E2839394658A.html Defining Additional ColdFusion Instances]&lt;br /&gt;
&lt;br /&gt;
Once you've created the instances, you can attach them to your Web server as described here: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363a5d-7ffc.html Web Server Configuration]&lt;br /&gt;
&lt;br /&gt;
If you're using IIS, this video has a great walkthrough for using the ColdFusion Web Server Connector tool: [http://blogs.coldfusion.com/post.cfm/video-learn-about-iis-connectors-in-coldfusion10 Learn About ColdFusion IIS Connectors]&lt;br /&gt;
&lt;br /&gt;
==How to Fix Error: Value '0000-00-00' can not be represented as java.sql.Date==&lt;br /&gt;
If your application has null values in a MySQL datetime/date column you may encounter the error &amp;quot;Value '0000-00-00' can not be represented as java.sql.Date&amp;quot;. The easiest way to fix this is by adding the parameter '''zeroDateTimeBehavior=convertToNull''' to your site's DSN [http://helpx.adobe.com/coldfusion/kb/mysql-error-java-sql-sqlexception.html as recommended by Adobe].&lt;br /&gt;
===How to Fix Null DateTime Error - '''Shared Hosting'''===&lt;br /&gt;
#Log into your site's WCP control panel&lt;br /&gt;
#Click the ''DataSources (DSNs)'' button&lt;br /&gt;
#Click the ''Edit'' icon next to your DataSource (DSN)&lt;br /&gt;
#Add the following to the '''JDBC Query Parameters''' field: &amp;lt;pre&amp;gt;zeroDateTimeBehavior=convertToNull&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' To add multiple JDBC Query Parameters, separate each name/value pair by an ''''&amp;amp;''''. &lt;br /&gt;
''Example: zeroDateTimeBehavior=convertToNull&amp;amp;characterEncoding=UTF-8''&lt;br /&gt;
===How to Fix Null DateTime Error - '''VPS Hosting'''===&lt;br /&gt;
If your site uses WCP to manage its DSNs, you may utilize the Shared Hosting solution. Otherwise, follow the steps below:&lt;br /&gt;
#Log into ColdFusion Administrator on your VPS/Dedicated Server. &lt;br /&gt;
#Navigate to the &amp;quot;Data Sources&amp;quot; page and click your site's DSN name.&lt;br /&gt;
#On the page that opens add '''?zeroDateTimeBehavior=convertToNull''' to the end of the JDBC URL field.&lt;br /&gt;
#Click '''Submit''' and your site should no longer display the date representation error.&lt;br /&gt;
&lt;br /&gt;
==Find the Java Version Used by ColdFusion or Railo==&lt;br /&gt;
This CFML code will report the version of Java used by your ColdFusion or Railo server:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;#CreateObject(&amp;quot;java&amp;quot;, &amp;quot;java.lang.System&amp;quot;).getProperty(&amp;quot;java.version&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference:''' [http://www.petefreitag.com/item/743.cfm Pete Freitag's Blog - What Version of Java is ColdFusion Using?]&lt;br /&gt;
&lt;br /&gt;
==Reset ColdFusion Admin Password on CF 10+ VPS==&lt;br /&gt;
===Reset CF Admin Password - Windows VPS===&lt;br /&gt;
*On your VPS, open a command prompt window as Administrator&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.bat'' script: &amp;lt;pre&amp;gt;.\passwordreset.bat&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===Reset CF Admin Password - cPanel/Linux VPS===&lt;br /&gt;
*SSH into your VPS&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd /opt/ColdFusion10/cfusion/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.sh'' script: &amp;lt;pre&amp;gt;./passwordreset.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
==ColdFusion 11+ PDF Generation: How to Fix 'No Service Manager is Available' Error==&lt;br /&gt;
If you receive the error '''No Service Manager is Available''' when trying to generate PDFs or use the cfhtmltopdf tag on your ColdFusion 11+ VPS, do the following to fix it:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Expand ''Data &amp;amp; Services'', then click the '''PDF Service''' link&lt;br /&gt;
#On the next page, you should see an entry for ''localhost'' under the list of PDF Service Managers&lt;br /&gt;
#If the localhost service manager is not enabled, click the ''Enable'' button to the left of the manager name. (The button looks like a ''play'' button)&lt;br /&gt;
#Try using cfhtmlpdf now, and see if it works. &lt;br /&gt;
&lt;br /&gt;
If you still have any issues after enabling the service manager, try restarting the '''ColdFusion Addon Services''' Windows service and test again.&lt;br /&gt;
&lt;br /&gt;
===HTML5 Audio Player with ColdFusion===&lt;br /&gt;
This player uses an list named ''Tunes'' within the ''session'' scope to store a list of mp3 names. After populating the list, you can use this code as the foundation for an HTML audio player that plays each song in the list.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfif action is &amp;quot;play_next_tune&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfset myArray=ListtoArray(session.Tunes)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset T_max=Arraylen(myArray)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset session.track=session.track+1&amp;gt;&lt;br /&gt;
	&amp;lt;cfif session.track GT T_max&amp;gt;&lt;br /&gt;
		 &amp;lt;cfset session.track=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
		 &amp;lt;cflocation url=&amp;quot;tunespage.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
		&amp;lt;audio controls id=&amp;quot;myVideo&amp;quot; autoplay&amp;gt;&lt;br /&gt;
		&amp;lt;source src=&amp;quot;path/#myarray[session.track]#&amp;quot; type=&amp;quot;audio/mpeg&amp;quot;&amp;gt;&lt;br /&gt;
		Your browser does not support the audio element.&lt;br /&gt;
		&amp;lt;/audio&amp;gt;&lt;br /&gt;
	&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
		document.getElementById('myVideo').addEventListener(&amp;quot;ended&amp;quot;,function() {&lt;br /&gt;
		window.location.href=&amp;quot;tunespage.cfm?action=play_next_tune&amp;quot;;&lt;br /&gt;
		});&lt;br /&gt;
	&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Configuring_php.ini&amp;diff=2439</id>
		<title>Configuring php.ini</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Configuring_php.ini&amp;diff=2439"/>
				<updated>2015-03-17T22:00:52Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
==Configuring server-wide php.ini settings==&lt;br /&gt;
If you need to make adjustments to the php.ini file server-wide (affecting all sites on the VPS) then you could do this by logging into cPanel/WHM as root and clicking on the &amp;quot;PHP Configuration Editor&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==Creating a custom php.ini file==&lt;br /&gt;
Do not just create a blank php.ini file and add the settings you need. Doing this will ignore all of the other PHP configuration that was setup by the server such as extensions and modules. Be sure to copy the server's php.ini file and make the customizations in that file by following these steps.&lt;br /&gt;
&lt;br /&gt;
If you need to make changes to php.ini for a specific site only follow these steps:&lt;br /&gt;
# SSH into the server&lt;br /&gt;
# Copy the server's php.ini file to the the site's public_html directory by running this command: &amp;lt;pre&amp;gt;cp /usr/local/lib/php.ini /home/username/public_html/&amp;lt;/pre&amp;gt; *Replace username with the username of the site&lt;br /&gt;
# Edit the php.ini with your favorite text editor. For example: &amp;lt;pre&amp;gt;nano /home/username/public_html/php.ini&amp;lt;/pre&amp;gt; and make the desired changes.&lt;br /&gt;
# Add the following to the /home/username/public_html/.htaccess file (create one if you don't have one): &amp;lt;pre&amp;gt; SetEnv PHPRC /home/username/public_html/php.ini&amp;lt;/pre&amp;gt; *use the real path for your site &lt;br /&gt;
&lt;br /&gt;
==Shared Hosting: Changing PHP settings for a site==&lt;br /&gt;
===cPanel===&lt;br /&gt;
You can change common PHP settings for a site within the ''Select PHP Version'' section of your cPanel account. &lt;br /&gt;
&lt;br /&gt;
#Log into your cPanel account&lt;br /&gt;
#Click the '''Select PHP Version''' icon underneath the ''Software'' heading toward the bottom of the page&lt;br /&gt;
#On the next page, click the '''Switch To PHP Options''' link in the upper-right portion of the page&lt;br /&gt;
#On the PHP Options page, click the value you wish to edit.&lt;br /&gt;
#Enter the new value for the setting you wish to adjust&lt;br /&gt;
#Click the '''Save''' button at the bottom of the page&lt;br /&gt;
===Windows===&lt;br /&gt;
On our Windows-based shared hosting plans, you can enable custom PHP settings within the ''PHP Settings'' icon in your MochaPanel account.&lt;br /&gt;
&lt;br /&gt;
#[https://wcp.hostek.com/ Log into your MochaPanel account]&lt;br /&gt;
#Click the '''PHP Settings''' icon under the ''Website Settings'' heading&lt;br /&gt;
#Click the '''Configuration''' button next to the site/subdomain to receive the new PHP settings&lt;br /&gt;
#Check the box for '''Custom php.ini'''&lt;br /&gt;
#Click the '''Save''' button&lt;br /&gt;
&lt;br /&gt;
This will place a file named '''php.ini''' in your site's web root. You may edit that file to adjust specific PHP settings. If you do not see the new settings take effect immediately, try [[WCP_(Windows_based_Control_Panel)#Recycle_Application_Pool|recycling your site's application pool]].&lt;br /&gt;
[[Category:Linux-VPS]]&lt;br /&gt;
[[Category:Linux]]&lt;br /&gt;
[[Category:Windows]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2416</id>
		<title>ColdFusion Tips &amp; Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2416"/>
				<updated>2015-03-11T23:28:29Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Scheduling Tasks in ColdFusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Converting Application.cfm to Application.cfc==&lt;br /&gt;
Using an '''Application.cfc''' configuration file offers some advantages over the older style '''Application.cfm''' configuration files. Some of the main features that an Application.cfc file give you are &amp;quot;functions triggered by Application, Session, Request, and Error events&amp;quot; and &amp;quot;Application-Level Mappings and Custom Tag Paths&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are only a few steps required to convert an application to use an Application.cfc file:&lt;br /&gt;
&lt;br /&gt;
NOTE: You should ensure that you have a backup of any files before making changes to them.&lt;br /&gt;
&lt;br /&gt;
===Create an '''Application.cfc''' file===&lt;br /&gt;
&lt;br /&gt;
Below is an example '''Application.cfc''' file with the minimum requirements:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Setup '''onRequest''' function in '''Application.cfc''' to include the '''Application.cfm''' file&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if an Application.cfm file already exists in the root of the application. Below is what the Application.cfc file will look like after this addition:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Copy application settings from the '''cfapplication''' tag and remove the '''cfapplication''' tag===&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if a cfapplication tag is used within the application. Each attribute of the cfapplication tag will need to be copied into the cfscript section at the top of the Application.cfc with the pattern [this.attributeName = &amp;quot;value&amp;quot;;].&lt;br /&gt;
&lt;br /&gt;
For example. The below cfapplication tag would be converted into our Application.cfc example as follows:&lt;br /&gt;
&lt;br /&gt;
'''cfapplication''' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication&lt;br /&gt;
	name = &amp;quot;my_app_name&amp;quot;&lt;br /&gt;
	sessionManagement = &amp;quot;Yes&amp;quot;&lt;br /&gt;
	sessionTimeout = &amp;quot;#createTimeSpan(0,0,20,0)#&amp;quot;&lt;br /&gt;
	setClientCookies = &amp;quot;Yes&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Application.cfc''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = &amp;quot;my_app_name&amp;quot;; // app name from old cfapplication tag&lt;br /&gt;
		this.sessionManagement = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
		this.sessionTimeout = CreateTimeSpan(0,0,20,0);&lt;br /&gt;
		this.setClientCookies = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Do not forget to remove the '''cfapplication''' tag after copying the settings into the '''Application.cfc''' file.&lt;br /&gt;
&lt;br /&gt;
Now that the change is complete, this is a good time to test the application to ensure everything is working correctly with the new setup.&lt;br /&gt;
&lt;br /&gt;
==Per-Application ColdFusion Mappings==&lt;br /&gt;
In ColdFusion 8 and above, it is possible to create per-application mappings through your site's Application.cfc file. If you wish to convert to using an Application.cfc file, follow the steps [[ColdFusion_Tips_%26_Tricks#Converting_Application.cfm_to_Application|here]]. &lt;br /&gt;
&lt;br /&gt;
Once you have your Application.cfc created, you will insert the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.mappings[&amp;quot;/test&amp;quot;]=&amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On your site though, you would change &amp;quot;/test&amp;quot; to the name of your mapping. IMPORTANT: You need to include the forward slash before the name of your mapping. Also, change &amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot; to the full physical path to the folder you wish to map. &lt;br /&gt;
'''Note''': The physical path to your FTP root is listed in the &amp;quot;Site Settings&amp;quot; of your control panel at wcp.hostek.com.&lt;br /&gt;
&lt;br /&gt;
To call a template named &amp;quot;testing.cfm&amp;quot; in the &amp;quot;test&amp;quot; directory we just mapped, you would use this line: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;/test/testing.cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-Application Custom Tag Paths==&lt;br /&gt;
Starting in ColdFusion 8, ColdFusion allows creation of Custom Tag Paths in each site's Application.cfc file. This allows you to create and manage your Custom Tag Paths without having to use CF Administrator (ie. submit a support ticket). The following steps will help you create a Custom Tag Path:&lt;br /&gt;
&lt;br /&gt;
If you do not already have an Application.cfc file in your site's Web root, create one now.&lt;br /&gt;
Place the following code in the Application.cfc file and save:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=&amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you'd replace &amp;quot;yourdomain.com&amp;quot; with your domain name, and &amp;quot;customtagfolder&amp;quot; with the name of the folder you created for your custom tags. &lt;br /&gt;
&lt;br /&gt;
Now you have successfully added your custom tag path. If you have multiple tag paths to add, try using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=ListAppend(THIS.customtagpaths, &amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Per-application Robust Exception Information Settings==&lt;br /&gt;
To enable Robust Exception Information on a ColdFusion application, you will need to add the following to the top of the site's ''Application.cfc'' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = true /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Alternatively, if you wish to ensure Robust Exception Information is ''always'' disabled for an application, add this to the site's ''Application.cfc'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = false /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-application JSON Prefix==&lt;br /&gt;
To enable the JSON Prefix for your application add the following to the site's '''Application.cfc''' file, and adjust the '''secureJSONPrefix''' as desired:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = true&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSONPrefix = &amp;quot;//&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can disable this feature using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = false&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Restart a ColdFusion Application==&lt;br /&gt;
If you ever need to restart your site's ColdFusion application (to pick up a setting change, etc), you can do so via the ApplicationStop() function in ColdFusion 9+. &lt;br /&gt;
&lt;br /&gt;
To use this you can create a file (ex: restart.cfm) containing the following code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset ApplicationStop() /&amp;gt;&lt;br /&gt;
&amp;lt;cflocation url=&amp;quot;index.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When you run the file containing that code your ColdFusion Application will be stopped (flushing your application scope), and when the browser is redirected to the index page the application will start again.&lt;br /&gt;
==CFHTTP Connection Failures over HTTPS==&lt;br /&gt;
===Fixing cfhttp Failures on Shared Hosting===&lt;br /&gt;
If you try to use &amp;lt;cfhttp&amp;gt; to connect to a secure site (over HTTPS), you may receive the following error: &amp;quot;Connection Failure: Status code unavailable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this add the following code to your site's &amp;quot;Application.cfm&amp;quot; file (below the 'cfapplication' tag):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- fix for HTTPS connection failures ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif NOT isDefined(&amp;quot;Application.sslfix&amp;quot;)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity = createObject(&amp;quot;java&amp;quot;, &amp;quot;java.security.Security&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity.removeProvider(&amp;quot;JsafeJCE&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset Application.sslfix = true /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If your site uses an &amp;quot;Application.cfc&amp;quot; file instead, then just place that code in the &amp;quot;'onApplicationStart()&amp;quot; method of that file. After making that adjustment you'll need to restart your ColdFusion application as [[ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application|shown here]]. If you still run into issues though, you will need to [https://support.hostek.com/ submit a support ticket] asking our team to install the remote site's SSL certificate into ColdFusion's Java Certificate Store.&lt;br /&gt;
&lt;br /&gt;
===Fixing cfhttp Failures on VPS Hosting===&lt;br /&gt;
If you are having issues connecting to a site or file from with ColdFusion over HTTPS, you can import the remote site's SSL certificate into the the Java SSL Certificate Store used by ColdFusion.&lt;br /&gt;
====Fixing cfhttp Connection Failures with Keytool====&lt;br /&gt;
'''1) Set Java environment'''&amp;lt;br&amp;gt;&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable in the next command. For '''example''', you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
In that case, you would use '''C:\ColdFusion10\jre''' as the value of JAVA_HOME as shown below. Open a command prompt and issue the following commands:&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set JAVA_HOME=C:\ColdFusion10\jre&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set PATH=%PATH%;%JAVA_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, use the following commands (case-sensitive) in your terminal:&lt;br /&gt;
This '''example''' assumes that the JRE is located at ''/opt/coldfusion10/jre''&lt;br /&gt;
    export JAVA_HOME=/opt/coldfusion10/jre&lt;br /&gt;
    export PATH=$PATH:/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
'''2) List the Keystore Contents'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Java installation is at ''C:\ColdFusion10\jre'', then navigate to '''C:\ColdFusion10\jre\bin''':&lt;br /&gt;
    cd C:\ColdFusion10\jre\bin&lt;br /&gt;
If you're using a '''Linux/cPanel''' server, use this command instead:&lt;br /&gt;
    cd /opt/coldfusion10/jre/bin&lt;br /&gt;
&lt;br /&gt;
Now you can list the keystore contents ''(Windows &amp;amp; Linux)'':&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 76 entries&lt;br /&gt;
&lt;br /&gt;
'''3) Import certificate in to keystore and list to check added '''&amp;lt;br&amp;gt;&lt;br /&gt;
''(assumes you've downloaded the certificate to '''c:\temp\inet.cer''' (Windows) or '''/temp/inet.cer''' (Linux/cPanel)''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file c:\temp\inet.cer&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file /temp/inet.cer&lt;br /&gt;
    Trust this certificate? [no]: y&lt;br /&gt;
    Certificate was added to keystore&lt;br /&gt;
&lt;br /&gt;
Now verify the keystore contains your new certificate&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 77 entries&lt;br /&gt;
&lt;br /&gt;
'''4) Restart the ColdFusion application service so the keystore is re-read.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''5) Run your cfhttp request - HTTPS works now!'''&lt;br /&gt;
&lt;br /&gt;
====Fixing cfhttp Connection Failures with Portecle====&lt;br /&gt;
If you'd rather import certificates into the Java SSL Keystore through a GUI, follow these directions to use a tool named Portecle to do so:&lt;br /&gt;
&lt;br /&gt;
#Ensure your JAVA_HOME variable is set correctly as described above.&lt;br /&gt;
#Download Portecle from Sourceforge: [http://sourceforge.net/projects/portecle/ Portecle Project Homepage]&lt;br /&gt;
#Extract the files&lt;br /&gt;
#Open a Command Prompt and navigate to the extracted directory&lt;br /&gt;
#Issue this command to launch Portecle: &amp;lt;pre&amp;gt;java -jar portecle.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#In Notepad, open your jvm.config file to find the JVM PATH for ColdFusion's JVM; look for '''java.home={path here}'''&lt;br /&gt;
#In Portecle click ''File'', ''Open Keystore File''&lt;br /&gt;
#Browse to {JVM PATH}\jre\lib\security to the path, and open the cacerts file; Enter Password: '''changeit'''&lt;br /&gt;
#Click on '''Tools''', '''Import Trusted Certificate''', select the certificate you wish to import.&lt;br /&gt;
#*To obtain the certificate, you can navigate in a browser to the site where the certificate resides, then download the certificate to a CER (X.509 format) file through the browser.&lt;br /&gt;
#Click '''OK''' to import and '''YES''' to accept the certificate as ''trusted''.&lt;br /&gt;
#Click OK again, usually you won't need to change the Alias name;click OK to finish.&lt;br /&gt;
#Click '''File''', '''Save Keystore'''.&lt;br /&gt;
Close Portecle.&lt;br /&gt;
====Fixing CFHTTP Failures Related to Cached DNS Records====&lt;br /&gt;
This solution will prevent Java from caching DNS records for the life of the ColdFusion process. Instead, Java will refresh its records periodically.&lt;br /&gt;
&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable to find the location of the Java installation used by ColdFusion. &lt;br /&gt;
&lt;br /&gt;
For '''example''', on '''Windows''' you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
On '''Linux''' you may see this:&lt;br /&gt;
    java.home=/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
Navigate to the '''security''' folder within the Java installation used by ColdFusion. For '''example''':&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows''' ''(open in Windows Explorer)''&lt;br /&gt;
    C:\ColdFusion10\jre\lib\security\&lt;br /&gt;
'''Linux\cPanel'''&lt;br /&gt;
    cd /opt/coldfusion10/jre/lib/security/&lt;br /&gt;
&lt;br /&gt;
Back-up, then edit the '''java.security''' file within that folder and change the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
'''From'''&lt;br /&gt;
    #networkaddress.cache.ttl=-1&lt;br /&gt;
'''To'''&lt;br /&gt;
    networkaddress.cache.ttl=600&lt;br /&gt;
&lt;br /&gt;
''Note:'' The above value refreshes DNS records every 600 seconds ''(10 minutes)''. You may adjust it to whatever you feel is appropriate for your server.&lt;br /&gt;
&lt;br /&gt;
Now '''Save''' the file then '''Restart ColdFusion''', and the new DNS caching setting will take effect.&lt;br /&gt;
&lt;br /&gt;
==CFMAIL Multi-Part Emails==&lt;br /&gt;
Sending emails with both Text and HTML parts helps reduce the chance of your messages getting caught by a mail server's spam filter. It also helps ensure your recipients can read the message regardless of the mail client being used. The easiest way to do this is to store your message in a variable using &amp;lt;cfsavecontent&amp;gt; then adding it to &amp;lt;cfmail&amp;gt; using &amp;lt;cfmailpart&amp;gt; as shown in the example below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Store your message in a variable ---&amp;gt;&lt;br /&gt;
&amp;lt;cfsavecontent variable=&amp;quot;myemailcontent&amp;quot;&amp;gt;&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
This is some plain text. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;And this is some more text in HTML. It will appear in plain-text for anyone who views the Text part of this email, though.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/cfsavecontent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- Function to strip HTML from message while preserving line breaks ---&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name= &amp;quot;textMessage&amp;quot; access= &amp;quot;public&amp;quot; returntype= &amp;quot;string&amp;quot; hint= &amp;quot;Converts an html email message into a nicely formatted with line breaks plain text message&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfargument name= &amp;quot;string&amp;quot; required= &amp;quot;true&amp;quot; type= &amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfscript&amp;gt;&lt;br /&gt;
      var pattern = &amp;quot; &amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
      var CRLF = chr( 13) &amp;amp; chr( 10);&lt;br /&gt;
      var message = ReplaceNoCase(arguments.string, pattern, CRLF , &amp;quot;ALL&amp;quot;);&lt;br /&gt;
      pattern = &amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;;&lt;br /&gt;
    &amp;lt;/cfscript&amp;gt;&lt;br /&gt;
    &amp;lt;cfreturn REReplaceNoCase(message, pattern, &amp;quot;&amp;quot; , &amp;quot;ALL&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!--- Now send the email. When adding the Text part, we'll use the textMessage() function we just created to strip out HTML tags. ---&amp;gt;&lt;br /&gt;
&amp;lt;cfmail from=&amp;quot;sender@domain.com&amp;quot; to=&amp;quot;recipient@anotherdomain.com&amp;quot; subject=&amp;quot;Multi-part Email with CFMAIL&amp;quot; type=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/plain&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#textmessage(myemailcontent)#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/html&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#myemailcontent#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: [http://cookbooks.adobe.com/post_CFMAIL_the_right_way-17875.html CFMAIL the right way]&lt;br /&gt;
&lt;br /&gt;
==Scheduling Tasks in ColdFusion==&lt;br /&gt;
On occasion shared ColdFusion hosting customers need to setup Scheduled Task to run files on a cycle. &lt;br /&gt;
&lt;br /&gt;
This can be done with the following steps, making use of ColdFusion's &amp;lt;cfschedule&amp;gt; tag:&lt;br /&gt;
&lt;br /&gt;
#Create a file locally using any text editor, save the file with the .CFM extension (example: setschedule_example.cfm).&lt;br /&gt;
#Copy and past in the code example below taken from ''ColdFusion's Documentation'' and save.&lt;br /&gt;
#Replace the data in the example note the following recommendations.&amp;lt;br /&amp;gt;!- Name each file made for creating a schedule with the name of the task so you can reference the task later if needed. Specific naming will also make it more difficult for someone to randomly run the file.&amp;lt;br /&amp;gt;!- If you need to schedule a job to run monthly on any date in the range 28-31, read about how ColdFusion will handle the scheduling in the ColdFuison8 documentation referenced below.&lt;br /&gt;
#Working example, the code example below is a working tested solution for getting the weather for a specific zip code and the task to email the results.&lt;br /&gt;
&lt;br /&gt;
'''Scheduled Task'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- This sets the initial task, if your just wanting to set the schedule --&amp;gt;&lt;br /&gt;
&amp;lt;cfschedule action = &amp;quot;update&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot; &lt;br /&gt;
    operation = &amp;quot;HTTPRequest&amp;quot;&lt;br /&gt;
    url = &amp;quot;http://test.hostek.net/weather_send.cfm&amp;quot;&lt;br /&gt;
    startDate = &amp;quot;7/6/09&amp;quot;&lt;br /&gt;
    startTime = &amp;quot;09:30 AM&amp;quot;&lt;br /&gt;
    interval = &amp;quot;3600&amp;quot;&lt;br /&gt;
    resolveURL = &amp;quot;Yes&amp;quot;&lt;br /&gt;
    requestTimeOut = &amp;quot;600&amp;quot;&lt;br /&gt;
    mode = &amp;quot;application&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task created to be deleted, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;delete&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task to be paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;pause&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task resumed if paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;resume&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Weather Collector'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;CF External Weather Checker&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfset zip=&amp;quot;12345&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;cfinvoke webservice=&amp;quot;http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl&amp;quot; method=&amp;quot;getCityWeatherByZIP&amp;quot; returnvariable=&amp;quot;aWeatherReturn&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cfinvokeargument name=&amp;quot;ZIP&amp;quot; value=&amp;quot;#zip#&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aWeatherReturn.temperature EQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt; I cannot get the weather for #zip# external http connections must be DOWN.&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;cfset message=&amp;quot;The temperature for #zip# (Your city) is #aWeatherReturn.temperature# degrees.&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif message NEQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfmail from = &amp;quot;weather.server@test.com&amp;quot; to = &amp;quot;test@test.com&amp;quot; subject = &amp;quot;Weather checker&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#message#&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note''': We highly recommend setting the ''mode'' attribute of cfschedule to ''application''. This will ensure your site's application is the only one allowed to modify the task. &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''More information on using CFSchedule'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/cfschedule Adobe ColdFusion Documentation - CFSchedule]&lt;br /&gt;
*[http://www.isummation.com/blog/configuring-coldfusion-scheduled-tasks-using-the-cfschedule-tag/ iSummation Blog - Configuring ColdFusion Scheduled Tasks using the CFSCHEDULE tag]&lt;br /&gt;
&lt;br /&gt;
==Session Management - Handling Bots and Spiders==&lt;br /&gt;
===Robots.txt File===&lt;br /&gt;
First and foremost we suggest creating a robots.txt file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time. Second to prevent specific bots from crawling the website. &lt;br /&gt;
&lt;br /&gt;
Please see our [[Robots|robots.txt article]] for more information on implementing a robots.txt on your site.&lt;br /&gt;
&lt;br /&gt;
===Lower Session Timeouts for Bots and Spiders===&lt;br /&gt;
Next we suggest setting your session timeout specifically lower for bots and spiders. These spiders and bots will crawl a page and when a session (ColdFusion) is created, it will persist during then entire page load. The page fully loaded allows the bot or spider to get the information from the Web page AND allows the session to expire quickly protecting ColdFusion from effects similar to a memory leak. &lt;br /&gt;
&lt;br /&gt;
To do this, implement the appropriate solution for your site below:&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfm'''====&lt;br /&gt;
Place this code at the top of your Application.cfm file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then use the '''REQUEST.sessionTimeout''' variable to specify the session timeout period in your '''cfapplication''' tag: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication name=&amp;quot;myawesomeapp&amp;quot;&lt;br /&gt;
     sessionmanagement=&amp;quot;Yes&amp;quot;&lt;br /&gt;
     sessiontimeout=&amp;quot;#REQUEST.sessionTimeout#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (tag-based)====&lt;br /&gt;
If you primarily use cfml tags in your Application.cfc, you can set the Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
 &amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (cfscript)====&lt;br /&gt;
If instead, you're using cfscipt in your Application.cfc, you'll set the custom Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
// This checks if a cookie is created, for bots this will return false and use the low session timeout&lt;br /&gt;
if (StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) || StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)){&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,30,0);&lt;br /&gt;
} else {&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,0,2);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.bennadel.com/blog/1083-ColdFusion-Session-Management-And-Spiders-Bots.htm Session Management code examples for the Application.cfm]&lt;br /&gt;
&lt;br /&gt;
==Creating Client Variables Tables for MySQL Databases==&lt;br /&gt;
If you need your datasource set up as a ColdFusion Client Variables Store, you can enable the '''Client Variables'' option in your ColdFusion datasource within the WCP control panel. &lt;br /&gt;
&lt;br /&gt;
Please note, if your datasource MySQL DSN, you'll need to create the necessary tables prior to using the Client Variable Store. To do this you would need to create two tables, one named &amp;quot;cdata&amp;quot; and one named &amp;quot;cglobal&amp;quot;. The SQL you'd use to create those tables is below:&lt;br /&gt;
&lt;br /&gt;
Table: '''cdata'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
 CREATE TABLE IF NOT EXISTS cdata (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          app varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          PRIMARY KEY (cfid,app)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Table: '''cglobal'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS cglobal (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          lvisit timestamp,&lt;br /&gt;
          KEY cfid (cfid),&lt;br /&gt;
          KEY lvisit (lvisit)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Output CF Error details without CFDump==&lt;br /&gt;
It is common in an error handler that you want to output all of the error details to the screen, a file, or an email. Therefore, the cfdump tag is commonly used for this; and, while this works well in development, it is not always the best practice on a production site because of the performance of the cfdump tag due to its use of reflection (Runtime type introspection).&lt;br /&gt;
&lt;br /&gt;
A better performing alternative is to output the information you want directly from the Error/Exception struct within a 'cfoutput' tag. This can be done by looking up the cferror structure or the cfcatch structure in the ColdFusion docs to see what is available and what values you might want to output:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Error''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cferror&amp;lt;br /&amp;gt;&lt;br /&gt;
'''CFCatch''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cfcatch&lt;br /&gt;
&lt;br /&gt;
===Cfdump Custom Tag Alternative===&lt;br /&gt;
You can also use the following link to download an example CF custom tag that will give a similar error output as when using the cfdump tag on an error variable:&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the custom tag's usage:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the error handler specified in your 'cferror' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cf_OutputError Error=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code would replace:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfdump var=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in a cfcatch block:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cftry&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;cfcatch&amp;gt;&lt;br /&gt;
   &amp;lt;cf_OutputCFCatch CFCatch=&amp;quot;#CFCatch#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/cfcatch&amp;gt;&lt;br /&gt;
&amp;lt;/cftry&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configure ColdFusion to Handle html and htm Files==&lt;br /&gt;
===Enable HTML/HTM as CFML on Shared Accounts===&lt;br /&gt;
On our ColdFusion servers, the best way to process HTML files (.html, .htm) as ColdFusion/CFML (.cfm files) is by using a set of rewrite rules that route the HTML files through a ColdFusion &amp;quot;controller&amp;quot; script. The main benefits of this approach are that it is easy to implement on a site-by-site basis, and it works with any version of ColdFusion. To implement this approach on your site, follow the steps below:&lt;br /&gt;
====Step 1: Add Rewrite Rules to Route HTML Files through the CFM Controller====&lt;br /&gt;
If you have a '.htaccess' file in your webroot, add the rules below to the top of that file. Otherwise, create a file named '.htaccess' in your site's web root and place these rules within it:&lt;br /&gt;
=====For Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.html htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====For Sites Using .HTM Files=====&lt;br /&gt;
'''NOTE:''' If your site uses ''.htm'' files instead of ''.html'' files, use this set of rules instead. The only difference is ''html'' is replaced with ''.htm''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.htm htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 2: Create the ColdFusion Controller Script (htmlcontrol.cfm)====&lt;br /&gt;
Now we just need to create a ColdFusion script that will process the HTML files. To do this, create a file named '''htmlcontrol.cfm''' within your site's web root. Place this CFML code within the file:&lt;br /&gt;
=====CFML for Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.html&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====CFML for Sites Using .HTM Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.htm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you save the controller script, your site will begin processing any ColdFusion/CFML code within your HTML files.&lt;br /&gt;
===Enable HTML/HTM as CFML on a VPS===&lt;br /&gt;
In case you need to process ColdFusion code in your .htm or .html files, here is what you will need to do to get this to work. This is based on using ColdFusion on one of our dedicated server hosting accounts on a Windows server.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This will affect every site on the server, so use cautiously.&lt;br /&gt;
&lt;br /&gt;
First, you will need to edit the web.xml file located generally at C:\ColdFusion10\cfusion\wwwroot\WEB-INF&lt;br /&gt;
&lt;br /&gt;
Open this file and look for '''coldfusion_mapping_1'''.&lt;br /&gt;
&lt;br /&gt;
Scroll down the file until you see the last number increment like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;servlet-mapping id=&amp;quot;macromedia_mapping_15&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then add the following right below the closing &amp;lt;/servlet-mapping&amp;gt; of the last number increment item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_16&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_17&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_18&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_19&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save this file and exit.&lt;br /&gt;
&lt;br /&gt;
Now in IIS, setup a mapping for the site:&lt;br /&gt;
#In IIS 7+ click the server name section (right below the '''Start Page''' in the left-hand navigation), then double-click the '''Handler Mappings''' icon.&lt;br /&gt;
#Select and &amp;quot;edit&amp;quot; the '''*.cfm''' record and copy the value of &amp;quot;executable&amp;quot;. Now hit Cancel and then click '''Add Script Map'''. &lt;br /&gt;
#Paste the executable value copied from the '''*.cfm''' record and type '''*.htm''' into the '''Request Path''' and hit OK. &lt;br /&gt;
#Repeat the above steps to add a handler for '''*.html''' &lt;br /&gt;
&lt;br /&gt;
Lastly, open the '''uriworkermap.properties''' file for your ColdFusion 10 IIS Connector in a text editor such as Notepad. On a standard ColdFusion installation this is located at: &amp;lt;pre&amp;gt;C:\ColdFusion10\config\wsconfig\1\uriworkermap.properties&amp;lt;/pre&amp;gt;&lt;br /&gt;
Copy the following lines, paste them at the bottom of the file, then save and close the file: &amp;lt;pre&amp;gt;/*.html = cfusion&lt;br /&gt;
/*.htm = cfusion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the ColdFusion service and IIS. ColdFusion should begin processing CFML within htm/html files now.&lt;br /&gt;
&lt;br /&gt;
==Increase the ColdFusion Post Parameters Limit==&lt;br /&gt;
===ColdFusion 10===&lt;br /&gt;
In ColdFusion 10, you can easily increase the value of ColdFusion's '''postParametersLimit''' via the ColdFusion Administrator. Once logged into the ColdFusion Administrator, click the '''Settings''' link then scroll to the bottom of the page. Set the value for the Post Parameters Limit to the desired limit and click the submit button. &lt;br /&gt;
===ColdFusion 9 and below===&lt;br /&gt;
To adjust the Post Parameters Limit setting in ColdFusion 9 and below, you will have to edit the server's '''neo-runtime.xml''' file which is located here on a standard installation: &amp;lt;pre&amp;gt;C:\ColdFusion9\lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open that file in a text editor such as Notepad, then search for the '''postSizeLimit''' tag. It will look similar to this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postSizeLimit'&amp;gt;&amp;lt;number&amp;gt;100.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediately after that set of tags, paste this chunk of text: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postParametersLimit'&amp;gt;&amp;lt;number&amp;gt;1000.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once you've adjusted the file, you'll just need to save your changes and restart ColdFusion for the new setting to go into effect. '''Note''': The value of '''1000''' is just an example, so you can increase it as needed. &lt;br /&gt;
&lt;br /&gt;
==Loading custom Java library or Java Libraries (jar or class files) in ColdFusion 10==&lt;br /&gt;
ColdFusion 10 makes it easy to load Java libraries into your ColdFusion application without having to restart ColdFusion. All that's required is your application define the 'THIS.javaSettings' attribute within the site's Application.cfc like below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.javaSettings = {LoadPaths = [&amp;quot;/javafiles/&amp;quot;], loadColdFusionClassPath = true, reloadOnChange=false}/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will check the ''javafiles'' directory in your Web root for 'jar' and 'class' files and make any libraries within the directory accessible from your ColdFusion application. If you modify the JAR files in your ''javafiles'' directory though, ColdFusion will need to be restarted to load the new versions of the JAR files. &lt;br /&gt;
&lt;br /&gt;
'''References''': &lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/Enhanced+Java+integration+in+ColdFusion+10 Adobe ColdFusion Documentation - Enhanced Java Integration in ColdFusion]&lt;br /&gt;
*[http://www.raymondcamden.com/2014/6/16/Issue-with-ColdFusion-JavaSettings-and-ReloadOnChange Ray Camden's Blog - Issue with ColdFusion JavaSettings and ReloadOnChange]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Permission denied for creating Java object: coldfusion.server.ServiceFactory''==&lt;br /&gt;
===When using Mura or using Transfer ORM===&lt;br /&gt;
====Issue====&lt;br /&gt;
If you are using '''Mura''' or using '''Transfer ORM''' and you get this error, ''Permission denied for creating Java object: coldfusion.server.ServiceFactory'', you are likely using an outdated version of Mura and also are probably on a ColdFusion 9 server. The Transfer ORM component causing this issue has not been updated to work with ColdFusion 9. There is a quick fix though:&lt;br /&gt;
====Solution====&lt;br /&gt;
Find the file named CFMLVersion.cfc which should be at '''/wwwroot/requirements/transfer/com/factory'''.&lt;br /&gt;
&lt;br /&gt;
Edit that file and find the line that has:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And change that to:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;) OR server.coldfusion.productversion.startsWith(&amp;quot;9&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save the file and it should now work.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Since this is likely running an outdated version of Mura, we highly recommend updating Mura to the latest version to take advantage of numerous performance and security enhancements.&lt;br /&gt;
===When using DataMgr===&lt;br /&gt;
If you get this error while using DataMgr.cfc, the changes described below will solve this problem:&lt;br /&gt;
&lt;br /&gt;
Here is the section of code from the original DataMgr.cfc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection = getConnection()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset db = connection.getMetaData().getDatabaseProductName()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection.close()&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = db2&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is what the modified code should look like (this sample assume MySQL)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of changes''':&lt;br /&gt;
&lt;br /&gt;
These 3 lines were commented out:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line needed quotes around db2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And lastly, this line needed added:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you are using an ''MS Access'' database instead of ''MySQL'', replace '''MYSQL''' with '''msaccessjet''' on the line that is added.&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Security: The requested template has been denied access to {file/directory}''==&lt;br /&gt;
===Issue===&lt;br /&gt;
Our shared servers have ColdFusion Sandbox Security enabled, which requires absolute filesystem paths to be provided to tags and functions that interact with the filesystem. If you receive an error that starts with ''Security: The requested template has been denied access to ...'', then it is followed by a relative path, you'll need to replace the relative path with a full path.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
One way to do this is to hard-code the path (''d:\home\sitename.com\wwwroot\filename.jpg''), but that can cause portability problems if your site is ever moved to a different environment. &lt;br /&gt;
&lt;br /&gt;
A better way to do this would be to &amp;quot;wrap&amp;quot; your relative path with the '''ExpandPath()''' function. The ''ExpandPath()'' function will automatically detect the absolute filesystem path to the file, and ColdFusion will no longer give you a permissions error. &lt;br /&gt;
&lt;br /&gt;
'''More info''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/ExpandPath Adobe Documentation - ExpandPath]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion COM Object Error ''java.lang.RuntimeException: Can not use native code: Initialisation failed''==&lt;br /&gt;
The error ''java.lang.RuntimeException: Can not use native code: Initialisation failed'' is related to calling a 32-bit COM object from within a 64-bit ColdFusion installation. &lt;br /&gt;
&lt;br /&gt;
The simplest way to bypass this error is to write a small ASP Webservice to proxy the call to the COM object as shown in '''Option 2''' of this blog post: [http://coldfusion9.blogspot.com/2010/05/32-bit-components-on-64-bit-coldfusion.html 32-bit Components on 64-bit ColdFusion]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can [https://support.hostek.com/ ask Support] to move your site to a 32-bit ColdFusion server.&lt;br /&gt;
&lt;br /&gt;
==Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated Server==&lt;br /&gt;
To use Seefusion, visit the address mentioned in your server's Welcome email.&lt;br /&gt;
&lt;br /&gt;
Once loaded, you'll see a summary of memory consumption, average response time, number of requests processed by ColdFusion per second, and a view of currently running ColdFusion requests. &lt;br /&gt;
===Finding Scripts to Optimize===&lt;br /&gt;
When using Seefusion it is helpful to look at the '''Slow''' section of the request monitor. This will show you recent requests that took longer than 8 seconds to complete, giving you a good idea of what scripts need optimization. &lt;br /&gt;
===Stack Tracing with Seefusion===&lt;br /&gt;
Additionally, when a request is running in the '''Active''' section of Seefusion's request monitor, you can click the paper stack icon to the left of the request to view a stack trace of the request. A stack trace tells you what line of code is currently being processed by the request. &lt;br /&gt;
&lt;br /&gt;
Once the stack trace loads, start at the top and work your way down until you find a recognizable path to a ColdFusion template (''eg. c:\home\mysite.com\wwwroot\index.cfm: 47''). This tells you the template currently being executed followed by the line number being processed at that moment in time. If a request consistently shows the same line of code in subsequent stack traces, then you've found the main area to focus on optimizing.&lt;br /&gt;
&lt;br /&gt;
To make deciphering stack traces easier, you can also click the '''Seestack''' button at the top of the stack trace window. This will send the stack trace to a service that will analyze the trace and attempt to tell you where you need to focus.&lt;br /&gt;
&lt;br /&gt;
===Viewing Metrics over Time===&lt;br /&gt;
If you want to watch how response times and memory utilization in a more granular manner than the dashboard graphs show, you'll want to click the '''Counters''' button at the top of SeeFusion. Once on the Counters page you can select a time interval, then have Seefusion display performance metrics at the interval you selected. This is helpful to ensure requests are completing quickly and not exhausting ColdFusion's memory.&lt;br /&gt;
&lt;br /&gt;
==How to Wrap Your ColdFusion DSN with Seefusion==&lt;br /&gt;
If you wish to have Seefusion monitor your server's query activity, you'll need to &amp;quot;wrap&amp;quot; your DSN with SeeFusion's JDBC driver so Seefusion can monitor the DSN's activity. &lt;br /&gt;
===Install SeeDSN===&lt;br /&gt;
SeeDSN is a plugin for ColdFusion Administrator that makes it easy to wrap a DSN with Seefusion. Follow these directions to install SeeDSN:&lt;br /&gt;
#Download the SeeDSN archive [http://www.seefusion.com/seedsn_v1.1.zip here].&lt;br /&gt;
#Extract the '''seedsn''' folder within the archive to your '''/CFIDE/Administrator/''' folder. This means it will be located at ''/CFIDE/Administrator/seedsn'' once extracted. &lt;br /&gt;
#Move ''/CFIDE/Administrator/seedsn/custommenu.xml'' to ''/CFIDE/Administrator/custommenu.xml''&lt;br /&gt;
===Add Seefusion.jar to the ColdFusion Classpath===&lt;br /&gt;
In order for ColdFusion to use Seefusion's JDBC driver, you'll need to ensure '''seefusion.jar''' is on your ColdFusion class path. Follow these directions to add seefusion.jar to the Coldfusion class path:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Click the '''Java and JVM''' link on the left, under Server Settings.&lt;br /&gt;
#In the box labeled '''ColdFusion Class Path''' add the path to your '''seefusion.jar''' file and click ''Submit Changes''. For example, if it is located in ColdFusion's &amp;quot;WEB-INF\lib&amp;quot; folder, you can add this to the Class Path: '''{application.home}/wwwroot/WEB-INF/lib/seefusion.jar'''. &lt;br /&gt;
#*Each path in the ColdFusion Class Path is separated by a comma, so be sure to add a comma right before the path to seefusion.jar (do not add any spaces).&lt;br /&gt;
#Restart ColdFusion after modifying the class path&lt;br /&gt;
&lt;br /&gt;
===Wrap a DSN using SeeDSN===&lt;br /&gt;
Once you've installed SeeDSN and restarted ColdFusion, you can wrap a DSN with the SeeFusion JDBC driver. Follow these instructions to do so: &lt;br /&gt;
#Log into ColdFusion Administrator&lt;br /&gt;
#Expand the ''SeeFusion'' navigation menu on the left and click '''Datasource Wrapper'''&lt;br /&gt;
#On the ''Datasource Wrapper'' page, you'll see a list of DSNs on your server. To wrap a DSN, click the ''Start'' [[File:Start.png]] icon next to your DSN. SeeDSN will automatically wrap your DSN with the SeeFusion driver and display '''OK''' if it is successful.&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/ WebApper Blog - Using SeeDSN JDBC Wrapping Tool]&lt;br /&gt;
&lt;br /&gt;
==Using fckEditor on ColdFusion 10 or Higher==&lt;br /&gt;
When getting the following error for fckEditor:&lt;br /&gt;
 '''&amp;quot;The server didn't reply with a proper XML data. Please check your configuration.&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
If you are on a ColdFusion 10+ server this will be cause by the '''FileUpload()''' function that is being used.&lt;br /&gt;
In ColdFusion 10+ ''FileUpload'' is a built-in function name, so you'll need to rename the ''FileUpload'' function used in fckeditor.&lt;br /&gt;
You can update the text for fckeditor by changing all instances of &amp;quot;FileUpload&amp;quot; to &amp;quot;fckFileUpload&amp;quot; to remove this conflict.&lt;br /&gt;
&lt;br /&gt;
==Optimze CFIMAGE Rendering in Three Steps==&lt;br /&gt;
===USE===&lt;br /&gt;
When full size images are required, re-sized images need to be used for displaying smaller images or thumbnails and the application needs to perform at optimal speed for displaying images in a browser. &lt;br /&gt;
&lt;br /&gt;
===KEY POINTS===&lt;br /&gt;
Except for during development cfimage '''action=&amp;quot;writeToBrowser&amp;quot;''' should not be used to display images.&lt;br /&gt;
Use CFIMAGE to resize images ''ONCE'', if possible during upload but if page timeouts make this impossible break up the task by using a CFC to check and re-size images as needed.&lt;br /&gt;
&lt;br /&gt;
===SUMMARY===&lt;br /&gt;
Those sites that display many images often times also upload many photos via form or via FTP and need to display both the FULL size images and smaller images for thumb nails or ''(small, med, large)'' optional sizes. The process of uploading images using CFFile can impose time constraints specifically for large files, or if the coldfusion page timeouts are set lower than is possible for large file upload and re-size jobs. To overcome this issue we can write a simple CFC for resizing the images after the upload is complete and the page is run for the first time. This will be ideal for either form based upload or FTP upload making this solution very versatile. &lt;br /&gt;
&lt;br /&gt;
====Step 1 - Create the CFC for re-sizing and writing images to disk====&lt;br /&gt;
&lt;br /&gt;
Create file &amp;quot;GetResizedImage.cfc&amp;quot; in the directory with the CFM files that display images.&lt;br /&gt;
Use the code below for the contents of this file and modify as needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;GetImage&amp;quot; hint=&amp;quot;Re-sizes images for display in album&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the image path where photos exist ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset imgpath = &amp;quot;imgdir/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the domain path, allows reuse resized images on other sites ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset domain = &amp;quot;domain.com&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Re-writes image extension if for alternates of JPG, and adds _resized to differentiate from fullsize images ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset rfile= &amp;quot;#REReplace(&amp;quot;#img#&amp;quot;,&amp;quot;.(jpg|JPG|JPEG|jpeg)&amp;quot;,&amp;quot;_resized.jpg&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Checks if file is already resized ---&amp;gt;&lt;br /&gt;
        &amp;lt;cfif FileExists(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp;&amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#rfile#&amp;quot;)&amp;gt;&lt;br /&gt;
           &amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;!--- Resizes image if it has not been done already ---&amp;gt;&lt;br /&gt;
            &amp;lt;cfset myImage=ImageNew(URLDecode(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp; &amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#img#&amp;quot;))&amp;gt;&lt;br /&gt;
                    &amp;lt;cfset ImageResize(myImage,&amp;quot;175&amp;quot;,&amp;quot;175&amp;quot;,&amp;quot;bilinear&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;!--- Saves image, and to eliminate problems with url friendly encoding when getting our images re-replace %20 with no-space ---&amp;gt;&lt;br /&gt;
                    &amp;lt;cfimage source=&amp;quot;#myImage#&amp;quot; action=&amp;quot;write&amp;quot; overwrite=true destination=&amp;quot;d:\home\#domain#\wwwroot\#imgpath##REReplace(&amp;quot;#rfile#&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot; &amp;quot;,&amp;quot;ALL&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the new path for the image for browser output ---&amp;gt;&lt;br /&gt;
			&amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;!--- Return the image variable ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfreturn myImage&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2 - Invoke the CFC====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Generate image name from query ---&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput query=&amp;quot;MyEvent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Invoke CFC to check if resized image exists, if not resize and output URL for resized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvoke component=&amp;quot;GetResizedImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare what part of the CFC handles checking / getting the image ---&amp;gt;&lt;br /&gt;
	method=&amp;quot;GetImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare variable that will pass back the new image name ---&amp;gt;&lt;br /&gt;
	returnvariable=&amp;quot;myImage&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvokeargument name=&amp;quot;img&amp;quot; value=&amp;quot;#event.Pic#&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&amp;lt;!--- Display re-sized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;img src=&amp;quot;#myImage#&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;     &lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 3 - Test====&lt;br /&gt;
The proposed solution cut page load times from 20+ seconds to below one second after the first page load. During the FIRST or FIRST FEW times the page loads all the re-sizing will be done.&lt;br /&gt;
&lt;br /&gt;
===Q and A===&lt;br /&gt;
'''Question''': Checking if a file exists each time the page loads is excessive.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Answer''': We agree but it's much better than resizing every image each time the page loads.&lt;br /&gt;
&lt;br /&gt;
==How to create Services for Additional ColdFusion Instances==&lt;br /&gt;
If you've created additional ColdFusion instances on your VPS/Dedicated Server, and ColdFusion was unable to create the Services for those instances just do the following:&lt;br /&gt;
&lt;br /&gt;
#Open a Command Prompt as Administrator&lt;br /&gt;
#Run this command, replacing INSTANCE with the actual name of your new ColdFusion instance: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;sc create &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; binPath= &amp;quot;C:\ColdFusion10\INSTANCE\bin\coldfusionsvc.exe&amp;quot; displayname= &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; start= auto&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start your instance through the Windows Services Manager. If you need to know how to create additional ColdFusion instances, please see this guide from Adobe: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSAB4367BA-6D91-4c69-8DBA-E2839394658A.html Defining Additional ColdFusion Instances]&lt;br /&gt;
&lt;br /&gt;
Once you've created the instances, you can attach them to your Web server as described here: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363a5d-7ffc.html Web Server Configuration]&lt;br /&gt;
&lt;br /&gt;
If you're using IIS, this video has a great walkthrough for using the ColdFusion Web Server Connector tool: [http://blogs.coldfusion.com/post.cfm/video-learn-about-iis-connectors-in-coldfusion10 Learn About ColdFusion IIS Connectors]&lt;br /&gt;
&lt;br /&gt;
==How to Fix Error: Value '0000-00-00' can not be represented as java.sql.Date==&lt;br /&gt;
If your application has null values in a MySQL datetime/date column you may encounter the error &amp;quot;Value '0000-00-00' can not be represented as java.sql.Date&amp;quot;. The easiest way to fix this is by adding the parameter '''zeroDateTimeBehavior=convertToNull''' to your site's DSN [http://helpx.adobe.com/coldfusion/kb/mysql-error-java-sql-sqlexception.html as recommended by Adobe].&lt;br /&gt;
===How to Fix Null DateTime Error - '''Shared Hosting'''===&lt;br /&gt;
#Log into your site's WCP control panel&lt;br /&gt;
#Click the ''DataSources (DSNs)'' button&lt;br /&gt;
#Click the ''Edit'' icon next to your DataSource (DSN)&lt;br /&gt;
#Add the following to the '''JDBC Query Parameters''' field: &amp;lt;pre&amp;gt;zeroDateTimeBehavior=convertToNull&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' To add multiple JDBC Query Parameters, separate each name/value pair by an ''''&amp;amp;''''. &lt;br /&gt;
''Example: zeroDateTimeBehavior=convertToNull&amp;amp;characterEncoding=UTF-8''&lt;br /&gt;
===How to Fix Null DateTime Error - '''VPS Hosting'''===&lt;br /&gt;
If your site uses WCP to manage its DSNs, you may utilize the Shared Hosting solution. Otherwise, follow the steps below:&lt;br /&gt;
#Log into ColdFusion Administrator on your VPS/Dedicated Server. &lt;br /&gt;
#Navigate to the &amp;quot;Data Sources&amp;quot; page and click your site's DSN name.&lt;br /&gt;
#On the page that opens add '''?zeroDateTimeBehavior=convertToNull''' to the end of the JDBC URL field.&lt;br /&gt;
#Click '''Submit''' and your site should no longer display the date representation error.&lt;br /&gt;
&lt;br /&gt;
==Find the Java Version Used by ColdFusion or Railo==&lt;br /&gt;
This CFML code will report the version of Java used by your ColdFusion or Railo server:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;#CreateObject(&amp;quot;java&amp;quot;, &amp;quot;java.lang.System&amp;quot;).getProperty(&amp;quot;java.version&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference:''' [http://www.petefreitag.com/item/743.cfm Pete Freitag's Blog - What Version of Java is ColdFusion Using?]&lt;br /&gt;
&lt;br /&gt;
==Reset ColdFusion Admin Password on CF 10+ VPS==&lt;br /&gt;
===Reset CF Admin Password - Windows VPS===&lt;br /&gt;
*On your VPS, open a command prompt window as Administrator&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.bat'' script: &amp;lt;pre&amp;gt;.\passwordreset.bat&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===Reset CF Admin Password - cPanel/Linux VPS===&lt;br /&gt;
*SSH into your VPS&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd /opt/ColdFusion10/cfusion/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.sh'' script: &amp;lt;pre&amp;gt;./passwordreset.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===HTML5 Audio Player with Coldfusion===&lt;br /&gt;
This player uses an list named ''Tunes'' within the ''session'' scope to store a list of mp3 names. After populating the list, you can use this code as the foundation for an HTML audio player that plays each song in the list.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfif action is &amp;quot;play_next_tune&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfset myArray=ListtoArray(session.Tunes)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset T_max=Arraylen(myArray)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset session.track=session.track+1&amp;gt;&lt;br /&gt;
	&amp;lt;cfif session.track GT T_max&amp;gt;&lt;br /&gt;
		 &amp;lt;cfset session.track=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
		 &amp;lt;cflocation url=&amp;quot;tunespage.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
		&amp;lt;audio controls id=&amp;quot;myVideo&amp;quot; autoplay&amp;gt;&lt;br /&gt;
		&amp;lt;source src=&amp;quot;path/#myarray[session.track]#&amp;quot; type=&amp;quot;audio/mpeg&amp;quot;&amp;gt;&lt;br /&gt;
		Your browser does not support the audio element.&lt;br /&gt;
		&amp;lt;/audio&amp;gt;&lt;br /&gt;
	&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
		document.getElementById('myVideo').addEventListener(&amp;quot;ended&amp;quot;,function() {&lt;br /&gt;
		window.location.href=&amp;quot;tunespage.cfm?action=play_next_tune&amp;quot;;&lt;br /&gt;
		});&lt;br /&gt;
	&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2400</id>
		<title>Lucee</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2400"/>
				<updated>2015-02-24T21:41:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* How do I access my Lucee Web Administator page? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
[[File:Luceelogo.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://lucee.org/ Lucee] is an open-source CFML engine and the successor of Railo. We proudly support Lucee in our environment, and more info about its background and usage is below.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The Lucee project was forked from Railo 4.2 in January 2015 and is owned by Lucee Association Switzerland. Though development on Railo has halted, Lucee will eventually inherit the enhancements planned for Railo 5. Currently Lucee operates the same as the latest available version of Railo, so you can migrate your Railo codebase to it without any surprises. &lt;br /&gt;
&lt;br /&gt;
See these blogs for more info on the switch from Railo to Lucee:&lt;br /&gt;
*[http://blog.adamcameron.me/2015/01/lucee.html Lucee - Adam Cameron's Dev Blog]&lt;br /&gt;
*[http://www.codersrevolution.com/blog/railo-and-lucee-hunka-hunka-burning-questions Railo and Lucee ... - Coder's Revolution]&lt;br /&gt;
&lt;br /&gt;
==Usage / Resources==&lt;br /&gt;
For information about Lucee please reference [https://bitbucket.org/lucee/lucee/wiki/ the Lucee wiki]. Specifically, the [https://bitbucket.org/lucee/lucee/wiki/Cookbook Lucee Cookbook] has lots of good info about getting started. &lt;br /&gt;
&lt;br /&gt;
If you're new to CFML in general, the following resources will help you get learn the basics:&lt;br /&gt;
*[http://www.trycf.com/tutorials TryCF.com Tutorials]&lt;br /&gt;
*[http://bittersweetryan.github.io/ColdFusion-Koans/ ColdFusion Koans]&lt;br /&gt;
*[https://github.com/cfjedimaster/ColdFusion-UI-the-Right-Way ColdFusion UI the Right Way]&lt;br /&gt;
*[https://github.com/daccfml/cfscript/blob/master/cfscript.md CFScript Documentation]&lt;br /&gt;
&lt;br /&gt;
==How do I access my Lucee Web Administator page?==&lt;br /&gt;
The preferred way to access your site's Lucee Web Administrator is by clicking the '''''Web Administrator''''' link within your control panel. Alternatively, you may access it by appending '''''/lucee/admin/web.cfm''''' to the end of your site's domain name or testing URL.&lt;br /&gt;
===I'm redirected to another page on my site when accessing the Lucee Web Administrator===&lt;br /&gt;
If your site uses rewrite rules to make your site's links search-engine-friendly, then you'll need to make a small adjustment to your rewrite rules. Add the following line to your site's ''.htacess'' file to allow your Lucee Web Administrator to load properly:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
 &lt;br /&gt;
RewriteCond %{REQUEST_URI} !^.*/(lucee)($|/.*$) [NC]&lt;br /&gt;
RewriteRule ^(.*)$ - [NC,L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That code will tell the rewrite engine to ignore requests that contain the word ''lucee''. If your site already has a similar ''RewriteCond'' in its .htacess file ''(common with CF Wheels or ColdBox)'', then just add ''lucee'' to the list of URIs to bypass.&lt;br /&gt;
&lt;br /&gt;
==How do I create a datasource within Lucee?==&lt;br /&gt;
You may create Lucee datasources (DSNs) either withing your site's Lucee Web Administrator or within the site's Application.cfc. More info on creating Lucee datasources is in this Lucee Cookbook entry: [https://bitbucket.org/lucee/lucee/wiki/Cookbook_Datasource_Define_Datasource How to define a Datasource]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Cfwheels&amp;diff=2384</id>
		<title>Cfwheels</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Cfwheels&amp;diff=2384"/>
				<updated>2015-02-11T18:12:39Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Installing CFWheels on ColdFusion / Railo */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
==Installing CFWheels on ColdFusion / Railo==&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Download the latest version from http://cfwheels.org/download&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Unzip the contents to a folder on your computer&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Remove''' the ''web.config'' and ''IsapiRewrite4.ini'' files.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit the '''.htaccess''' with any plain text editor ''(I.E. notepad, wordpad, etc.)'' and replace the contents with the following:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
&lt;br /&gt;
RewriteCond %{REQUEST_URI} !^.*/(flex2gateway|jrunscripts|cfide|cfformgateway|CFFileServlet|jakarta|railo-context|lucee|files|images|javascripts|miscellaneous|stylesheets|robots.txt|sitemap.xml|rewrite.cfm)($|/.*$) [NC]&lt;br /&gt;
RewriteRule ^(.*)$ /rewrite.cfm/$1 [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Setup a MySQL database and create a ColdFusion / Railo DSN for the database. Below are some tutorials on how to do this through your control panel:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[WCP#MySQL_database|How to create a MySQL Database]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[WCP#Create_a_MySQL_or_MS_SQL_Server_DSN|How to create a ColdFusion DSN]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[WCP#Create_a_Railo_Datasource_.28DSN.29|How to create a Railo DSN]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Edit the '''config/settings.cfm''' file in a plain text editor and enter your datasource name and your database username and password. Also, remove the comments around that section:&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''Example:''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset set(dataSourceName=&amp;quot;MyDSNName&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;cfset set(dataSourceUserName=&amp;quot;MyDatabaseUsername&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;cfset set(dataSourcePassword=&amp;quot;MyDatabasePassword&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Upload the files to your site. ''They must be inside the '''/wwwroot''' (Windows) or '''/public_html''' (cPanel/Linux) folder for URL rewriting to work properly.''&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
Browse to your site, and you should see the default CFWheels home page.&lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;br /&gt;
[[Category:Railo-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2383</id>
		<title>Lucee</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2383"/>
				<updated>2015-02-10T17:56:09Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* How do I create a datasource within Lucee? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
[[File:Luceelogo.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://lucee.org/ Lucee] is an open-source CFML engine and the successor of Railo. We proudly support Lucee in our environment, and more info about its background and usage is below.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The Lucee project was forked from Railo 4.2 in January 2015 and is owned by Lucee Association Switzerland. Though development on Railo has halted, Lucee will eventually inherit the enhancements planned for Railo 5. Currently Lucee operates the same as the latest available version of Railo, so you can migrate your Railo codebase to it without any surprises. &lt;br /&gt;
&lt;br /&gt;
See these blogs for more info on the switch from Railo to Lucee:&lt;br /&gt;
*[http://blog.adamcameron.me/2015/01/lucee.html Lucee - Adam Cameron's Dev Blog]&lt;br /&gt;
*[http://www.codersrevolution.com/blog/railo-and-lucee-hunka-hunka-burning-questions Railo and Lucee ... - Coder's Revolution]&lt;br /&gt;
&lt;br /&gt;
==Usage / Resources==&lt;br /&gt;
For information about Lucee please reference [https://bitbucket.org/lucee/lucee/wiki/ the Lucee wiki]. Specifically, the [https://bitbucket.org/lucee/lucee/wiki/Cookbook Lucee Cookbook] has lots of good info about getting started. &lt;br /&gt;
&lt;br /&gt;
If you're new to CFML in general, the following resources will help you get learn the basics:&lt;br /&gt;
*[http://www.trycf.com/tutorials TryCF.com Tutorials]&lt;br /&gt;
*[http://bittersweetryan.github.io/ColdFusion-Koans/ ColdFusion Koans]&lt;br /&gt;
*[https://github.com/cfjedimaster/ColdFusion-UI-the-Right-Way ColdFusion UI the Right Way]&lt;br /&gt;
*[https://github.com/daccfml/cfscript/blob/master/cfscript.md CFScript Documentation]&lt;br /&gt;
&lt;br /&gt;
==How do I access my Lucee Web Administator page?==&lt;br /&gt;
The preferred way to access your site's Lucee Web Administrator is by clicking the '''''Web Administrator''''' link within your control panel. Alternatively, you may access it by appending '''''/lucee/admin/web.cfm''''' to the end of your site's domain name or testing URL.&lt;br /&gt;
&lt;br /&gt;
==How do I create a datasource within Lucee?==&lt;br /&gt;
You may create Lucee datasources (DSNs) either withing your site's Lucee Web Administrator or within the site's Application.cfc. More info on creating Lucee datasources is in this Lucee Cookbook entry: [https://bitbucket.org/lucee/lucee/wiki/Cookbook_Datasource_Define_Datasource How to define a Datasource]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2382</id>
		<title>Lucee</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2382"/>
				<updated>2015-02-10T17:54:13Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
[[File:Luceelogo.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://lucee.org/ Lucee] is an open-source CFML engine and the successor of Railo. We proudly support Lucee in our environment, and more info about its background and usage is below.&lt;br /&gt;
&lt;br /&gt;
==Background==&lt;br /&gt;
The Lucee project was forked from Railo 4.2 in January 2015 and is owned by Lucee Association Switzerland. Though development on Railo has halted, Lucee will eventually inherit the enhancements planned for Railo 5. Currently Lucee operates the same as the latest available version of Railo, so you can migrate your Railo codebase to it without any surprises. &lt;br /&gt;
&lt;br /&gt;
See these blogs for more info on the switch from Railo to Lucee:&lt;br /&gt;
*[http://blog.adamcameron.me/2015/01/lucee.html Lucee - Adam Cameron's Dev Blog]&lt;br /&gt;
*[http://www.codersrevolution.com/blog/railo-and-lucee-hunka-hunka-burning-questions Railo and Lucee ... - Coder's Revolution]&lt;br /&gt;
&lt;br /&gt;
==Usage / Resources==&lt;br /&gt;
For information about Lucee please reference [https://bitbucket.org/lucee/lucee/wiki/ the Lucee wiki]. Specifically, the [https://bitbucket.org/lucee/lucee/wiki/Cookbook Lucee Cookbook] has lots of good info about getting started. &lt;br /&gt;
&lt;br /&gt;
If you're new to CFML in general, the following resources will help you get learn the basics:&lt;br /&gt;
*[http://www.trycf.com/tutorials TryCF.com Tutorials]&lt;br /&gt;
*[http://bittersweetryan.github.io/ColdFusion-Koans/ ColdFusion Koans]&lt;br /&gt;
*[https://github.com/cfjedimaster/ColdFusion-UI-the-Right-Way ColdFusion UI the Right Way]&lt;br /&gt;
*[https://github.com/daccfml/cfscript/blob/master/cfscript.md CFScript Documentation]&lt;br /&gt;
&lt;br /&gt;
==How do I access my Lucee Web Administator page?==&lt;br /&gt;
The preferred way to access your site's Lucee Web Administrator is by clicking the '''''Web Administrator''''' link within your control panel. Alternatively, you may access it by appending '''''/lucee/admin/web.cfm''''' to the end of your site's domain name or testing URL.&lt;br /&gt;
&lt;br /&gt;
==How do I create a datasource within Lucee?==&lt;br /&gt;
You may create Lucee datasources (DSNs) either withing your site's Lucee Web Administrator or within the site's Application.cfc. More info on this is in this Lucee Cookbook entry: [https://bitbucket.org/lucee/lucee/wiki/Cookbook_Datasource_Define_Datasource How to define a Datasource]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Luceelogo.png&amp;diff=2381</id>
		<title>File:Luceelogo.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Luceelogo.png&amp;diff=2381"/>
				<updated>2015-02-10T17:50:09Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2377</id>
		<title>Lucee</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2377"/>
				<updated>2015-02-03T20:14:08Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Coming Soon */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Coming Soon===&lt;br /&gt;
&lt;br /&gt;
We are preparing to support [http://lucee.org/ Lucee] in place of Railo, and our team is meeting about the finer points of this process. At this point that's the most detail we can provide, but we will post more info to our Server Status Page once we're ready to officially support '''Lucee'''.&lt;br /&gt;
&lt;br /&gt;
*For your reference, our RSS Feed can be found here: https://hostek.com/serverstatus.asp&lt;br /&gt;
*This blog post covers a lot of questions related to Lucee: http://blog.adamcameron.me/2015/01/lucee.html&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_on_Linux_FAQs&amp;diff=2368</id>
		<title>ColdFusion on Linux FAQs</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_on_Linux_FAQs&amp;diff=2368"/>
				<updated>2015-01-29T22:23:56Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* I unzipped an application like Mura, but its installer says it can't write to a folder. How do I fix this? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
==I want to use cfhtmltopdf. Is the PDF Generation Service (PDFg) available?==&lt;br /&gt;
The &amp;lt;cfhmtltopdf&amp;gt; tag works on our Linux ColdFusion 11 servers, but it will only work for content generated within your application. At the moment there is an issue preventing the PDFg service from capturing PDFs of remote Web pages. If your application requires this functionality, please [https://support.hostek.com/ contact our support team] and ask to have your site moved to a Windows ColdFusion 11 server so you can capture PDFs of Web pages. &lt;br /&gt;
&lt;br /&gt;
==How do I add a ColdFusion Datasource (DSN)?==&lt;br /&gt;
To add a ColdFusion Datasource (DSN) login to your cPanel account, then click the ''ColdFusion DSNs'' icon under the ''Databases'' section. Enter the info you used to create your database (the ''Server'' is ''localhost'' if you created the database in cPanel), then click the '''Create DSN''' button. Once the page has been submitted you'll be able to use the datasource within your ColdFusion application. &lt;br /&gt;
&lt;br /&gt;
==I unzipped an application like Mura, but its installer says it can't write to a folder. How do I fix this?==&lt;br /&gt;
When unzipping an application or bundle of files through cPanel's File Manager, the folders will not automatically inherit the correct permissions for CF to write to subfolders. &lt;br /&gt;
&lt;br /&gt;
If you're using Mura, the easiest way around this would be to use Softaculous within your cPanel account to install the Mura files to your account. You will still have to create a MySQL database and Datasource (DSN) within your control panel for Mura to use, but Softaculous will copy the files to your folder with the correct permissions in-place. Just click the Softaculous link within cPanel, search for Mura, and follow the directions to install it. Softaculous can also do this for ContentBox, and we will be adding more CFML applications to Softaculous over time. &lt;br /&gt;
&lt;br /&gt;
Alternatively, you can just use your cPanel File Manager to edit the permissions on folders that need to be writable. Just click the folder, click the ''Change Permissions'' icon, and give the folder ''Group'' ''write'' permissions.&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_on_Linux_FAQs&amp;diff=2367</id>
		<title>ColdFusion on Linux FAQs</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_on_Linux_FAQs&amp;diff=2367"/>
				<updated>2015-01-29T22:20:17Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: Created page with &amp;quot;__FORCETOC__ ==I want to use cfhtmltopdf. Is the PDF Generation Service (PDFg) available?== The &amp;lt;cfhmtltopdf&amp;gt; tag works on our Linux ColdFusion 11 servers, but it will only wo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
==I want to use cfhtmltopdf. Is the PDF Generation Service (PDFg) available?==&lt;br /&gt;
The &amp;lt;cfhmtltopdf&amp;gt; tag works on our Linux ColdFusion 11 servers, but it will only work for content generated within your application. At the moment there is an issue preventing the PDFg service from capturing PDFs of remote Web pages. If your application requires this functionality, please [https://support.hostek.com/ contact our support team] and ask to have your site moved to a Windows ColdFusion 11 server so you can capture PDFs of Web pages. &lt;br /&gt;
&lt;br /&gt;
==How do I add a ColdFusion Datasource (DSN)?==&lt;br /&gt;
To add a ColdFusion Datasource (DSN) login to your cPanel account, then click the ''ColdFusion DSNs'' icon under the ''Databases'' section. Enter the info you used to create your database (the ''Server'' is ''localhost'' if you created the database in cPanel), then click the '''Create DSN''' button. Once the page has been submitted you'll be able to use the datasource within your ColdFusion application. &lt;br /&gt;
&lt;br /&gt;
==I unzipped an application like Mura, but its installer says it can't write to a folder. How do I fix this?==&lt;br /&gt;
When unzipping an application or bundle of files through cPanel's File Manager, the folders will not automatically inherit the correct permissions for CF to write to subfolders. &lt;br /&gt;
&lt;br /&gt;
If you're using Mura, the easiest way around this would be to use Softaculous within your cPanel account to install the Mura files to your account. You will still have to create a MySQL database and Datasource (DSN) within your control panel for Mura to use, but Softaculous will copy the files to your folder with the correct permissions in-place. Just click the Softaculous link within cPanel, search for Mura, and follow the directions to install it. Softaculous can also do this for ContentBox, and we will be adding more CFML applications to Softaculous over time. &lt;br /&gt;
&lt;br /&gt;
Alternatively, you can just use your cPanel File Manager to edit the permissions on folders that need to be writable. Just click the folder, click the ''Change Permissions'' icon, and give the folder ''group'' ''write'' permissions.&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Installing_and_Configuring_FuseGuard&amp;diff=2366</id>
		<title>Installing and Configuring FuseGuard</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Installing_and_Configuring_FuseGuard&amp;diff=2366"/>
				<updated>2015-01-29T21:25:46Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* If using Application.cfm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Installing the FuseGuard Web Application Firewall==&lt;br /&gt;
===Download Fuseguard===&lt;br /&gt;
To get started, [http://foundeo.com/security/eval/ | request an evaluation copy of FuseGuard] from the Foundeo Web site. Once approved, you'll receive an email containing a download link for Fuseguard. &lt;br /&gt;
===Installing FuseGuard on your Web Site===&lt;br /&gt;
====Extract FuseGuard====&lt;br /&gt;
*Once you've downloaded the FuseGuard ZIP file, extract it to your site's Web root. &lt;br /&gt;
====Create Database and Datasource====&lt;br /&gt;
*Next, create a MySQL or MS SQL Server database within your control panel.&lt;br /&gt;
**When creating the database, choose the option to create a ColdFusion datasource (DSN) for the database&lt;br /&gt;
&amp;lt;br&amp;gt;Now that you've created your database and DSN, we need to create the database schema. Follow the directions below for the database platform being used:&lt;br /&gt;
*'''MySQL'''&lt;br /&gt;
**Extract the ''sql/mysql.sql'' SQL file from the FuseGuard zip file to your computer.&lt;br /&gt;
**Log into your database via '''phpMyAdmin''' within your control panel&lt;br /&gt;
**Click your database name on the left-hand navigation within phpMyAdmin&lt;br /&gt;
**Click the '''Import''' tab at the top of the page&lt;br /&gt;
**On the next page, click the '''Choose file''' button then select the '''sql/mysql.sql''' file you extracted earlier.&lt;br /&gt;
**Click '''Go''' at the bottom of the page, and phpMyAdmin will create the tables for FuseGuard&lt;br /&gt;
*'''MS SQL Server'''&lt;br /&gt;
**Extract the ''sql/sqlserver.sql'' SQL file from the FuseGuard zip file to your computer.&lt;br /&gt;
**Log into your database via '''MyLittleAdmin''' within the SQL Tools section of your control panel&lt;br /&gt;
**Click the '''Tools''' link on the left-hand navigation, then click '''New Query'''&lt;br /&gt;
**Open the '''sql/sqlserver.sql''' SQL file you extracted earlier in a text editor such as Notepad or [http://notepad-plus-plus.org/download/v6.6.6.html Notepad++].&lt;br /&gt;
**Copy the text from the SQL file into the New Query window, then click '''Submit''' to have MyLittleAdmin create FuseGuard's tables.&lt;br /&gt;
====Create your FuseGuard Configurator====&lt;br /&gt;
Now we need to create a ''configurator'' for FuseGuard to use on your site. A configurator defines details about your FuseGuard installation such as what datasource to use and which firewall filters are in-place on the site. &lt;br /&gt;
&lt;br /&gt;
To create your site's configurator, copy '''fuseguard/components/configurators/DefaultConfigurator.cfc''' to '''fuseguard/components/configurators/MyConfigurator.cfc''' on your site.&lt;br /&gt;
&lt;br /&gt;
Now edit '''MyConfigurator.cfc''' &amp;lt;small&amp;gt;(you can use the control panel's File Manager)&amp;lt;/small&amp;gt; and make the following changes:&lt;br /&gt;
*Set ''variables.email'' to your email address&lt;br /&gt;
*Set ''variables.datasource'' to the datasource (DSN) you created earlier&lt;br /&gt;
*Change ''variables.db_type'' from ''derby'' to the type of database you're using (''mysql'' or ''sqlserver'')&lt;br /&gt;
&lt;br /&gt;
====Modify Application to utilize FuseGuard====&lt;br /&gt;
=====If using Application.cfc=====&lt;br /&gt;
If your site uses an Application.cfc file, you need to do two things:&lt;br /&gt;
*Add '''extends=&amp;quot;fuseguard.components.FuseGuardApplication&amp;quot;''' to the ''cfcomponent'' tag&lt;br /&gt;
*Invoke ''fuseguard()'' within the ''onRequestStart()'' method&lt;br /&gt;
&lt;br /&gt;
This example shows what the code will look like after both steps have been implemented:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent extends=&amp;quot;fuseguard.components.FuseGuardApplication&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequestStart&amp;quot; returntype=&amp;quot;boolean&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfset fuseguard(configurator=&amp;quot;DefaultConfigurator&amp;quot;, scope=&amp;quot;application&amp;quot;)&amp;gt;&lt;br /&gt;
		&amp;lt;!--- your custom onRequestStartCode goes here ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfreturn true&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''''Note:''' Be sure not to have multiple onRequestStart() methods within your Application.cfc file''&lt;br /&gt;
=====If using Application.cfm=====&lt;br /&gt;
If your site uses an Application.cfm file, add the following code below the '''cfapplication''' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfif NOT IsDefined(&amp;quot;application.fuseguard&amp;quot;) OR application.fuseguard.shouldReInitialize()&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvoke component=&amp;quot;fuseguard.components.firewall&amp;quot; method=&amp;quot;init&amp;quot; returnvariable=&amp;quot;application.fuseguard&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfinvokeargument name=&amp;quot;configurator&amp;quot; value=&amp;quot;MyConfigurator&amp;quot;&amp;gt;	&lt;br /&gt;
	&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;cfset application.fuseguard.processRequest()&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After editing your Application.cfc/Application.cfm, you may log into the FuseGuard manager at http://yoursite.com/fuseguard/manager/ ''(user: admin, pass: admin)''&lt;br /&gt;
&lt;br /&gt;
==Configuring FuseGuard==&lt;br /&gt;
===Disabling a FuseGuard Filter===&lt;br /&gt;
FuseGuard filters can be enabled/disabled as you wish. To do so, you'll need to edit your configurator then reload the configuration through the FuseGuard manager.&lt;br /&gt;
====Edit MyConfigurator.cfc====&lt;br /&gt;
*First, open ''MyConfigurator.cfc'' in a text editor. Anything below ~line 62 in this file is related to the filters enabled for your site. &lt;br /&gt;
*To disable a filter, find the section of code for the filter you want disabled, then surround the filter's code with ColdFusion comments. &lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Simple IP Blocking Filter - blocks by IP address ---&amp;gt;&lt;br /&gt;
&amp;lt;!--- UNCOMMENT TO USE&lt;br /&gt;
&amp;lt;cfset filter = firewall.newFilterInstance(&amp;quot;SimpleIPBlockingFilter&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;cfset filter.blockIP(&amp;quot;10.11.12.13&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;cfset firewall.addFilter( filter )&amp;gt;&lt;br /&gt;
---&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Reload Configuration====&lt;br /&gt;
*Once you've saved your changes to MyConfigurator.cfc, log into the FuseGuard manager at http://yoursite.com/fuseguard/manager/&lt;br /&gt;
*After logging into the manager, click the ''Configuration'' link at the top of the page.&lt;br /&gt;
*Click the '''Reinitialize and Reconfigure FuseGuard''' button to force-through your adjustments&lt;br /&gt;
[[File:Fuseguard-reloadconfig.png]]&lt;br /&gt;
&lt;br /&gt;
==Related Resources==&lt;br /&gt;
*[http://foundeo.com/security/fuseguard/docs/2.4/ FuseGuard Documentation]&lt;br /&gt;
*[http://www.youtube.com/watch?v=ubESB87vl5U FuseGuard Installation and Usage video]&lt;br /&gt;
*[https://www.ortussolutions.com/products/fuseguard ColdBox/ContentBox FuseGuard Module]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Reset_Coldfusion_Password&amp;diff=2348</id>
		<title>Reset Coldfusion Password</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Reset_Coldfusion_Password&amp;diff=2348"/>
				<updated>2015-01-09T21:02:14Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* CF 10 Additional Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Admin password reset==&lt;br /&gt;
&lt;br /&gt;
You can reset your Coldfusion 8, ColdFusion 9, or Coldfusion 10 admin password by doing the following:&lt;br /&gt;
&lt;br /&gt;
#Go to the ColdFusion installation directory (by default C:\ColdFusion8 or C:\ColdFusion9 or C:\ColdFusion10\cfusion\)&lt;br /&gt;
#Open the \Lib\ directory&lt;br /&gt;
#Locate the password.properties file and open this with notepad&lt;br /&gt;
&lt;br /&gt;
* Make the following changes to the file, you will have to change the encrypted to false and then type a new password.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#date/time&lt;br /&gt;
rdspassword=&lt;br /&gt;
password=TYPEYOURNEW-TEMPORARY-PASSWORDHERE&lt;br /&gt;
encrypted=FALSE&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Save the file&lt;br /&gt;
&lt;br /&gt;
===Restart CF and login===&lt;br /&gt;
&lt;br /&gt;
#Restart the CF Application service. In cmd, type Services.msc or locate it in the Administrators Tools&lt;br /&gt;
#Once CF has restarted, login to CF Admin with the temporary password you set&lt;br /&gt;
#In Security, under administration, reset your password. The password.properties will set the password and encrypt it.&lt;br /&gt;
&lt;br /&gt;
==CF 10 Additional Options==&lt;br /&gt;
&lt;br /&gt;
* For ColdFusion 10 there is alternative option. Go t C:\ColdFusion10\cfusion\bin\ and run the passwordreset.bat (NOTE: leave RDS password blank)&lt;br /&gt;
** Full details and instructions are [[ColdFusion_Tips_%26_Tricks#Reset_ColdFusion_Admin_Password_on_CF_10.2B_VPS|here]].&lt;br /&gt;
&lt;br /&gt;
[[Category:VPS]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=SQL_Injection&amp;diff=2328</id>
		<title>SQL Injection</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=SQL_Injection&amp;diff=2328"/>
				<updated>2014-11-18T23:25:31Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* ColdFusion - Prevent SQL Injection with cfqueryparam */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
==Tips on Preventing SQL Injection Attacks==&lt;br /&gt;
&lt;br /&gt;
To sanitize form input for sending to a database, always be sure to escape the single quote by searching and replacing it with two single quotes. This will cause the database to send the quote string as a literal character rather than interpreting it as the closing of a string. Be aware, however, that since numeric input does not require quotes, this technique will not be effective. In the case of numeric input, simply check that the form input is indeed numeric.&lt;br /&gt;
&lt;br /&gt;
One method of preventing SQL injection is to avoid the use of dynamically generated SQL in your code. By using parameterized queries and stored procedures, you then make it impossible for SQL injection to occur against your application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Escape single quotation marks&amp;lt;/b&amp;gt;. Include code within your Web applications that replaces single apostrophes with double apostrophes. This will force the database server to recognize the apostrophe as a literal character rather than a string delimiter.&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Filter user input. &amp;lt;/b&amp;gt;Filtering user input before it is passed into a SQL query will prevent the possibility of executing SQL commands. (ex. Strip input strings of all characters that are not alphanumeric (a-z, A-Z or 0-9))&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Limit the privileges available to the account that executes Web application code&amp;lt;/b&amp;gt;. For example, if an account only had permission to perform the intended action (retrieving records from a table), then delete, insert or create queries would not be possible.&amp;lt;/li&amp;gt;&amp;lt;li&amp;gt;&amp;lt;b&amp;gt;Reduce or eliminate debugging information&amp;lt;/b&amp;gt;. When an error condition occurs on your server, the Web user should not see technical details of the error. This type of information could aid an intruder seeking to explore the structure of your database.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Note to PHP users connecting to MySQL databases&lt;br /&gt;
&lt;br /&gt;
There are at least two ways to make MySQL queries safe using PHP. The first, and often simplest, method is to use mysql_real_escape_string on each variable used in a MySQL query. Please see the &amp;lt;a href=&amp;quot;http://php.net/mysql_real_escape_string&amp;quot;&amp;gt;PHP documentation&amp;lt;/a&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
The second method is to use prepared statements. You can do this using the MySQL Improved Extension in PHP 5. For more information, please refer to the &amp;lt;a href=&amp;quot;http://php.net/manual/en/book.mysqli.php&amp;quot;&amp;gt;PHP documentation&amp;lt;/a&amp;gt; for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===ColdFusion - Prevent SQL Injection with cfqueryparam===&lt;br /&gt;
By using cfqueryparam you can prevent SQL injection into your database via un-sanitized input.&lt;br /&gt;
&lt;br /&gt;
Here is some sample code that is not safe:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;cfquery name=&amp;quot;myQueryName&amp;quot; DATASOURCE=&amp;quot;#Application.MyDSN#&amp;quot;&amp;gt;&lt;br /&gt;
INSERT INTO myTable(customer_fname) VALUES ('#form.customer_fname#')	&lt;br /&gt;
&amp;lt;/cfquery&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The example above clearly just takes input from a form and inserts it into the database.  That is VERY dangerous.  &lt;br /&gt;
&lt;br /&gt;
Instead, here is a the proper way to do this, by sanitizing the form input with cfqueryparam:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;cfquery name=&amp;quot;myQueryName&amp;quot; DATASOURCE=&amp;quot;#Application.MyDSN#&amp;quot;&amp;gt;&lt;br /&gt;
INSERT INTO myTable(customer_fname) VALUES (&amp;lt;cfqueryparam value='#form.customer_fname#' cfsqltype=&amp;quot;cf_sql_varchar&amp;quot;&amp;gt;)	&lt;br /&gt;
&amp;lt;/cfquery&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE:  It is important to match the [https://wikidocs.adobe.com/wiki/display/coldfusionen/cfqueryparam cfsqltype] value with the proper data type for that field.&lt;br /&gt;
&lt;br /&gt;
==Cleaning your MS SQL Database after a SQL Injection Attack==&lt;br /&gt;
To clean a MSSQL Database from SQL Injection, a Stored Procedure can be used.&lt;br /&gt;
&lt;br /&gt;
1. Using SQL Server Management Studio, copy and paste the code below into the SQL tool and execute. This will create the SearchAndReplace stored procedure that will allow you to clean your MSSQL Database.&lt;br /&gt;
&amp;lt;pre&amp;gt;CREATE PROC SearchAndReplace&lt;br /&gt;
(&lt;br /&gt;
	@SearchStr nvarchar(100),&lt;br /&gt;
	@ReplaceStr nvarchar(100)&lt;br /&gt;
)&lt;br /&gt;
AS&lt;br /&gt;
BEGIN&lt;br /&gt;
&lt;br /&gt;
	-- Copyright c 2002 Narayana Vyas Kondreddi. All rights reserved.&lt;br /&gt;
	-- Purpose: To search all columns of all tables for a given search string and replace it with another string&lt;br /&gt;
	-- Written by: Narayana Vyas Kondreddi&lt;br /&gt;
	-- Site: http://vyaskn.tripod.com&lt;br /&gt;
	-- Tested on: SQL Server 7.0 and SQL Server 2000&lt;br /&gt;
	-- Date modified: 2nd November 2002 13:50 GMT&lt;br /&gt;
&lt;br /&gt;
	SET NOCOUNT ON&lt;br /&gt;
&lt;br /&gt;
	DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110), @SQL nvarchar(4000), @RCTR int&lt;br /&gt;
	SET  @TableName = ''&lt;br /&gt;
	SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')&lt;br /&gt;
	SET @RCTR = 0&lt;br /&gt;
&lt;br /&gt;
	WHILE @TableName IS NOT NULL&lt;br /&gt;
	BEGIN&lt;br /&gt;
		SET @ColumnName = ''&lt;br /&gt;
		SET @TableName = &lt;br /&gt;
		(&lt;br /&gt;
			SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))&lt;br /&gt;
			FROM 	INFORMATION_SCHEMA.TABLES&lt;br /&gt;
			WHERE 		TABLE_TYPE = 'BASE TABLE'&lt;br /&gt;
				AND	QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) &amp;gt; @TableName&lt;br /&gt;
				AND	OBJECTPROPERTY(&lt;br /&gt;
						OBJECT_ID(&lt;br /&gt;
							QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)&lt;br /&gt;
							 ), 'IsMSShipped'&lt;br /&gt;
						       ) = 0&lt;br /&gt;
		)&lt;br /&gt;
&lt;br /&gt;
		WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)&lt;br /&gt;
		BEGIN&lt;br /&gt;
			SET @ColumnName =&lt;br /&gt;
			(&lt;br /&gt;
				SELECT MIN(QUOTENAME(COLUMN_NAME))&lt;br /&gt;
				FROM 	INFORMATION_SCHEMA.COLUMNS&lt;br /&gt;
				WHERE 		TABLE_SCHEMA	= PARSENAME(@TableName, 2)&lt;br /&gt;
					AND	TABLE_NAME	= PARSENAME(@TableName, 1)&lt;br /&gt;
					AND	DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')&lt;br /&gt;
					AND	QUOTENAME(COLUMN_NAME) &amp;gt; @ColumnName&lt;br /&gt;
			)&lt;br /&gt;
	&lt;br /&gt;
			IF @ColumnName IS NOT NULL&lt;br /&gt;
			BEGIN&lt;br /&gt;
				SET @SQL=	'UPDATE ' + @TableName + &lt;br /&gt;
						' SET ' + @ColumnName &lt;br /&gt;
						+ ' =  REPLACE(' + @ColumnName + ', ' &lt;br /&gt;
						+ QUOTENAME(@SearchStr, '''') + ', ' + QUOTENAME(@ReplaceStr, '''') + &lt;br /&gt;
						') WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2&lt;br /&gt;
				EXEC (@SQL)&lt;br /&gt;
				SET @RCTR = @RCTR + @@ROWCOUNT&lt;br /&gt;
			END&lt;br /&gt;
		END	&lt;br /&gt;
	END&lt;br /&gt;
&lt;br /&gt;
	SELECT 'Replaced ' + CAST(@RCTR AS varchar) + ' occurence(s)' AS 'Outcome'&lt;br /&gt;
END&lt;br /&gt;
&lt;br /&gt;
GO&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Within Management Studio type or copy/paste the following to replace all occurrences of '&amp;lt;script&amp;gt;badurl.com&amp;lt;script&amp;gt;' with '': &lt;br /&gt;
&amp;lt;pre&amp;gt;EXEC SearchAndReplace '&amp;lt;script&amp;gt;badurl.com&amp;lt;script&amp;gt;', ''&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Execute the command above, note for smaller databases this will run quickly but for larger databases it could take a long time to complete.&lt;br /&gt;
[[category:Databases-MySQL]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2323</id>
		<title>ColdFusion Tips &amp; Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2323"/>
				<updated>2014-11-14T18:42:18Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Per-application Robust Exception Information Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Converting Application.cfm to Application.cfc==&lt;br /&gt;
Using an '''Application.cfc''' configuration file offers some advantages over the older style '''Application.cfm''' configuration files. Some of the main features that an Application.cfc file give you are &amp;quot;functions triggered by Application, Session, Request, and Error events&amp;quot; and &amp;quot;Application-Level Mappings and Custom Tag Paths&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are only a few steps required to convert an application to use an Application.cfc file:&lt;br /&gt;
&lt;br /&gt;
NOTE: You should ensure that you have a backup of any files before making changes to them.&lt;br /&gt;
&lt;br /&gt;
===Create an '''Application.cfc''' file===&lt;br /&gt;
&lt;br /&gt;
Below is an example '''Application.cfc''' file with the minimum requirements:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Setup '''onRequest''' function in '''Application.cfc''' to include the '''Application.cfm''' file&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if an Application.cfm file already exists in the root of the application. Below is what the Application.cfc file will look like after this addition:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Copy application settings from the '''cfapplication''' tag and remove the '''cfapplication''' tag===&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if a cfapplication tag is used within the application. Each attribute of the cfapplication tag will need to be copied into the cfscript section at the top of the Application.cfc with the pattern [this.attributeName = &amp;quot;value&amp;quot;;].&lt;br /&gt;
&lt;br /&gt;
For example. The below cfapplication tag would be converted into our Application.cfc example as follows:&lt;br /&gt;
&lt;br /&gt;
'''cfapplication''' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication&lt;br /&gt;
	name = &amp;quot;my_app_name&amp;quot;&lt;br /&gt;
	sessionManagement = &amp;quot;Yes&amp;quot;&lt;br /&gt;
	sessionTimeout = &amp;quot;#createTimeSpan(0,0,20,0)#&amp;quot;&lt;br /&gt;
	setClientCookies = &amp;quot;Yes&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Application.cfc''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = &amp;quot;my_app_name&amp;quot;; // app name from old cfapplication tag&lt;br /&gt;
		this.sessionManagement = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
		this.sessionTimeout = CreateTimeSpan(0,0,20,0);&lt;br /&gt;
		this.setClientCookies = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Do not forget to remove the '''cfapplication''' tag after copying the settings into the '''Application.cfc''' file.&lt;br /&gt;
&lt;br /&gt;
Now that the change is complete, this is a good time to test the application to ensure everything is working correctly with the new setup.&lt;br /&gt;
&lt;br /&gt;
==Per-Application ColdFusion Mappings==&lt;br /&gt;
In ColdFusion 8 and above, it is possible to create per-application mappings through your site's Application.cfc file. If you wish to convert to using an Application.cfc file, follow the steps [[ColdFusion_Tips_%26_Tricks#Converting_Application.cfm_to_Application|here]]. &lt;br /&gt;
&lt;br /&gt;
Once you have your Application.cfc created, you will insert the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.mappings[&amp;quot;/test&amp;quot;]=&amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On your site though, you would change &amp;quot;/test&amp;quot; to the name of your mapping. IMPORTANT: You need to include the forward slash before the name of your mapping. Also, change &amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot; to the full physical path to the folder you wish to map. &lt;br /&gt;
'''Note''': The physical path to your FTP root is listed in the &amp;quot;Site Settings&amp;quot; of your control panel at wcp.hostek.com.&lt;br /&gt;
&lt;br /&gt;
To call a template named &amp;quot;testing.cfm&amp;quot; in the &amp;quot;test&amp;quot; directory we just mapped, you would use this line: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;/test/testing.cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-Application Custom Tag Paths==&lt;br /&gt;
Starting in ColdFusion 8, ColdFusion allows creation of Custom Tag Paths in each site's Application.cfc file. This allows you to create and manage your Custom Tag Paths without having to use CF Administrator (ie. submit a support ticket). The following steps will help you create a Custom Tag Path:&lt;br /&gt;
&lt;br /&gt;
If you do not already have an Application.cfc file in your site's Web root, create one now.&lt;br /&gt;
Place the following code in the Application.cfc file and save:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=&amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you'd replace &amp;quot;yourdomain.com&amp;quot; with your domain name, and &amp;quot;customtagfolder&amp;quot; with the name of the folder you created for your custom tags. &lt;br /&gt;
&lt;br /&gt;
Now you have successfully added your custom tag path. If you have multiple tag paths to add, try using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=ListAppend(THIS.customtagpaths, &amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Per-application Robust Exception Information Settings==&lt;br /&gt;
To enable Robust Exception Information on a ColdFusion application, you will need to add the following to the top of the site's ''Application.cfc'' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = true /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Alternatively, if you wish to ensure Robust Exception Information is ''always'' disabled for an application, add this to the site's ''Application.cfc'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = false /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-application JSON Prefix==&lt;br /&gt;
To enable the JSON Prefix for your application add the following to the site's '''Application.cfc''' file, and adjust the '''secureJSONPrefix''' as desired:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = true&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSONPrefix = &amp;quot;//&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can disable this feature using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = false&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Restart a ColdFusion Application==&lt;br /&gt;
If you ever need to restart your site's ColdFusion application (to pick up a setting change, etc), you can do so via the ApplicationStop() function in ColdFusion 9+. &lt;br /&gt;
&lt;br /&gt;
To use this you can create a file (ex: restart.cfm) containing the following code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset ApplicationStop() /&amp;gt;&lt;br /&gt;
&amp;lt;cflocation url=&amp;quot;index.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When you run the file containing that code your ColdFusion Application will be stopped (flushing your application scope), and when the browser is redirected to the index page the application will start again.&lt;br /&gt;
==CFHTTP Connection Failures over HTTPS==&lt;br /&gt;
===Fixing cfhttp Failures on Shared Hosting===&lt;br /&gt;
If you try to use &amp;lt;cfhttp&amp;gt; to connect to a secure site (over HTTPS), you may receive the following error: &amp;quot;Connection Failure: Status code unavailable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this add the following code to your site's &amp;quot;Application.cfm&amp;quot; file (below the 'cfapplication' tag):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- fix for HTTPS connection failures ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif NOT isDefined(&amp;quot;Application.sslfix&amp;quot;)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity = createObject(&amp;quot;java&amp;quot;, &amp;quot;java.security.Security&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity.removeProvider(&amp;quot;JsafeJCE&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset Application.sslfix = true /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If your site uses an &amp;quot;Application.cfc&amp;quot; file instead, then just place that code in the &amp;quot;'onApplicationStart()&amp;quot; method of that file. After making that adjustment you'll need to restart your ColdFusion application as [[ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application|shown here]]. If you still run into issues though, you will need to [https://support.hostek.com/ submit a support ticket] asking our team to install the remote site's SSL certificate into ColdFusion's Java Certificate Store.&lt;br /&gt;
&lt;br /&gt;
===Fixing cfhttp Failures on VPS Hosting===&lt;br /&gt;
If you are having issues connecting to a site or file from with ColdFusion over HTTPS, you can import the remote site's SSL certificate into the the Java SSL Certificate Store used by ColdFusion.&lt;br /&gt;
====Fixing cfhttp Connection Failures with Keytool====&lt;br /&gt;
'''1) Set Java environment'''&amp;lt;br&amp;gt;&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable in the next command. For '''example''', you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
In that case, you would use '''C:\ColdFusion10\jre''' as the value of JAVA_HOME as shown below. Open a command prompt and issue the following commands:&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set JAVA_HOME=C:\ColdFusion10\jre&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set PATH=%PATH%;%JAVA_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, use the following commands (case-sensitive) in your terminal:&lt;br /&gt;
This '''example''' assumes that the JRE is located at ''/opt/coldfusion10/jre''&lt;br /&gt;
    export JAVA_HOME=/opt/coldfusion10/jre&lt;br /&gt;
    export PATH=$PATH:/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
'''2) List the Keystore Contents'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Java installation is at ''C:\ColdFusion10\jre'', then navigate to '''C:\ColdFusion10\jre\bin''':&lt;br /&gt;
    cd C:\ColdFusion10\jre\bin&lt;br /&gt;
If you're using a '''Linux/cPanel''' server, use this command instead:&lt;br /&gt;
    cd /opt/coldfusion10/jre/bin&lt;br /&gt;
&lt;br /&gt;
Now you can list the keystore contents ''(Windows &amp;amp; Linux)'':&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 76 entries&lt;br /&gt;
&lt;br /&gt;
'''3) Import certificate in to keystore and list to check added '''&amp;lt;br&amp;gt;&lt;br /&gt;
''(assumes you've downloaded the certificate to '''c:\temp\inet.cer''' (Windows) or '''/temp/inet.cer''' (Linux/cPanel)''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file c:\temp\inet.cer&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file /temp/inet.cer&lt;br /&gt;
    Trust this certificate? [no]: y&lt;br /&gt;
    Certificate was added to keystore&lt;br /&gt;
&lt;br /&gt;
Now verify the keystore contains your new certificate&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 77 entries&lt;br /&gt;
&lt;br /&gt;
'''4) Restart the ColdFusion application service so the keystore is re-read.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''5) Run your cfhttp request - HTTPS works now!'''&lt;br /&gt;
&lt;br /&gt;
====Fixing cfhttp Connection Failures with Portecle====&lt;br /&gt;
If you'd rather import certificates into the Java SSL Keystore through a GUI, follow these directions to use a tool named Portecle to do so:&lt;br /&gt;
&lt;br /&gt;
#Ensure your JAVA_HOME variable is set correctly as described above.&lt;br /&gt;
#Download Portecle from Sourceforge: [http://sourceforge.net/projects/portecle/ Portecle Project Homepage]&lt;br /&gt;
#Extract the files&lt;br /&gt;
#Open a Command Prompt and navigate to the extracted directory&lt;br /&gt;
#Issue this command to launch Portecle: &amp;lt;pre&amp;gt;java -jar portecle.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#In Notepad, open your jvm.config file to find the JVM PATH for ColdFusion's JVM; look for '''java.home={path here}'''&lt;br /&gt;
#In Portecle click ''File'', ''Open Keystore File''&lt;br /&gt;
#Browse to {JVM PATH}\jre\lib\security to the path, and open the cacerts file; Enter Password: '''changeit'''&lt;br /&gt;
#Click on '''Tools''', '''Import Trusted Certificate''', select the certificate you wish to import.&lt;br /&gt;
#*To obtain the certificate, you can navigate in a browser to the site where the certificate resides, then download the certificate to a CER (X.509 format) file through the browser.&lt;br /&gt;
#Click '''OK''' to import and '''YES''' to accept the certificate as ''trusted''.&lt;br /&gt;
#Click OK again, usually you won't need to change the Alias name;click OK to finish.&lt;br /&gt;
#Click '''File''', '''Save Keystore'''.&lt;br /&gt;
Close Portecle.&lt;br /&gt;
====Fixing CFHTTP Failures Related to Cached DNS Records====&lt;br /&gt;
This solution will prevent Java from caching DNS records for the life of the ColdFusion process. Instead, Java will refresh its records periodically.&lt;br /&gt;
&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable to find the location of the Java installation used by ColdFusion. &lt;br /&gt;
&lt;br /&gt;
For '''example''', on '''Windows''' you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
On '''Linux''' you may see this:&lt;br /&gt;
    java.home=/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
Navigate to the '''security''' folder within the Java installation used by ColdFusion. For '''example''':&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows''' ''(open in Windows Explorer)''&lt;br /&gt;
    C:\ColdFusion10\jre\lib\security\&lt;br /&gt;
'''Linux\cPanel'''&lt;br /&gt;
    cd /opt/coldfusion10/jre/lib/security/&lt;br /&gt;
&lt;br /&gt;
Back-up, then edit the '''java.security''' file within that folder and change the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
'''From'''&lt;br /&gt;
    #networkaddress.cache.ttl=-1&lt;br /&gt;
'''To'''&lt;br /&gt;
    networkaddress.cache.ttl=600&lt;br /&gt;
&lt;br /&gt;
''Note:'' The above value refreshes DNS records every 600 seconds ''(10 minutes)''. You may adjust it to whatever you feel is appropriate for your server.&lt;br /&gt;
&lt;br /&gt;
Now '''Save''' the file then '''Restart ColdFusion''', and the new DNS caching setting will take effect.&lt;br /&gt;
&lt;br /&gt;
==CFMAIL Multi-Part Emails==&lt;br /&gt;
Sending emails with both Text and HTML parts helps reduce the chance of your messages getting caught by a mail server's spam filter. It also helps ensure your recipients can read the message regardless of the mail client being used. The easiest way to do this is to store your message in a variable using &amp;lt;cfsavecontent&amp;gt; then adding it to &amp;lt;cfmail&amp;gt; using &amp;lt;cfmailpart&amp;gt; as shown in the example below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Store your message in a variable ---&amp;gt;&lt;br /&gt;
&amp;lt;cfsavecontent variable=&amp;quot;myemailcontent&amp;quot;&amp;gt;&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
This is some plain text. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;And this is some more text in HTML. It will appear in plain-text for anyone who views the Text part of this email, though.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/cfsavecontent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- Function to strip HTML from message while preserving line breaks ---&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name= &amp;quot;textMessage&amp;quot; access= &amp;quot;public&amp;quot; returntype= &amp;quot;string&amp;quot; hint= &amp;quot;Converts an html email message into a nicely formatted with line breaks plain text message&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfargument name= &amp;quot;string&amp;quot; required= &amp;quot;true&amp;quot; type= &amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfscript&amp;gt;&lt;br /&gt;
      var pattern = &amp;quot; &amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
      var CRLF = chr( 13) &amp;amp; chr( 10);&lt;br /&gt;
      var message = ReplaceNoCase(arguments.string, pattern, CRLF , &amp;quot;ALL&amp;quot;);&lt;br /&gt;
      pattern = &amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;;&lt;br /&gt;
    &amp;lt;/cfscript&amp;gt;&lt;br /&gt;
    &amp;lt;cfreturn REReplaceNoCase(message, pattern, &amp;quot;&amp;quot; , &amp;quot;ALL&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!--- Now send the email. When adding the Text part, we'll use the textMessage() function we just created to strip out HTML tags. ---&amp;gt;&lt;br /&gt;
&amp;lt;cfmail from=&amp;quot;sender@domain.com&amp;quot; to=&amp;quot;recipient@anotherdomain.com&amp;quot; subject=&amp;quot;Multi-part Email with CFMAIL&amp;quot; type=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/plain&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#textmessage(myemailcontent)#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/html&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#myemailcontent#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: [http://cookbooks.adobe.com/post_CFMAIL_the_right_way-17875.html CFMAIL the right way]&lt;br /&gt;
&lt;br /&gt;
==Scheduling Tasks in ColdFusion==&lt;br /&gt;
On occasion shared ColdFusion hosting customers need to setup Scheduled Task to run files on a cycle. &lt;br /&gt;
&lt;br /&gt;
This can be done with the following steps, making use of ColdFusion's &amp;lt;cfschedule&amp;gt; tag:&lt;br /&gt;
&lt;br /&gt;
#Create a file locally using any text editor, save the file with the .CFM extension (example: setschedule_example.cfm).&lt;br /&gt;
#Copy and past in the code example below taken from ''ColdFusion's Documentation'' and save.&lt;br /&gt;
#Replace the data in the example note the following recommendations.&amp;lt;br /&amp;gt;!- Name each file made for creating a schedule with the name of the task so you can reference the task later if needed. Specific naming will also make it more difficult for someone to randomly run the file.&amp;lt;br /&amp;gt;!- If you need to schedule a job to run monthly on any date in the range 28-31, read about how ColdFusion will handle the scheduling in the ColdFuison8 documentation referenced below.&lt;br /&gt;
#Working example, the code example below is a working tested solution for getting the weather for a specific zip code and the task to email the results.&lt;br /&gt;
&lt;br /&gt;
'''Scheduled Task'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- This sets the initial task, if your just wanting to set the schedule --&amp;gt;&lt;br /&gt;
&amp;lt;cfschedule action = &amp;quot;update&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot; &lt;br /&gt;
    operation = &amp;quot;HTTPRequest&amp;quot;&lt;br /&gt;
    url = &amp;quot;http://test.hostek.net/weather_send.cfm&amp;quot;&lt;br /&gt;
    startDate = &amp;quot;7/6/09&amp;quot;&lt;br /&gt;
    startTime = &amp;quot;09:30 AM&amp;quot;&lt;br /&gt;
    interval = &amp;quot;3600&amp;quot;&lt;br /&gt;
    resolveURL = &amp;quot;Yes&amp;quot;&lt;br /&gt;
    requestTimeOut = &amp;quot;600&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task created to be deleted, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;delete&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task to be paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;pause&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task resumed if paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;resume&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Weather Collector'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;CF External Weather Checker&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfset zip=&amp;quot;12345&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;cfinvoke webservice=&amp;quot;http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl&amp;quot; method=&amp;quot;getCityWeatherByZIP&amp;quot; returnvariable=&amp;quot;aWeatherReturn&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cfinvokeargument name=&amp;quot;ZIP&amp;quot; value=&amp;quot;#zip#&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aWeatherReturn.temperature EQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt; I cannot get the weather for #zip# external http connections must be DOWN.&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;cfset message=&amp;quot;The temperature for #zip# (Your city) is #aWeatherReturn.temperature# degrees.&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif message NEQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfmail from = &amp;quot;weather.server@test.com&amp;quot; to = &amp;quot;test@test.com&amp;quot; subject = &amp;quot;Weather checker&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#message#&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''More information on using CFSchedule'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/cfschedule Adobe ColdFusion Documentation - CFSchedule]&lt;br /&gt;
*[http://www.isummation.com/blog/configuring-coldfusion-scheduled-tasks-using-the-cfschedule-tag/ iSummation Blog - Configuring ColdFusion Scheduled Tasks using the CFSCHEDULE tag]&lt;br /&gt;
&lt;br /&gt;
==Session Management - Handling Bots and Spiders==&lt;br /&gt;
===Robots.txt File===&lt;br /&gt;
First and foremost we suggest creating a robots.txt file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time. Second to prevent specific bots from crawling the website. &lt;br /&gt;
&lt;br /&gt;
Please see our [[Robots|robots.txt article]] for more information on implementing a robots.txt on your site.&lt;br /&gt;
&lt;br /&gt;
===Lower Session Timeouts for Bots and Spiders===&lt;br /&gt;
Next we suggest setting your session timeout specifically lower for bots and spiders. These spiders and bots will crawl a page and when a session (ColdFusion) is created, it will persist during then entire page load. The page fully loaded allows the bot or spider to get the information from the Web page AND allows the session to expire quickly protecting ColdFusion from effects similar to a memory leak. &lt;br /&gt;
&lt;br /&gt;
To do this, implement the appropriate solution for your site below:&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfm'''====&lt;br /&gt;
Place this code at the top of your Application.cfm file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then use the '''REQUEST.sessionTimeout''' variable to specify the session timeout period in your '''cfapplication''' tag: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication name=&amp;quot;myawesomeapp&amp;quot;&lt;br /&gt;
     sessionmanagement=&amp;quot;Yes&amp;quot;&lt;br /&gt;
     sessiontimeout=&amp;quot;#REQUEST.sessionTimeout#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (tag-based)====&lt;br /&gt;
If you primarily use cfml tags in your Application.cfc, you can set the Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
 &amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (cfscript)====&lt;br /&gt;
If instead, you're using cfscipt in your Application.cfc, you'll set the custom Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
// This checks if a cookie is created, for bots this will return false and use the low session timeout&lt;br /&gt;
if (StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) || StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)){&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,30,0);&lt;br /&gt;
} else {&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,0,2);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.bennadel.com/blog/1083-ColdFusion-Session-Management-And-Spiders-Bots.htm Session Management code examples for the Application.cfm]&lt;br /&gt;
&lt;br /&gt;
==Creating Client Variables Tables for MySQL Databases==&lt;br /&gt;
If you need your datasource set up as a ColdFusion Client Variables Store, you can enable the '''Client Variables'' option in your ColdFusion datasource within the WCP control panel. &lt;br /&gt;
&lt;br /&gt;
Please note, if your datasource MySQL DSN, you'll need to create the necessary tables prior to using the Client Variable Store. To do this you would need to create two tables, one named &amp;quot;cdata&amp;quot; and one named &amp;quot;cglobal&amp;quot;. The SQL you'd use to create those tables is below:&lt;br /&gt;
&lt;br /&gt;
Table: '''cdata'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
 CREATE TABLE IF NOT EXISTS cdata (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          app varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          PRIMARY KEY (cfid,app)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Table: '''cglobal'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS cglobal (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          lvisit timestamp,&lt;br /&gt;
          KEY cfid (cfid),&lt;br /&gt;
          KEY lvisit (lvisit)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Output CF Error details without CFDump==&lt;br /&gt;
It is common in an error handler that you want to output all of the error details to the screen, a file, or an email. Therefore, the cfdump tag is commonly used for this; and, while this works well in development, it is not always the best practice on a production site because of the performance of the cfdump tag due to its use of reflection (Runtime type introspection).&lt;br /&gt;
&lt;br /&gt;
A better performing alternative is to output the information you want directly from the Error/Exception struct within a 'cfoutput' tag. This can be done by looking up the cferror structure or the cfcatch structure in the ColdFusion docs to see what is available and what values you might want to output:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Error''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cferror&amp;lt;br /&amp;gt;&lt;br /&gt;
'''CFCatch''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cfcatch&lt;br /&gt;
&lt;br /&gt;
===Cfdump Custom Tag Alternative===&lt;br /&gt;
You can also use the following link to download an example CF custom tag that will give a similar error output as when using the cfdump tag on an error variable:&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the custom tag's usage:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the error handler specified in your 'cferror' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cf_OutputError Error=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code would replace:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfdump var=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in a cfcatch block:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cftry&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;cfcatch&amp;gt;&lt;br /&gt;
   &amp;lt;cf_OutputCFCatch CFCatch=&amp;quot;#CFCatch#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/cfcatch&amp;gt;&lt;br /&gt;
&amp;lt;/cftry&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configure ColdFusion to Handle html and htm Files==&lt;br /&gt;
===Enable HTML/HTM as CFML on Shared Accounts===&lt;br /&gt;
On our ColdFusion servers, the best way to process HTML files (.html, .htm) as ColdFusion/CFML (.cfm files) is by using a set of rewrite rules that route the HTML files through a ColdFusion &amp;quot;controller&amp;quot; script. The main benefits of this approach are that it is easy to implement on a site-by-site basis, and it works with any version of ColdFusion. To implement this approach on your site, follow the steps below:&lt;br /&gt;
====Step 1: Add Rewrite Rules to Route HTML Files through the CFM Controller====&lt;br /&gt;
If you have a '.htaccess' file in your webroot, add the rules below to the top of that file. Otherwise, create a file named '.htaccess' in your site's web root and place these rules within it:&lt;br /&gt;
=====For Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.html htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====For Sites Using .HTM Files=====&lt;br /&gt;
'''NOTE:''' If your site uses ''.htm'' files instead of ''.html'' files, use this set of rules instead. The only difference is ''html'' is replaced with ''.htm''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.htm htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 2: Create the ColdFusion Controller Script (htmlcontrol.cfm)====&lt;br /&gt;
Now we just need to create a ColdFusion script that will process the HTML files. To do this, create a file named '''htmlcontrol.cfm''' within your site's web root. Place this CFML code within the file:&lt;br /&gt;
=====CFML for Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.html&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====CFML for Sites Using .HTM Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.htm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you save the controller script, your site will begin processing any ColdFusion/CFML code within your HTML files.&lt;br /&gt;
===Enable HTML/HTM as CFML on a VPS===&lt;br /&gt;
In case you need to process ColdFusion code in your .htm or .html files, here is what you will need to do to get this to work. This is based on using ColdFusion on one of our dedicated server hosting accounts on a Windows server.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This will affect every site on the server, so use cautiously.&lt;br /&gt;
&lt;br /&gt;
First, you will need to edit the web.xml file located generally at C:\ColdFusion10\cfusion\wwwroot\WEB-INF&lt;br /&gt;
&lt;br /&gt;
Open this file and look for '''coldfusion_mapping_1'''.&lt;br /&gt;
&lt;br /&gt;
Scroll down the file until you see the last number increment like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;servlet-mapping id=&amp;quot;macromedia_mapping_15&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then add the following right below the closing &amp;lt;/servlet-mapping&amp;gt; of the last number increment item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_16&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_17&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_18&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_19&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save this file and exit.&lt;br /&gt;
&lt;br /&gt;
Now in IIS, setup a mapping for the site:&lt;br /&gt;
#In IIS 7+ click the server name section (right below the '''Start Page''' in the left-hand navigation), then double-click the '''Handler Mappings''' icon.&lt;br /&gt;
#Select and &amp;quot;edit&amp;quot; the '''*.cfm''' record and copy the value of &amp;quot;executable&amp;quot;. Now hit Cancel and then click '''Add Script Map'''. &lt;br /&gt;
#Paste the executable value copied from the '''*.cfm''' record and type '''*.htm''' into the '''Request Path''' and hit OK. &lt;br /&gt;
#Repeat the above steps to add a handler for '''*.html''' &lt;br /&gt;
&lt;br /&gt;
Lastly, open the '''uriworkermap.properties''' file for your ColdFusion 10 IIS Connector in a text editor such as Notepad. On a standard ColdFusion installation this is located at: &amp;lt;pre&amp;gt;C:\ColdFusion10\config\wsconfig\1\uriworkermap.properties&amp;lt;/pre&amp;gt;&lt;br /&gt;
Copy the following lines, paste them at the bottom of the file, then save and close the file: &amp;lt;pre&amp;gt;/*.html = cfusion&lt;br /&gt;
/*.htm = cfusion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the ColdFusion service and IIS. ColdFusion should begin processing CFML within htm/html files now.&lt;br /&gt;
&lt;br /&gt;
==Increase the ColdFusion Post Parameters Limit==&lt;br /&gt;
===ColdFusion 10===&lt;br /&gt;
In ColdFusion 10, you can easily increase the value of ColdFusion's '''postParametersLimit''' via the ColdFusion Administrator. Once logged into the ColdFusion Administrator, click the '''Settings''' link then scroll to the bottom of the page. Set the value for the Post Parameters Limit to the desired limit and click the submit button. &lt;br /&gt;
===ColdFusion 9 and below===&lt;br /&gt;
To adjust the Post Parameters Limit setting in ColdFusion 9 and below, you will have to edit the server's '''neo-runtime.xml''' file which is located here on a standard installation: &amp;lt;pre&amp;gt;C:\ColdFusion9\lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open that file in a text editor such as Notepad, then search for the '''postSizeLimit''' tag. It will look similar to this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postSizeLimit'&amp;gt;&amp;lt;number&amp;gt;100.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediately after that set of tags, paste this chunk of text: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postParametersLimit'&amp;gt;&amp;lt;number&amp;gt;1000.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once you've adjusted the file, you'll just need to save your changes and restart ColdFusion for the new setting to go into effect. '''Note''': The value of '''1000''' is just an example, so you can increase it as needed. &lt;br /&gt;
&lt;br /&gt;
==Loading custom Java library or Java Libraries (jar or class files) in ColdFusion 10==&lt;br /&gt;
ColdFusion 10 makes it easy to load Java libraries into your ColdFusion application without having to restart ColdFusion. All that's required is your application define the 'THIS.javaSettings' attribute within the site's Application.cfc like below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.javaSettings = {LoadPaths = [&amp;quot;/javafiles/&amp;quot;], loadColdFusionClassPath = true, reloadOnChange=false}/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will check the ''javafiles'' directory in your Web root for 'jar' and 'class' files and make any libraries within the directory accessible from your ColdFusion application. If you modify the JAR files in your ''javafiles'' directory though, ColdFusion will need to be restarted to load the new versions of the JAR files. &lt;br /&gt;
&lt;br /&gt;
'''References''': &lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/Enhanced+Java+integration+in+ColdFusion+10 Adobe ColdFusion Documentation - Enhanced Java Integration in ColdFusion]&lt;br /&gt;
*[http://www.raymondcamden.com/2014/6/16/Issue-with-ColdFusion-JavaSettings-and-ReloadOnChange Ray Camden's Blog - Issue with ColdFusion JavaSettings and ReloadOnChange]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Permission denied for creating Java object: coldfusion.server.ServiceFactory''==&lt;br /&gt;
===When using Mura or using Transfer ORM===&lt;br /&gt;
====Issue====&lt;br /&gt;
If you are using '''Mura''' or using '''Transfer ORM''' and you get this error, ''Permission denied for creating Java object: coldfusion.server.ServiceFactory'', you are likely using an outdated version of Mura and also are probably on a ColdFusion 9 server. The Transfer ORM component causing this issue has not been updated to work with ColdFusion 9. There is a quick fix though:&lt;br /&gt;
====Solution====&lt;br /&gt;
Find the file named CFMLVersion.cfc which should be at '''/wwwroot/requirements/transfer/com/factory'''.&lt;br /&gt;
&lt;br /&gt;
Edit that file and find the line that has:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And change that to:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;) OR server.coldfusion.productversion.startsWith(&amp;quot;9&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save the file and it should now work.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Since this is likely running an outdated version of Mura, we highly recommend updating Mura to the latest version to take advantage of numerous performance and security enhancements.&lt;br /&gt;
===When using DataMgr===&lt;br /&gt;
If you get this error while using DataMgr.cfc, the changes described below will solve this problem:&lt;br /&gt;
&lt;br /&gt;
Here is the section of code from the original DataMgr.cfc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection = getConnection()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset db = connection.getMetaData().getDatabaseProductName()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection.close()&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = db2&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is what the modified code should look like (this sample assume MySQL)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of changes''':&lt;br /&gt;
&lt;br /&gt;
These 3 lines were commented out:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line needed quotes around db2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And lastly, this line needed added:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you are using an ''MS Access'' database instead of ''MySQL'', replace '''MYSQL''' with '''msaccessjet''' on the line that is added.&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Security: The requested template has been denied access to {file/directory}''==&lt;br /&gt;
===Issue===&lt;br /&gt;
Our shared servers have ColdFusion Sandbox Security enabled, which requires absolute filesystem paths to be provided to tags and functions that interact with the filesystem. If you receive an error that starts with ''Security: The requested template has been denied access to ...'', then it is followed by a relative path, you'll need to replace the relative path with a full path.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
One way to do this is to hard-code the path (''d:\home\sitename.com\wwwroot\filename.jpg''), but that can cause portability problems if your site is ever moved to a different environment. &lt;br /&gt;
&lt;br /&gt;
A better way to do this would be to &amp;quot;wrap&amp;quot; your relative path with the '''ExpandPath()''' function. The ''ExpandPath()'' function will automatically detect the absolute filesystem path to the file, and ColdFusion will no longer give you a permissions error. &lt;br /&gt;
&lt;br /&gt;
'''More info''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/ExpandPath Adobe Documentation - ExpandPath]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion COM Object Error ''java.lang.RuntimeException: Can not use native code: Initialisation failed''==&lt;br /&gt;
The error ''java.lang.RuntimeException: Can not use native code: Initialisation failed'' is related to calling a 32-bit COM object from within a 64-bit ColdFusion installation. &lt;br /&gt;
&lt;br /&gt;
The simplest way to bypass this error is to write a small ASP Webservice to proxy the call to the COM object as shown in '''Option 2''' of this blog post: [http://coldfusion9.blogspot.com/2010/05/32-bit-components-on-64-bit-coldfusion.html 32-bit Components on 64-bit ColdFusion]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can [https://support.hostek.com/ ask Support] to move your site to a 32-bit ColdFusion server.&lt;br /&gt;
&lt;br /&gt;
==Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated Server==&lt;br /&gt;
To use Seefusion, visit the address mentioned in your server's Welcome email.&lt;br /&gt;
&lt;br /&gt;
Once loaded, you'll see a summary of memory consumption, average response time, number of requests processed by ColdFusion per second, and a view of currently running ColdFusion requests. &lt;br /&gt;
===Finding Scripts to Optimize===&lt;br /&gt;
When using Seefusion it is helpful to look at the '''Slow''' section of the request monitor. This will show you recent requests that took longer than 8 seconds to complete, giving you a good idea of what scripts need optimization. &lt;br /&gt;
===Stack Tracing with Seefusion===&lt;br /&gt;
Additionally, when a request is running in the '''Active''' section of Seefusion's request monitor, you can click the paper stack icon to the left of the request to view a stack trace of the request. A stack trace tells you what line of code is currently being processed by the request. &lt;br /&gt;
&lt;br /&gt;
Once the stack trace loads, start at the top and work your way down until you find a recognizable path to a ColdFusion template (''eg. c:\home\mysite.com\wwwroot\index.cfm: 47''). This tells you the template currently being executed followed by the line number being processed at that moment in time. If a request consistently shows the same line of code in subsequent stack traces, then you've found the main area to focus on optimizing.&lt;br /&gt;
&lt;br /&gt;
To make deciphering stack traces easier, you can also click the '''Seestack''' button at the top of the stack trace window. This will send the stack trace to a service that will analyze the trace and attempt to tell you where you need to focus.&lt;br /&gt;
&lt;br /&gt;
===Viewing Metrics over Time===&lt;br /&gt;
If you want to watch how response times and memory utilization in a more granular manner than the dashboard graphs show, you'll want to click the '''Counters''' button at the top of SeeFusion. Once on the Counters page you can select a time interval, then have Seefusion display performance metrics at the interval you selected. This is helpful to ensure requests are completing quickly and not exhausting ColdFusion's memory.&lt;br /&gt;
&lt;br /&gt;
==How to Wrap Your ColdFusion DSN with Seefusion==&lt;br /&gt;
If you wish to have Seefusion monitor your server's query activity, you'll need to &amp;quot;wrap&amp;quot; your DSN with SeeFusion's JDBC driver so Seefusion can monitor the DSN's activity. &lt;br /&gt;
===Install SeeDSN===&lt;br /&gt;
SeeDSN is a plugin for ColdFusion Administrator that makes it easy to wrap a DSN with Seefusion. Follow these directions to install SeeDSN:&lt;br /&gt;
#Download the SeeDSN archive [http://www.seefusion.com/seedsn_v1.1.zip here].&lt;br /&gt;
#Extract the '''seedsn''' folder within the archive to your '''/CFIDE/Administrator/''' folder. This means it will be located at ''/CFIDE/Administrator/seedsn'' once extracted. &lt;br /&gt;
#Move ''/CFIDE/Administrator/seedsn/custommenu.xml'' to ''/CFIDE/Administrator/custommenu.xml''&lt;br /&gt;
===Add Seefusion.jar to the ColdFusion Classpath===&lt;br /&gt;
In order for ColdFusion to use Seefusion's JDBC driver, you'll need to ensure '''seefusion.jar''' is on your ColdFusion class path. Follow these directions to add seefusion.jar to the Coldfusion class path:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Click the '''Java and JVM''' link on the left, under Server Settings.&lt;br /&gt;
#In the box labeled '''ColdFusion Class Path''' add the path to your '''seefusion.jar''' file and click ''Submit Changes''. For example, if it is located in ColdFusion's &amp;quot;WEB-INF\lib&amp;quot; folder, you can add this to the Class Path: '''{application.home}/wwwroot/WEB-INF/lib/seefusion.jar'''. &lt;br /&gt;
#*Each path in the ColdFusion Class Path is separated by a comma, so be sure to add a comma right before the path to seefusion.jar (do not add any spaces).&lt;br /&gt;
#Restart ColdFusion after modifying the class path&lt;br /&gt;
&lt;br /&gt;
===Wrap a DSN using SeeDSN===&lt;br /&gt;
Once you've installed SeeDSN and restarted ColdFusion, you can wrap a DSN with the SeeFusion JDBC driver. Follow these instructions to do so: &lt;br /&gt;
#Log into ColdFusion Administrator&lt;br /&gt;
#Expand the ''SeeFusion'' navigation menu on the left and click '''Datasource Wrapper'''&lt;br /&gt;
#On the ''Datasource Wrapper'' page, you'll see a list of DSNs on your server. To wrap a DSN, click the ''Start'' [[File:Start.png]] icon next to your DSN. SeeDSN will automatically wrap your DSN with the SeeFusion driver and display '''OK''' if it is successful.&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/ WebApper Blog - Using SeeDSN JDBC Wrapping Tool]&lt;br /&gt;
&lt;br /&gt;
==Using fckEditor on ColdFusion 10 or Higher==&lt;br /&gt;
When getting the following error for fckEditor:&lt;br /&gt;
 '''&amp;quot;The server didn't reply with a proper XML data. Please check your configuration.&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
If you are on a ColdFusion 10+ server this will be cause by the '''FileUpload()''' function that is being used.&lt;br /&gt;
In ColdFusion 10+ ''FileUpload'' is a built-in function name, so you'll need to rename the ''FileUpload'' function used in fckeditor.&lt;br /&gt;
You can update the text for fckeditor by changing all instances of &amp;quot;FileUpload&amp;quot; to &amp;quot;fckFileUpload&amp;quot; to remove this conflict.&lt;br /&gt;
&lt;br /&gt;
==Optimze CFIMAGE Rendering in Three Steps==&lt;br /&gt;
===USE===&lt;br /&gt;
When full size images are required, re-sized images need to be used for displaying smaller images or thumbnails and the application needs to perform at optimal speed for displaying images in a browser. &lt;br /&gt;
&lt;br /&gt;
===KEY POINTS===&lt;br /&gt;
Except for during development cfimage '''action=&amp;quot;writeToBrowser&amp;quot;''' should not be used to display images.&lt;br /&gt;
Use CFIMAGE to resize images ''ONCE'', if possible during upload but if page timeouts make this impossible break up the task by using a CFC to check and re-size images as needed.&lt;br /&gt;
&lt;br /&gt;
===SUMMARY===&lt;br /&gt;
Those sites that display many images often times also upload many photos via form or via FTP and need to display both the FULL size images and smaller images for thumb nails or ''(small, med, large)'' optional sizes. The process of uploading images using CFFile can impose time constraints specifically for large files, or if the coldfusion page timeouts are set lower than is possible for large file upload and re-size jobs. To overcome this issue we can write a simple CFC for resizing the images after the upload is complete and the page is run for the first time. This will be ideal for either form based upload or FTP upload making this solution very versatile. &lt;br /&gt;
&lt;br /&gt;
====Step 1 - Create the CFC for re-sizing and writing images to disk====&lt;br /&gt;
&lt;br /&gt;
Create file &amp;quot;GetResizedImage.cfc&amp;quot; in the directory with the CFM files that display images.&lt;br /&gt;
Use the code below for the contents of this file and modify as needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;GetImage&amp;quot; hint=&amp;quot;Re-sizes images for display in album&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the image path where photos exist ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset imgpath = &amp;quot;imgdir/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the domain path, allows reuse resized images on other sites ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset domain = &amp;quot;domain.com&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Re-writes image extension if for alternates of JPG, and adds _resized to differentiate from fullsize images ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset rfile= &amp;quot;#REReplace(&amp;quot;#img#&amp;quot;,&amp;quot;.(jpg|JPG|JPEG|jpeg)&amp;quot;,&amp;quot;_resized.jpg&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Checks if file is already resized ---&amp;gt;&lt;br /&gt;
        &amp;lt;cfif FileExists(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp;&amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#rfile#&amp;quot;)&amp;gt;&lt;br /&gt;
           &amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;!--- Resizes image if it has not been done already ---&amp;gt;&lt;br /&gt;
            &amp;lt;cfset myImage=ImageNew(URLDecode(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp; &amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#img#&amp;quot;))&amp;gt;&lt;br /&gt;
                    &amp;lt;cfset ImageResize(myImage,&amp;quot;175&amp;quot;,&amp;quot;175&amp;quot;,&amp;quot;bilinear&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;!--- Saves image, and to eliminate problems with url friendly encoding when getting our images re-replace %20 with no-space ---&amp;gt;&lt;br /&gt;
                    &amp;lt;cfimage source=&amp;quot;#myImage#&amp;quot; action=&amp;quot;write&amp;quot; overwrite=true destination=&amp;quot;d:\home\#domain#\wwwroot\#imgpath##REReplace(&amp;quot;#rfile#&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot; &amp;quot;,&amp;quot;ALL&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the new path for the image for browser output ---&amp;gt;&lt;br /&gt;
			&amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;!--- Return the image variable ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfreturn myImage&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2 - Invoke the CFC====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Generate image name from query ---&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput query=&amp;quot;MyEvent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Invoke CFC to check if resized image exists, if not resize and output URL for resized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvoke component=&amp;quot;GetResizedImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare what part of the CFC handles checking / getting the image ---&amp;gt;&lt;br /&gt;
	method=&amp;quot;GetImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare variable that will pass back the new image name ---&amp;gt;&lt;br /&gt;
	returnvariable=&amp;quot;myImage&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvokeargument name=&amp;quot;img&amp;quot; value=&amp;quot;#event.Pic#&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&amp;lt;!--- Display re-sized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;img src=&amp;quot;#myImage#&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;     &lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 3 - Test====&lt;br /&gt;
The proposed solution cut page load times from 20+ seconds to below one second after the first page load. During the FIRST or FIRST FEW times the page loads all the re-sizing will be done.&lt;br /&gt;
&lt;br /&gt;
===Q and A===&lt;br /&gt;
'''Question''': Checking if a file exists each time the page loads is excessive.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Answer''': We agree but it's much better than resizing every image each time the page loads.&lt;br /&gt;
&lt;br /&gt;
==How to create Services for Additional ColdFusion Instances==&lt;br /&gt;
If you've created additional ColdFusion instances on your VPS/Dedicated Server, and ColdFusion was unable to create the Services for those instances just do the following:&lt;br /&gt;
&lt;br /&gt;
#Open a Command Prompt as Administrator&lt;br /&gt;
#Run this command, replacing INSTANCE with the actual name of your new ColdFusion instance: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;sc create &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; binPath= &amp;quot;C:\ColdFusion10\INSTANCE\bin\coldfusionsvc.exe&amp;quot; displayname= &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; start= auto&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start your instance through the Windows Services Manager. If you need to know how to create additional ColdFusion instances, please see this guide from Adobe: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSAB4367BA-6D91-4c69-8DBA-E2839394658A.html Defining Additional ColdFusion Instances]&lt;br /&gt;
&lt;br /&gt;
Once you've created the instances, you can attach them to your Web server as described here: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363a5d-7ffc.html Web Server Configuration]&lt;br /&gt;
&lt;br /&gt;
If you're using IIS, this video has a great walkthrough for using the ColdFusion Web Server Connector tool: [http://blogs.coldfusion.com/post.cfm/video-learn-about-iis-connectors-in-coldfusion10 Learn About ColdFusion IIS Connectors]&lt;br /&gt;
&lt;br /&gt;
==How to Fix Error: Value '0000-00-00' can not be represented as java.sql.Date==&lt;br /&gt;
If your application has null values in a MySQL datetime/date column you may encounter the error &amp;quot;Value '0000-00-00' can not be represented as java.sql.Date&amp;quot;. The easiest way to fix this is by adding the parameter '''zeroDateTimeBehavior=convertToNull''' to your site's DSN [http://helpx.adobe.com/coldfusion/kb/mysql-error-java-sql-sqlexception.html as recommended by Adobe].&lt;br /&gt;
===How to Fix Null DateTime Error - '''Shared Hosting'''===&lt;br /&gt;
#Log into your site's WCP control panel&lt;br /&gt;
#Click the ''DataSources (DSNs)'' button&lt;br /&gt;
#Click the ''Edit'' icon next to your DataSource (DSN)&lt;br /&gt;
#Add the following to the '''JDBC Query Parameters''' field: &amp;lt;pre&amp;gt;zeroDateTimeBehavior=convertToNull&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' To add multiple JDBC Query Parameters, separate each name/value pair by an ''''&amp;amp;''''. &lt;br /&gt;
''Example: zeroDateTimeBehavior=convertToNull&amp;amp;characterEncoding=UTF-8''&lt;br /&gt;
===How to Fix Null DateTime Error - '''VPS Hosting'''===&lt;br /&gt;
If your site uses WCP to manage its DSNs, you may utilize the Shared Hosting solution. Otherwise, follow the steps below:&lt;br /&gt;
#Log into ColdFusion Administrator on your VPS/Dedicated Server. &lt;br /&gt;
#Navigate to the &amp;quot;Data Sources&amp;quot; page and click your site's DSN name.&lt;br /&gt;
#On the page that opens add '''?zeroDateTimeBehavior=convertToNull''' to the end of the JDBC URL field.&lt;br /&gt;
#Click '''Submit''' and your site should no longer display the date representation error.&lt;br /&gt;
&lt;br /&gt;
==Find the Java Version Used by ColdFusion or Railo==&lt;br /&gt;
This CFML code will report the version of Java used by your ColdFusion or Railo server:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;#CreateObject(&amp;quot;java&amp;quot;, &amp;quot;java.lang.System&amp;quot;).getProperty(&amp;quot;java.version&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference:''' [http://www.petefreitag.com/item/743.cfm Pete Freitag's Blog - What Version of Java is ColdFusion Using?]&lt;br /&gt;
&lt;br /&gt;
==Reset ColdFusion Admin Password on CF 10+ VPS==&lt;br /&gt;
===Reset CF Admin Password - Windows VPS===&lt;br /&gt;
*On your VPS, open a command prompt window as Administrator&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.bat'' script: &amp;lt;pre&amp;gt;.\passwordreset.bat&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===Reset CF Admin Password - cPanel/Linux VPS===&lt;br /&gt;
*SSH into your VPS&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd /opt/ColdFusion10/cfusion/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.sh'' script: &amp;lt;pre&amp;gt;./passwordreset.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===HTML5 Audio Player with Coldfusion===&lt;br /&gt;
This player uses an list named ''Tunes'' within the ''session'' scope to store a list of mp3 names. After populating the list, you can use this code as the foundation for an HTML audio player that plays each song in the list.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfif action is &amp;quot;play_next_tune&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfset myArray=ListtoArray(session.Tunes)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset T_max=Arraylen(myArray)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset session.track=session.track+1&amp;gt;&lt;br /&gt;
	&amp;lt;cfif session.track GT T_max&amp;gt;&lt;br /&gt;
		 &amp;lt;cfset session.track=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
		 &amp;lt;cflocation url=&amp;quot;tunespage.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
		&amp;lt;audio controls id=&amp;quot;myVideo&amp;quot; autoplay&amp;gt;&lt;br /&gt;
		&amp;lt;source src=&amp;quot;path/#myarray[session.track]#&amp;quot; type=&amp;quot;audio/mpeg&amp;quot;&amp;gt;&lt;br /&gt;
		Your browser does not support the audio element.&lt;br /&gt;
		&amp;lt;/audio&amp;gt;&lt;br /&gt;
	&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
		document.getElementById('myVideo').addEventListener(&amp;quot;ended&amp;quot;,function() {&lt;br /&gt;
		window.location.href=&amp;quot;tunespage.cfm?action=play_next_tune&amp;quot;;&lt;br /&gt;
		});&lt;br /&gt;
	&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Enable_Detailed_Errors&amp;diff=2317</id>
		<title>Enable Detailed Errors</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Enable_Detailed_Errors&amp;diff=2317"/>
				<updated>2014-11-10T18:41:21Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==How to enable detailed errors (ColdFusion, Railo, .Net) on IIS 7+ (Windows 2008 and 2012)==&lt;br /&gt;
&lt;br /&gt;
*Edit or create the file '''web.config''' within the folder in which detailed errors should be enabled.&lt;br /&gt;
*Add the following:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;configuration&amp;gt;&lt;br /&gt;
    &amp;lt;system.webServer&amp;gt;&lt;br /&gt;
       &amp;lt;httpErrors errorMode=&amp;quot;Detailed&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/system.webServer&amp;gt;&lt;br /&gt;
 &amp;lt;/configuration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE:  If any of the above sections already exist in the '''web.config&amp;quot;''' file, edit the existing sections.  '''Do not duplicate'''.&lt;br /&gt;
&lt;br /&gt;
*To re-enable custom errors (or non-detailed errors), update the '''web.config''' file changing the '''errorMode''' attribute from '''Detailed''' to '''Custom'''.&lt;br /&gt;
&lt;br /&gt;
==How do I enable / disable Robust Exception Information on my site?==&lt;br /&gt;
To enable Robust Exception Information on a ColdFusion site, you will need to add the following to the top of your Application.cfc file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;cfset this.enablerobustexception = true /&amp;gt;&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
However, if the site is on a server with Robust Exception Information enabled, and you wish to disable Robust Exception Information, add this to the site's Application.cfc:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;cfset this.enablerobustexception = false /&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==How to enable Railo Debugging==&lt;br /&gt;
===Enable Railo Debug Logging===&lt;br /&gt;
To enable Railo debug logging do the following: &lt;br /&gt;
*Log-in to your site's Railo Web Administrator through your control panel. &lt;br /&gt;
*Click the ''Debugging -&amp;gt; Settings'' link in the left-hand navigation menu&lt;br /&gt;
*On the next page, select the ''Yes'' radio button and select the type of details you want logged. &amp;lt;br /&amp;gt; [[File:Railo-debug-log.png]]&lt;br /&gt;
*Click ''Update'' to save your changes.&lt;br /&gt;
&lt;br /&gt;
Debug info will be logged to the log files accessible within the Railo Web Administrator. To see the debug output on your site, you'll need to create a debug output template as shown below.&lt;br /&gt;
===Enable Railo Debug Output Template===&lt;br /&gt;
To enable Railo debug output,  you'll need to create a debug template:&lt;br /&gt;
*Log-in to your site's Railo Web Administrator through your control panel. &lt;br /&gt;
*Click the ''Debugging -&amp;gt; Templates'' link in the left-hand navigation menu&lt;br /&gt;
*On the next page enter a ''Label'' for the new template, select the type of template you want (''Classic, Comment, or Modern'') then click ''Create''. &amp;lt;br /&amp;gt; [[File:Railo-debug-output1.png]]&lt;br /&gt;
*On the next page, you can choose the type of output you want, and you can also restrict the debug output to only be shown to a set of IP addresses.  &amp;lt;br /&amp;gt; [[File:Railo-debug-output2.png]]&lt;br /&gt;
*Click ''submit'' to save your changes.&lt;br /&gt;
&lt;br /&gt;
Now you'll see debug output for the pages on your site. &lt;br /&gt;
[[Category:Windows]]&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:Railo]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Railo-debug-output2.png&amp;diff=2316</id>
		<title>File:Railo-debug-output2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Railo-debug-output2.png&amp;diff=2316"/>
				<updated>2014-11-10T18:39:48Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Railo-debug-output1.png&amp;diff=2315</id>
		<title>File:Railo-debug-output1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Railo-debug-output1.png&amp;diff=2315"/>
				<updated>2014-11-10T18:35:36Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: Jakeh uploaded a new version of &amp;amp;quot;File:Railo-debug-output1.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Railo-debug-output1.png&amp;diff=2314</id>
		<title>File:Railo-debug-output1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Railo-debug-output1.png&amp;diff=2314"/>
				<updated>2014-11-10T18:34:03Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Railo-debug-log.png&amp;diff=2313</id>
		<title>File:Railo-debug-log.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Railo-debug-log.png&amp;diff=2313"/>
				<updated>2014-11-10T18:27:03Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Java_Server_Pages_-_.jsp&amp;diff=2312</id>
		<title>Java Server Pages - .jsp</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Java_Server_Pages_-_.jsp&amp;diff=2312"/>
				<updated>2014-11-10T16:12:52Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* ColdFusion 10 and Lower */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==JSP Support==&lt;br /&gt;
===Railo===&lt;br /&gt;
On our Railo hosting plans (Windows and Linux) we support .jsp (Java Server Pages). Tomcat is the servlet container for this CFML engine.&lt;br /&gt;
&lt;br /&gt;
===ColdFusion===&lt;br /&gt;
On our Windows and Linux ColdFusion plans, JSP is not supported.&lt;br /&gt;
&lt;br /&gt;
==Sample Code==&lt;br /&gt;
Here is a small sample .jsp code snippet that has been verified on the servers:&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;%@ page language=&amp;quot;java&amp;quot; %&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Property Names&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Property Values&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;%&lt;br /&gt;
final String[] properties = {&lt;br /&gt;
&amp;quot;java.runtime.name&amp;quot;,&lt;br /&gt;
&amp;quot;java.vm.vendor&amp;quot;,&lt;br /&gt;
&amp;quot;java.runtime.version&amp;quot;,&lt;br /&gt;
&amp;quot;java.vendor.url&amp;quot;,&lt;br /&gt;
&amp;quot;user.timezone&amp;quot;,&lt;br /&gt;
&amp;quot;user.language&amp;quot;,&lt;br /&gt;
&amp;quot;os.name&amp;quot;,&lt;br /&gt;
&amp;quot;sun.desktop&amp;quot;&lt;br /&gt;
};&lt;br /&gt;
for (int i = 0; i &amp;lt; properties.length; i++) {&lt;br /&gt;
String pname = properties[i];&lt;br /&gt;
String pvalue = System.getProperty(pname);&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= pname %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;%= pvalue %&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;% } %&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2311</id>
		<title>ColdFusion Tips &amp; Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2311"/>
				<updated>2014-11-06T23:25:29Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Converting Application.cfm to Application.cfc==&lt;br /&gt;
Using an '''Application.cfc''' configuration file offers some advantages over the older style '''Application.cfm''' configuration files. Some of the main features that an Application.cfc file give you are &amp;quot;functions triggered by Application, Session, Request, and Error events&amp;quot; and &amp;quot;Application-Level Mappings and Custom Tag Paths&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are only a few steps required to convert an application to use an Application.cfc file:&lt;br /&gt;
&lt;br /&gt;
NOTE: You should ensure that you have a backup of any files before making changes to them.&lt;br /&gt;
&lt;br /&gt;
===Create an '''Application.cfc''' file===&lt;br /&gt;
&lt;br /&gt;
Below is an example '''Application.cfc''' file with the minimum requirements:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Setup '''onRequest''' function in '''Application.cfc''' to include the '''Application.cfm''' file&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if an Application.cfm file already exists in the root of the application. Below is what the Application.cfc file will look like after this addition:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = hash( getCurrentTemplatePath() ); // unique app name&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Copy application settings from the '''cfapplication''' tag and remove the '''cfapplication''' tag===&lt;br /&gt;
&lt;br /&gt;
This step is only necessary if a cfapplication tag is used within the application. Each attribute of the cfapplication tag will need to be copied into the cfscript section at the top of the Application.cfc with the pattern [this.attributeName = &amp;quot;value&amp;quot;;].&lt;br /&gt;
&lt;br /&gt;
For example. The below cfapplication tag would be converted into our Application.cfc example as follows:&lt;br /&gt;
&lt;br /&gt;
'''cfapplication''' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication&lt;br /&gt;
	name = &amp;quot;my_app_name&amp;quot;&lt;br /&gt;
	sessionManagement = &amp;quot;Yes&amp;quot;&lt;br /&gt;
	sessionTimeout = &amp;quot;#createTimeSpan(0,0,20,0)#&amp;quot;&lt;br /&gt;
	setClientCookies = &amp;quot;Yes&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Application.cfc''':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cfscript&amp;gt;&lt;br /&gt;
		this.name = &amp;quot;my_app_name&amp;quot;; // app name from old cfapplication tag&lt;br /&gt;
		this.sessionManagement = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
		this.sessionTimeout = CreateTimeSpan(0,0,20,0);&lt;br /&gt;
		this.setClientCookies = &amp;quot;Yes&amp;quot;;&lt;br /&gt;
	&amp;lt;/cfscript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;onRequest&amp;quot; returnType=&amp;quot;void&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfargument name=&amp;quot;targetPage&amp;quot; type=&amp;quot;string&amp;quot; required=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include Application.cfm ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;Application.cfm&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;!--- Include the requested page ---&amp;gt;&lt;br /&gt;
		&amp;lt;cfinclude template=&amp;quot;#ARGUMENTS.targetPage#&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Do not forget to remove the '''cfapplication''' tag after copying the settings into the '''Application.cfc''' file.&lt;br /&gt;
&lt;br /&gt;
Now that the change is complete, this is a good time to test the application to ensure everything is working correctly with the new setup.&lt;br /&gt;
&lt;br /&gt;
==Per-Application ColdFusion Mappings==&lt;br /&gt;
In ColdFusion 8 and above, it is possible to create per-application mappings through your site's Application.cfc file. If you wish to convert to using an Application.cfc file, follow the steps [[ColdFusion_Tips_%26_Tricks#Converting_Application.cfm_to_Application|here]]. &lt;br /&gt;
&lt;br /&gt;
Once you have your Application.cfc created, you will insert the following line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.mappings[&amp;quot;/test&amp;quot;]=&amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On your site though, you would change &amp;quot;/test&amp;quot; to the name of your mapping. IMPORTANT: You need to include the forward slash before the name of your mapping. Also, change &amp;quot;d:\home\yourdomainname.com\wwwroot\test&amp;quot; to the full physical path to the folder you wish to map. &lt;br /&gt;
'''Note''': The physical path to your FTP root is listed in the &amp;quot;Site Settings&amp;quot; of your control panel at wcp.hostek.com.&lt;br /&gt;
&lt;br /&gt;
To call a template named &amp;quot;testing.cfm&amp;quot; in the &amp;quot;test&amp;quot; directory we just mapped, you would use this line: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;/test/testing.cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Per-Application Custom Tag Paths==&lt;br /&gt;
Starting in ColdFusion 8, ColdFusion allows creation of Custom Tag Paths in each site's Application.cfc file. This allows you to create and manage your Custom Tag Paths without having to use CF Administrator (ie. submit a support ticket). The following steps will help you create a Custom Tag Path:&lt;br /&gt;
&lt;br /&gt;
If you do not already have an Application.cfc file in your site's Web root, create one now.&lt;br /&gt;
Place the following code in the Application.cfc file and save:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=&amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this case, you'd replace &amp;quot;yourdomain.com&amp;quot; with your domain name, and &amp;quot;customtagfolder&amp;quot; with the name of the folder you created for your custom tags. &lt;br /&gt;
&lt;br /&gt;
Now you have successfully added your custom tag path. If you have multiple tag paths to add, try using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.customtagpaths=ListAppend(THIS.customtagpaths, &amp;quot;d:\home\yourdomain.com\wwwroot\customtagfolder&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Per-application Robust Exception Information Settings==&lt;br /&gt;
To enable Robust Exception Information on a ColdFusion application, you will need to add the following to the top of the site's ''Application.cfc'' file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = true /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Alternatively, if you wish to ensure Robust Exception Information is ''always'' disabled for an application, add this to the site's ''Application.cfc'':&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&amp;lt;cfset this.enablerobustexception = false /&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' If your site uses ''Application.'''cfm''''' instead of ''Application.'''cfc''''', just add the above code to the top of the CFML template generating an error.&lt;br /&gt;
&lt;br /&gt;
==Per-application JSON Prefix==&lt;br /&gt;
To enable the JSON Prefix for your application add the following to the site's '''Application.cfc''' file, and adjust the '''secureJSONPrefix''' as desired:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = true&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSONPrefix = &amp;quot;//&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can disable this feature using the following code instead:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset this.secureJSON = false&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Restart a ColdFusion Application==&lt;br /&gt;
If you ever need to restart your site's ColdFusion application (to pick up a setting change, etc), you can do so via the ApplicationStop() function in ColdFusion 9+. &lt;br /&gt;
&lt;br /&gt;
To use this you can create a file (ex: restart.cfm) containing the following code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset ApplicationStop() /&amp;gt;&lt;br /&gt;
&amp;lt;cflocation url=&amp;quot;index.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When you run the file containing that code your ColdFusion Application will be stopped (flushing your application scope), and when the browser is redirected to the index page the application will start again.&lt;br /&gt;
==CFHTTP Connection Failures over HTTPS==&lt;br /&gt;
===Fixing cfhttp Failures on Shared Hosting===&lt;br /&gt;
If you try to use &amp;lt;cfhttp&amp;gt; to connect to a secure site (over HTTPS), you may receive the following error: &amp;quot;Connection Failure: Status code unavailable&amp;quot;&lt;br /&gt;
&lt;br /&gt;
To fix this add the following code to your site's &amp;quot;Application.cfm&amp;quot; file (below the 'cfapplication' tag):&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- fix for HTTPS connection failures ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif NOT isDefined(&amp;quot;Application.sslfix&amp;quot;)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity = createObject(&amp;quot;java&amp;quot;, &amp;quot;java.security.Security&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset objSecurity.removeProvider(&amp;quot;JsafeJCE&amp;quot;) /&amp;gt;&lt;br /&gt;
	&amp;lt;cfset Application.sslfix = true /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If your site uses an &amp;quot;Application.cfc&amp;quot; file instead, then just place that code in the &amp;quot;'onApplicationStart()&amp;quot; method of that file. After making that adjustment you'll need to restart your ColdFusion application as [[ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application|shown here]]. If you still run into issues though, you will need to [https://support.hostek.com/ submit a support ticket] asking our team to install the remote site's SSL certificate into ColdFusion's Java Certificate Store.&lt;br /&gt;
&lt;br /&gt;
===Fixing cfhttp Failures on VPS Hosting===&lt;br /&gt;
If you are having issues connecting to a site or file from with ColdFusion over HTTPS, you can import the remote site's SSL certificate into the the Java SSL Certificate Store used by ColdFusion.&lt;br /&gt;
====Fixing cfhttp Connection Failures with Keytool====&lt;br /&gt;
'''1) Set Java environment'''&amp;lt;br&amp;gt;&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable in the next command. For '''example''', you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
In that case, you would use '''C:\ColdFusion10\jre''' as the value of JAVA_HOME as shown below. Open a command prompt and issue the following commands:&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set JAVA_HOME=C:\ColdFusion10\jre&lt;br /&gt;
    C:\ColdFusion10\jre&amp;gt;set PATH=%PATH%;%JAVA_HOME%\bin&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, use the following commands (case-sensitive) in your terminal:&lt;br /&gt;
This '''example''' assumes that the JRE is located at ''/opt/coldfusion10/jre''&lt;br /&gt;
    export JAVA_HOME=/opt/coldfusion10/jre&lt;br /&gt;
    export PATH=$PATH:/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
'''2) List the Keystore Contents'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your Java installation is at ''C:\ColdFusion10\jre'', then navigate to '''C:\ColdFusion10\jre\bin''':&lt;br /&gt;
    cd C:\ColdFusion10\jre\bin&lt;br /&gt;
If you're using a '''Linux/cPanel''' server, use this command instead:&lt;br /&gt;
    cd /opt/coldfusion10/jre/bin&lt;br /&gt;
&lt;br /&gt;
Now you can list the keystore contents ''(Windows &amp;amp; Linux)'':&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 76 entries&lt;br /&gt;
&lt;br /&gt;
'''3) Import certificate in to keystore and list to check added '''&amp;lt;br&amp;gt;&lt;br /&gt;
''(assumes you've downloaded the certificate to '''c:\temp\inet.cer''' (Windows) or '''/temp/inet.cer''' (Linux/cPanel)''&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file c:\temp\inet.cer&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
    keytool -importcert -storepass changeit -alias inet -keystore ../lib/security/cacerts -trustcacerts -file /temp/inet.cer&lt;br /&gt;
    Trust this certificate? [no]: y&lt;br /&gt;
    Certificate was added to keystore&lt;br /&gt;
&lt;br /&gt;
Now verify the keystore contains your new certificate&lt;br /&gt;
    keytool -list -storepass changeit -keystore ../lib/security/cacerts&lt;br /&gt;
Example output:&lt;br /&gt;
    Keystore type: JKS&lt;br /&gt;
    Keystore provider: SUN&lt;br /&gt;
    Your keystore contains 77 entries&lt;br /&gt;
&lt;br /&gt;
'''4) Restart the ColdFusion application service so the keystore is re-read.'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''5) Run your cfhttp request - HTTPS works now!'''&lt;br /&gt;
&lt;br /&gt;
====Fixing cfhttp Connection Failures with Portecle====&lt;br /&gt;
If you'd rather import certificates into the Java SSL Keystore through a GUI, follow these directions to use a tool named Portecle to do so:&lt;br /&gt;
&lt;br /&gt;
#Ensure your JAVA_HOME variable is set correctly as described above.&lt;br /&gt;
#Download Portecle from Sourceforge: [http://sourceforge.net/projects/portecle/ Portecle Project Homepage]&lt;br /&gt;
#Extract the files&lt;br /&gt;
#Open a Command Prompt and navigate to the extracted directory&lt;br /&gt;
#Issue this command to launch Portecle: &amp;lt;pre&amp;gt;java -jar portecle.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#In Notepad, open your jvm.config file to find the JVM PATH for ColdFusion's JVM; look for '''java.home={path here}'''&lt;br /&gt;
#In Portecle click ''File'', ''Open Keystore File''&lt;br /&gt;
#Browse to {JVM PATH}\jre\lib\security to the path, and open the cacerts file; Enter Password: '''changeit'''&lt;br /&gt;
#Click on '''Tools''', '''Import Trusted Certificate''', select the certificate you wish to import.&lt;br /&gt;
#*To obtain the certificate, you can navigate in a browser to the site where the certificate resides, then download the certificate to a CER (X.509 format) file through the browser.&lt;br /&gt;
#Click '''OK''' to import and '''YES''' to accept the certificate as ''trusted''.&lt;br /&gt;
#Click OK again, usually you won't need to change the Alias name;click OK to finish.&lt;br /&gt;
#Click '''File''', '''Save Keystore'''.&lt;br /&gt;
Close Portecle.&lt;br /&gt;
====Fixing CFHTTP Failures Related to Cached DNS Records====&lt;br /&gt;
This solution will prevent Java from caching DNS records for the life of the ColdFusion process. Instead, Java will refresh its records periodically.&lt;br /&gt;
&lt;br /&gt;
First, you'll need to find the version of Java being used by ColdFusion. To do this, open the jvm.config for your server. Depending on your server's version of ColdFusion, that file is at one of the following locations:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 single-instance''': C:\ColdFusion9\runtime\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 9 multi-instance''': C:\ColdFusion9\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
'''ColdFusion 10''': C:\ColdFusion10\cfusion\bin&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' If your server is a '''Linux/cPanel''' server, the jvm.config file will be in one of the following locations:&lt;br /&gt;
'''ColdFusion 9''': /usr/local/coldfusion9/bin&lt;br /&gt;
'''ColdFusion 10''': /opt/coldfusion10/cfusion/bin&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Once opened, look for &amp;quot;java.home&amp;quot; at toward the top of the ''jvm.config'' file. You use the value of that variable to find the location of the Java installation used by ColdFusion. &lt;br /&gt;
&lt;br /&gt;
For '''example''', on '''Windows''' you may see this:&lt;br /&gt;
    java.home=C:\\ColdFusion10\\jre&lt;br /&gt;
On '''Linux''' you may see this:&lt;br /&gt;
    java.home=/opt/coldfusion10/jre&lt;br /&gt;
&lt;br /&gt;
Navigate to the '''security''' folder within the Java installation used by ColdFusion. For '''example''':&amp;lt;br&amp;gt;&lt;br /&gt;
'''Windows''' ''(open in Windows Explorer)''&lt;br /&gt;
    C:\ColdFusion10\jre\lib\security\&lt;br /&gt;
'''Linux\cPanel'''&lt;br /&gt;
    cd /opt/coldfusion10/jre/lib/security/&lt;br /&gt;
&lt;br /&gt;
Back-up, then edit the '''java.security''' file within that folder and change the following line:&amp;lt;br&amp;gt;&lt;br /&gt;
'''From'''&lt;br /&gt;
    #networkaddress.cache.ttl=-1&lt;br /&gt;
'''To'''&lt;br /&gt;
    networkaddress.cache.ttl=600&lt;br /&gt;
&lt;br /&gt;
''Note:'' The above value refreshes DNS records every 600 seconds ''(10 minutes)''. You may adjust it to whatever you feel is appropriate for your server.&lt;br /&gt;
&lt;br /&gt;
Now '''Save''' the file then '''Restart ColdFusion''', and the new DNS caching setting will take effect.&lt;br /&gt;
&lt;br /&gt;
==CFMAIL Multi-Part Emails==&lt;br /&gt;
Sending emails with both Text and HTML parts helps reduce the chance of your messages getting caught by a mail server's spam filter. It also helps ensure your recipients can read the message regardless of the mail client being used. The easiest way to do this is to store your message in a variable using &amp;lt;cfsavecontent&amp;gt; then adding it to &amp;lt;cfmail&amp;gt; using &amp;lt;cfmailpart&amp;gt; as shown in the example below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Store your message in a variable ---&amp;gt;&lt;br /&gt;
&amp;lt;cfsavecontent variable=&amp;quot;myemailcontent&amp;quot;&amp;gt;&lt;br /&gt;
Hello,&lt;br /&gt;
&lt;br /&gt;
This is some plain text. &amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;And this is some more text in HTML. It will appear in plain-text for anyone who views the Text part of this email, though.&amp;lt;/b&amp;gt;&lt;br /&gt;
&amp;lt;/cfsavecontent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--- Function to strip HTML from message while preserving line breaks ---&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name= &amp;quot;textMessage&amp;quot; access= &amp;quot;public&amp;quot; returntype= &amp;quot;string&amp;quot; hint= &amp;quot;Converts an html email message into a nicely formatted with line breaks plain text message&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfargument name= &amp;quot;string&amp;quot; required= &amp;quot;true&amp;quot; type= &amp;quot;string&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfscript&amp;gt;&lt;br /&gt;
      var pattern = &amp;quot; &amp;lt;br&amp;gt;&amp;quot;;&lt;br /&gt;
      var CRLF = chr( 13) &amp;amp; chr( 10);&lt;br /&gt;
      var message = ReplaceNoCase(arguments.string, pattern, CRLF , &amp;quot;ALL&amp;quot;);&lt;br /&gt;
      pattern = &amp;quot;&amp;lt;[^&amp;gt;]*&amp;gt;&amp;quot;;&lt;br /&gt;
    &amp;lt;/cfscript&amp;gt;&lt;br /&gt;
    &amp;lt;cfreturn REReplaceNoCase(message, pattern, &amp;quot;&amp;quot; , &amp;quot;ALL&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;!--- Now send the email. When adding the Text part, we'll use the textMessage() function we just created to strip out HTML tags. ---&amp;gt;&lt;br /&gt;
&amp;lt;cfmail from=&amp;quot;sender@domain.com&amp;quot; to=&amp;quot;recipient@anotherdomain.com&amp;quot; subject=&amp;quot;Multi-part Email with CFMAIL&amp;quot; type=&amp;quot;html&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/plain&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#textmessage(myemailcontent)#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
    &amp;lt;cfmailpart type= &amp;quot;text/html&amp;quot; charset= &amp;quot;utf-8&amp;quot;&amp;gt;#myemailcontent#&amp;lt;/cfmailpart&amp;gt;&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reference: [http://cookbooks.adobe.com/post_CFMAIL_the_right_way-17875.html CFMAIL the right way]&lt;br /&gt;
&lt;br /&gt;
==Scheduling Tasks in ColdFusion==&lt;br /&gt;
On occasion shared ColdFusion hosting customers need to setup Scheduled Task to run files on a cycle. &lt;br /&gt;
&lt;br /&gt;
This can be done with the following steps, making use of ColdFusion's &amp;lt;cfschedule&amp;gt; tag:&lt;br /&gt;
&lt;br /&gt;
#Create a file locally using any text editor, save the file with the .CFM extension (example: setschedule_example.cfm).&lt;br /&gt;
#Copy and past in the code example below taken from ''ColdFusion's Documentation'' and save.&lt;br /&gt;
#Replace the data in the example note the following recommendations.&amp;lt;br /&amp;gt;!- Name each file made for creating a schedule with the name of the task so you can reference the task later if needed. Specific naming will also make it more difficult for someone to randomly run the file.&amp;lt;br /&amp;gt;!- If you need to schedule a job to run monthly on any date in the range 28-31, read about how ColdFusion will handle the scheduling in the ColdFuison8 documentation referenced below.&lt;br /&gt;
#Working example, the code example below is a working tested solution for getting the weather for a specific zip code and the task to email the results.&lt;br /&gt;
&lt;br /&gt;
'''Scheduled Task'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!-- This sets the initial task, if your just wanting to set the schedule --&amp;gt;&lt;br /&gt;
&amp;lt;cfschedule action = &amp;quot;update&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot; &lt;br /&gt;
    operation = &amp;quot;HTTPRequest&amp;quot;&lt;br /&gt;
    url = &amp;quot;http://test.hostek.net/weather_send.cfm&amp;quot;&lt;br /&gt;
    startDate = &amp;quot;7/6/09&amp;quot;&lt;br /&gt;
    startTime = &amp;quot;09:30 AM&amp;quot;&lt;br /&gt;
    interval = &amp;quot;3600&amp;quot;&lt;br /&gt;
    resolveURL = &amp;quot;Yes&amp;quot;&lt;br /&gt;
    requestTimeOut = &amp;quot;600&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task created to be deleted, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;delete&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task to be paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;pause&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- This allows for the task resumed if paused, just uncomment and change the task name. --&amp;gt;&lt;br /&gt;
&amp;lt;!-- cfschedule action = &amp;quot;resume&amp;quot;&lt;br /&gt;
    task = &amp;quot;Weather_Send&amp;quot;--&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Weather Collector'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;html xmlns=&amp;quot;http://www.w3.org/1999/xhtml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=utf-8&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;CF External Weather Checker&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfset zip=&amp;quot;12345&amp;quot;&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;cfinvoke webservice=&amp;quot;http://ws.cdyne.com/WeatherWS/Weather.asmx?wsdl&amp;quot; method=&amp;quot;getCityWeatherByZIP&amp;quot; returnvariable=&amp;quot;aWeatherReturn&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;cfinvokeargument name=&amp;quot;ZIP&amp;quot; value=&amp;quot;#zip#&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif aWeatherReturn.temperature EQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt; I cannot get the weather for #zip# external http connections must be DOWN.&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;cfset message=&amp;quot;The temperature for #zip# (Your city) is #aWeatherReturn.temperature# degrees.&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfif message NEQ &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;cfmail from = &amp;quot;weather.server@test.com&amp;quot; to = &amp;quot;test@test.com&amp;quot; subject = &amp;quot;Weather checker&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#message#&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfmail&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''More information on using CFSchedule'''&amp;lt;br&amp;gt;&lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/cfschedule Adobe ColdFusion Documentation - CFSchedule]&lt;br /&gt;
*[http://www.isummation.com/blog/configuring-coldfusion-scheduled-tasks-using-the-cfschedule-tag/ iSummation Blog - Configuring ColdFusion Scheduled Tasks using the CFSCHEDULE tag]&lt;br /&gt;
&lt;br /&gt;
==Session Management - Handling Bots and Spiders==&lt;br /&gt;
===Robots.txt File===&lt;br /&gt;
First and foremost we suggest creating a robots.txt file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time. Second to prevent specific bots from crawling the website. &lt;br /&gt;
&lt;br /&gt;
Please see our [[Robots|robots.txt article]] for more information on implementing a robots.txt on your site.&lt;br /&gt;
&lt;br /&gt;
===Lower Session Timeouts for Bots and Spiders===&lt;br /&gt;
Next we suggest setting your session timeout specifically lower for bots and spiders. These spiders and bots will crawl a page and when a session (ColdFusion) is created, it will persist during then entire page load. The page fully loaded allows the bot or spider to get the information from the Web page AND allows the session to expire quickly protecting ColdFusion from effects similar to a memory leak. &lt;br /&gt;
&lt;br /&gt;
To do this, implement the appropriate solution for your site below:&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfm'''====&lt;br /&gt;
Place this code at the top of your Application.cfm file:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
&amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset REQUEST.sessionTimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then use the '''REQUEST.sessionTimeout''' variable to specify the session timeout period in your '''cfapplication''' tag: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfapplication name=&amp;quot;myawesomeapp&amp;quot;&lt;br /&gt;
     sessionmanagement=&amp;quot;Yes&amp;quot;&lt;br /&gt;
     sessiontimeout=&amp;quot;#REQUEST.sessionTimeout#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (tag-based)====&lt;br /&gt;
If you primarily use cfml tags in your Application.cfc, you can set the Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- This checks if a cookie is created, for bots this will return false and use the low session timeout ---&amp;gt;&lt;br /&gt;
&amp;lt;cfif StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) or StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,30,0) /&amp;gt;&lt;br /&gt;
 &amp;lt;cfelse&amp;gt;&lt;br /&gt;
 &amp;lt;cfset this.sessiontimeout = CreateTimeSpan(0,0,0,2) /&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====If using '''Application.cfc''' (cfscript)====&lt;br /&gt;
If instead, you're using cfscipt in your Application.cfc, you'll set the custom Session Timeout like this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
// This checks if a cookie is created, for bots this will return false and use the low session timeout&lt;br /&gt;
if (StructKeyExists(cookie, &amp;quot;cfid&amp;quot;) || StructKeyExists(cookie, &amp;quot;jsessionid&amp;quot;)){&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,30,0);&lt;br /&gt;
} else {&lt;br /&gt;
this.sessionTimeout 	= createTimeSpan(0,0,0,2);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.bennadel.com/blog/1083-ColdFusion-Session-Management-And-Spiders-Bots.htm Session Management code examples for the Application.cfm]&lt;br /&gt;
&lt;br /&gt;
==Creating Client Variables Tables for MySQL Databases==&lt;br /&gt;
If you need your datasource set up as a ColdFusion Client Variables Store, you can enable the '''Client Variables'' option in your ColdFusion datasource within the WCP control panel. &lt;br /&gt;
&lt;br /&gt;
Please note, if your datasource MySQL DSN, you'll need to create the necessary tables prior to using the Client Variable Store. To do this you would need to create two tables, one named &amp;quot;cdata&amp;quot; and one named &amp;quot;cglobal&amp;quot;. The SQL you'd use to create those tables is below:&lt;br /&gt;
&lt;br /&gt;
Table: '''cdata'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
 CREATE TABLE IF NOT EXISTS cdata (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          app varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          PRIMARY KEY (cfid,app)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Table: '''cglobal'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;mysql&amp;quot;&amp;gt;&lt;br /&gt;
CREATE TABLE IF NOT EXISTS cglobal (&lt;br /&gt;
          cfid varchar(64) NOT NULL default '',&lt;br /&gt;
          data longtext NOT NULL,&lt;br /&gt;
          lvisit timestamp,&lt;br /&gt;
          KEY cfid (cfid),&lt;br /&gt;
          KEY lvisit (lvisit)&lt;br /&gt;
     );&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Output CF Error details without CFDump==&lt;br /&gt;
It is common in an error handler that you want to output all of the error details to the screen, a file, or an email. Therefore, the cfdump tag is commonly used for this; and, while this works well in development, it is not always the best practice on a production site because of the performance of the cfdump tag due to its use of reflection (Runtime type introspection).&lt;br /&gt;
&lt;br /&gt;
A better performing alternative is to output the information you want directly from the Error/Exception struct within a 'cfoutput' tag. This can be done by looking up the cferror structure or the cfcatch structure in the ColdFusion docs to see what is available and what values you might want to output:&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Error''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cferror&amp;lt;br /&amp;gt;&lt;br /&gt;
'''CFCatch''': https://wikidocs.adobe.com/wiki/display/coldfusionen/cfcatch&lt;br /&gt;
&lt;br /&gt;
===Cfdump Custom Tag Alternative===&lt;br /&gt;
You can also use the following link to download an example CF custom tag that will give a similar error output as when using the cfdump tag on an error variable:&amp;lt;br /&amp;gt;&lt;br /&gt;
[http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip http://hostek.com/tutorials/ColdFusion/CF_OutputError.zip]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the custom tag's usage:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the error handler specified in your 'cferror' tag:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cf_OutputError Error=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code would replace:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfdump var=&amp;quot;#Error#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, in a cfcatch block:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cftry&amp;gt;&lt;br /&gt;
   ...&lt;br /&gt;
&amp;lt;cfcatch&amp;gt;&lt;br /&gt;
   &amp;lt;cf_OutputCFCatch CFCatch=&amp;quot;#CFCatch#&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/cfcatch&amp;gt;&lt;br /&gt;
&amp;lt;/cftry&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Configure ColdFusion to Handle html and htm Files==&lt;br /&gt;
===Enable HTML/HTM as CFML on Shared Accounts===&lt;br /&gt;
On our ColdFusion servers, the best way to process HTML files (.html, .htm) as ColdFusion/CFML (.cfm files) is by using a set of rewrite rules that route the HTML files through a ColdFusion &amp;quot;controller&amp;quot; script. The main benefits of this approach are that it is easy to implement on a site-by-site basis, and it works with any version of ColdFusion. To implement this approach on your site, follow the steps below:&lt;br /&gt;
====Step 1: Add Rewrite Rules to Route HTML Files through the CFM Controller====&lt;br /&gt;
If you have a '.htaccess' file in your webroot, add the rules below to the top of that file. Otherwise, create a file named '.htaccess' in your site's web root and place these rules within it:&lt;br /&gt;
=====For Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.html   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.html htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====For Sites Using .HTM Files=====&lt;br /&gt;
'''NOTE:''' If your site uses ''.htm'' files instead of ''.html'' files, use this set of rules instead. The only difference is ''html'' is replaced with ''.htm''.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;apache&amp;quot;&amp;gt;&lt;br /&gt;
#Rewrite requests without script name to index.html&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^(.*) /index.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REDIRECT to change the address in the browser address bar&lt;br /&gt;
RewriteRule ^/htmlcontrol.cfm$   /$1.htm   [R]&lt;br /&gt;
&lt;br /&gt;
# REWRITE so that the correct page executes when /cart is the URL&lt;br /&gt;
RewriteRule ^(.*)\.htm htmlcontrol.cfm/?pageName=$1   [L]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 2: Create the ColdFusion Controller Script (htmlcontrol.cfm)====&lt;br /&gt;
Now we just need to create a ColdFusion script that will process the HTML files. To do this, create a file named '''htmlcontrol.cfm''' within your site's web root. Place this CFML code within the file:&lt;br /&gt;
=====CFML for Sites Using .HTML Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.html&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
=====CFML for Sites Using .HTM Files=====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfinclude template=&amp;quot;#URL.pageName#.htm&amp;quot; &amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you save the controller script, your site will begin processing any ColdFusion/CFML code within your HTML files.&lt;br /&gt;
===Enable HTML/HTM as CFML on a VPS===&lt;br /&gt;
In case you need to process ColdFusion code in your .htm or .html files, here is what you will need to do to get this to work. This is based on using ColdFusion on one of our dedicated server hosting accounts on a Windows server.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': This will affect every site on the server, so use cautiously.&lt;br /&gt;
&lt;br /&gt;
First, you will need to edit the web.xml file located generally at C:\ColdFusion10\cfusion\wwwroot\WEB-INF&lt;br /&gt;
&lt;br /&gt;
Open this file and look for '''coldfusion_mapping_1'''.&lt;br /&gt;
&lt;br /&gt;
Scroll down the file until you see the last number increment like:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;servlet-mapping id=&amp;quot;macromedia_mapping_15&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then add the following right below the closing &amp;lt;/servlet-mapping&amp;gt; of the last number increment item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_16&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_17&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.html/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_18&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
    &amp;lt;servlet-mapping id=&amp;quot;coldfusion_mapping_19&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;servlet-name&amp;gt;CfmServlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;*.htm/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save this file and exit.&lt;br /&gt;
&lt;br /&gt;
Now in IIS, setup a mapping for the site:&lt;br /&gt;
#In IIS 7+ click the server name section (right below the '''Start Page''' in the left-hand navigation), then double-click the '''Handler Mappings''' icon.&lt;br /&gt;
#Select and &amp;quot;edit&amp;quot; the '''*.cfm''' record and copy the value of &amp;quot;executable&amp;quot;. Now hit Cancel and then click '''Add Script Map'''. &lt;br /&gt;
#Paste the executable value copied from the '''*.cfm''' record and type '''*.htm''' into the '''Request Path''' and hit OK. &lt;br /&gt;
#Repeat the above steps to add a handler for '''*.html''' &lt;br /&gt;
&lt;br /&gt;
Lastly, open the '''uriworkermap.properties''' file for your ColdFusion 10 IIS Connector in a text editor such as Notepad. On a standard ColdFusion installation this is located at: &amp;lt;pre&amp;gt;C:\ColdFusion10\config\wsconfig\1\uriworkermap.properties&amp;lt;/pre&amp;gt;&lt;br /&gt;
Copy the following lines, paste them at the bottom of the file, then save and close the file: &amp;lt;pre&amp;gt;/*.html = cfusion&lt;br /&gt;
/*.htm = cfusion&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now restart the ColdFusion service and IIS. ColdFusion should begin processing CFML within htm/html files now.&lt;br /&gt;
&lt;br /&gt;
==Increase the ColdFusion Post Parameters Limit==&lt;br /&gt;
===ColdFusion 10===&lt;br /&gt;
In ColdFusion 10, you can easily increase the value of ColdFusion's '''postParametersLimit''' via the ColdFusion Administrator. Once logged into the ColdFusion Administrator, click the '''Settings''' link then scroll to the bottom of the page. Set the value for the Post Parameters Limit to the desired limit and click the submit button. &lt;br /&gt;
===ColdFusion 9 and below===&lt;br /&gt;
To adjust the Post Parameters Limit setting in ColdFusion 9 and below, you will have to edit the server's '''neo-runtime.xml''' file which is located here on a standard installation: &amp;lt;pre&amp;gt;C:\ColdFusion9\lib&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open that file in a text editor such as Notepad, then search for the '''postSizeLimit''' tag. It will look similar to this: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postSizeLimit'&amp;gt;&amp;lt;number&amp;gt;100.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Immediately after that set of tags, paste this chunk of text: &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;var name='postParametersLimit'&amp;gt;&amp;lt;number&amp;gt;1000.0&amp;lt;/number&amp;gt;&amp;lt;/var&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Once you've adjusted the file, you'll just need to save your changes and restart ColdFusion for the new setting to go into effect. '''Note''': The value of '''1000''' is just an example, so you can increase it as needed. &lt;br /&gt;
&lt;br /&gt;
==Loading custom Java library or Java Libraries (jar or class files) in ColdFusion 10==&lt;br /&gt;
ColdFusion 10 makes it easy to load Java libraries into your ColdFusion application without having to restart ColdFusion. All that's required is your application define the 'THIS.javaSettings' attribute within the site's Application.cfc like below:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfset THIS.javaSettings = {LoadPaths = [&amp;quot;/javafiles/&amp;quot;], loadColdFusionClassPath = true, reloadOnChange=false}/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code will check the ''javafiles'' directory in your Web root for 'jar' and 'class' files and make any libraries within the directory accessible from your ColdFusion application. If you modify the JAR files in your ''javafiles'' directory though, ColdFusion will need to be restarted to load the new versions of the JAR files. &lt;br /&gt;
&lt;br /&gt;
'''References''': &lt;br /&gt;
*[https://wikidocs.adobe.com/wiki/display/coldfusionen/Enhanced+Java+integration+in+ColdFusion+10 Adobe ColdFusion Documentation - Enhanced Java Integration in ColdFusion]&lt;br /&gt;
*[http://www.raymondcamden.com/2014/6/16/Issue-with-ColdFusion-JavaSettings-and-ReloadOnChange Ray Camden's Blog - Issue with ColdFusion JavaSettings and ReloadOnChange]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Permission denied for creating Java object: coldfusion.server.ServiceFactory''==&lt;br /&gt;
===When using Mura or using Transfer ORM===&lt;br /&gt;
====Issue====&lt;br /&gt;
If you are using '''Mura''' or using '''Transfer ORM''' and you get this error, ''Permission denied for creating Java object: coldfusion.server.ServiceFactory'', you are likely using an outdated version of Mura and also are probably on a ColdFusion 9 server. The Transfer ORM component causing this issue has not been updated to work with ColdFusion 9. There is a quick fix though:&lt;br /&gt;
====Solution====&lt;br /&gt;
Find the file named CFMLVersion.cfc which should be at '''/wwwroot/requirements/transfer/com/factory'''.&lt;br /&gt;
&lt;br /&gt;
Edit that file and find the line that has:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And change that to:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
if(server.coldfusion.productversion.startsWith(&amp;quot;8&amp;quot;) OR server.coldfusion.productversion.startsWith(&amp;quot;9&amp;quot;))&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Save the file and it should now work.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': Since this is likely running an outdated version of Mura, we highly recommend updating Mura to the latest version to take advantage of numerous performance and security enhancements.&lt;br /&gt;
===When using DataMgr===&lt;br /&gt;
If you get this error while using DataMgr.cfc, the changes described below will solve this problem:&lt;br /&gt;
&lt;br /&gt;
Here is the section of code from the original DataMgr.cfc:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection = getConnection()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset db = connection.getMetaData().getDatabaseProductName()&amp;gt;&lt;br /&gt;
		&amp;lt;cfset connection.close()&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = db2&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is what the modified code should look like (this sample assume MySQL)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cffunction name=&amp;quot;getDataBase&amp;quot; access=&amp;quot;public&amp;quot; returntype=&amp;quot;string&amp;quot; output=&amp;quot;no&amp;quot; hint=&amp;quot;I return the database platform being used.&amp;quot;&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfset var connection = 0&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var db = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var type = &amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfset var qDatabases = getSupportedDatabases()&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
	&amp;lt;cfif Len(variables.datasource)&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;cfswitch expression=&amp;quot;#db#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Microsoft SQL Server&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MSSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;PostgreSQL&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;PostGreSQL&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Oracle&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;MS Jet&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Access&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfcase value=&amp;quot;Apache Derby&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfset type = &amp;quot;Derby&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfcase&amp;gt;&lt;br /&gt;
		&amp;lt;cfdefaultcase&amp;gt;&lt;br /&gt;
			&amp;lt;cfif ListFirst(db,&amp;quot;/&amp;quot;) EQ &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;DB2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;cfelse&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;unknown&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;/cfif&amp;gt;&lt;br /&gt;
		&amp;lt;/cfdefaultcase&amp;gt;&lt;br /&gt;
		&amp;lt;/cfswitch&amp;gt;&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Summary of changes''':&lt;br /&gt;
&lt;br /&gt;
These 3 lines were commented out:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection = getConnection() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset db = connection.getMetaData().getDatabaseProductName() --&amp;gt;&lt;br /&gt;
		&amp;lt;!-- cfset connection.close() --&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This line needed quotes around db2:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;cfset type = &amp;quot;db2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And lastly, this line needed added:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
                &amp;lt;cfset type = &amp;quot;MYSQL&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you are using an ''MS Access'' database instead of ''MySQL'', replace '''MYSQL''' with '''msaccessjet''' on the line that is added.&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion Error ''Security: The requested template has been denied access to {file/directory}''==&lt;br /&gt;
===Issue===&lt;br /&gt;
Our shared servers have ColdFusion Sandbox Security enabled, which requires absolute filesystem paths to be provided to tags and functions that interact with the filesystem. If you receive an error that starts with ''Security: The requested template has been denied access to ...'', then it is followed by a relative path, you'll need to replace the relative path with a full path.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
One way to do this is to hard-code the path (''d:\home\sitename.com\wwwroot\filename.jpg''), but that can cause portability problems if your site is ever moved to a different environment. &lt;br /&gt;
&lt;br /&gt;
A better way to do this would be to &amp;quot;wrap&amp;quot; your relative path with the '''ExpandPath()''' function. The ''ExpandPath()'' function will automatically detect the absolute filesystem path to the file, and ColdFusion will no longer give you a permissions error. &lt;br /&gt;
&lt;br /&gt;
'''More info''': [https://wikidocs.adobe.com/wiki/display/coldfusionen/ExpandPath Adobe Documentation - ExpandPath]&lt;br /&gt;
&lt;br /&gt;
==How to handle ColdFusion COM Object Error ''java.lang.RuntimeException: Can not use native code: Initialisation failed''==&lt;br /&gt;
The error ''java.lang.RuntimeException: Can not use native code: Initialisation failed'' is related to calling a 32-bit COM object from within a 64-bit ColdFusion installation. &lt;br /&gt;
&lt;br /&gt;
The simplest way to bypass this error is to write a small ASP Webservice to proxy the call to the COM object as shown in '''Option 2''' of this blog post: [http://coldfusion9.blogspot.com/2010/05/32-bit-components-on-64-bit-coldfusion.html 32-bit Components on 64-bit ColdFusion]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can [https://support.hostek.com/ ask Support] to move your site to a 32-bit ColdFusion server.&lt;br /&gt;
&lt;br /&gt;
==Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated Server==&lt;br /&gt;
To use Seefusion, visit the address mentioned in your server's Welcome email.&lt;br /&gt;
&lt;br /&gt;
Once loaded, you'll see a summary of memory consumption, average response time, number of requests processed by ColdFusion per second, and a view of currently running ColdFusion requests. &lt;br /&gt;
===Finding Scripts to Optimize===&lt;br /&gt;
When using Seefusion it is helpful to look at the '''Slow''' section of the request monitor. This will show you recent requests that took longer than 8 seconds to complete, giving you a good idea of what scripts need optimization. &lt;br /&gt;
===Stack Tracing with Seefusion===&lt;br /&gt;
Additionally, when a request is running in the '''Active''' section of Seefusion's request monitor, you can click the paper stack icon to the left of the request to view a stack trace of the request. A stack trace tells you what line of code is currently being processed by the request. &lt;br /&gt;
&lt;br /&gt;
Once the stack trace loads, start at the top and work your way down until you find a recognizable path to a ColdFusion template (''eg. c:\home\mysite.com\wwwroot\index.cfm: 47''). This tells you the template currently being executed followed by the line number being processed at that moment in time. If a request consistently shows the same line of code in subsequent stack traces, then you've found the main area to focus on optimizing.&lt;br /&gt;
&lt;br /&gt;
To make deciphering stack traces easier, you can also click the '''Seestack''' button at the top of the stack trace window. This will send the stack trace to a service that will analyze the trace and attempt to tell you where you need to focus.&lt;br /&gt;
&lt;br /&gt;
===Viewing Metrics over Time===&lt;br /&gt;
If you want to watch how response times and memory utilization in a more granular manner than the dashboard graphs show, you'll want to click the '''Counters''' button at the top of SeeFusion. Once on the Counters page you can select a time interval, then have Seefusion display performance metrics at the interval you selected. This is helpful to ensure requests are completing quickly and not exhausting ColdFusion's memory.&lt;br /&gt;
&lt;br /&gt;
==How to Wrap Your ColdFusion DSN with Seefusion==&lt;br /&gt;
If you wish to have Seefusion monitor your server's query activity, you'll need to &amp;quot;wrap&amp;quot; your DSN with SeeFusion's JDBC driver so Seefusion can monitor the DSN's activity. &lt;br /&gt;
===Install SeeDSN===&lt;br /&gt;
SeeDSN is a plugin for ColdFusion Administrator that makes it easy to wrap a DSN with Seefusion. Follow these directions to install SeeDSN:&lt;br /&gt;
#Download the SeeDSN archive [http://www.seefusion.com/seedsn_v1.1.zip here].&lt;br /&gt;
#Extract the '''seedsn''' folder within the archive to your '''/CFIDE/Administrator/''' folder. This means it will be located at ''/CFIDE/Administrator/seedsn'' once extracted. &lt;br /&gt;
#Move ''/CFIDE/Administrator/seedsn/custommenu.xml'' to ''/CFIDE/Administrator/custommenu.xml''&lt;br /&gt;
===Add Seefusion.jar to the ColdFusion Classpath===&lt;br /&gt;
In order for ColdFusion to use Seefusion's JDBC driver, you'll need to ensure '''seefusion.jar''' is on your ColdFusion class path. Follow these directions to add seefusion.jar to the Coldfusion class path:&lt;br /&gt;
#Log into your server's ColdFusion Administrator&lt;br /&gt;
#Click the '''Java and JVM''' link on the left, under Server Settings.&lt;br /&gt;
#In the box labeled '''ColdFusion Class Path''' add the path to your '''seefusion.jar''' file and click ''Submit Changes''. For example, if it is located in ColdFusion's &amp;quot;WEB-INF\lib&amp;quot; folder, you can add this to the Class Path: '''{application.home}/wwwroot/WEB-INF/lib/seefusion.jar'''. &lt;br /&gt;
#*Each path in the ColdFusion Class Path is separated by a comma, so be sure to add a comma right before the path to seefusion.jar (do not add any spaces).&lt;br /&gt;
#Restart ColdFusion after modifying the class path&lt;br /&gt;
&lt;br /&gt;
===Wrap a DSN using SeeDSN===&lt;br /&gt;
Once you've installed SeeDSN and restarted ColdFusion, you can wrap a DSN with the SeeFusion JDBC driver. Follow these instructions to do so: &lt;br /&gt;
#Log into ColdFusion Administrator&lt;br /&gt;
#Expand the ''SeeFusion'' navigation menu on the left and click '''Datasource Wrapper'''&lt;br /&gt;
#On the ''Datasource Wrapper'' page, you'll see a list of DSNs on your server. To wrap a DSN, click the ''Start'' [[File:Start.png]] icon next to your DSN. SeeDSN will automatically wrap your DSN with the SeeFusion driver and display '''OK''' if it is successful.&lt;br /&gt;
&lt;br /&gt;
'''Reference''': [http://www.webapper.com/blog/index.php/2009/06/08/seedsn-a-jdbc-wrapping-tool-for-use-with-seefusion/ WebApper Blog - Using SeeDSN JDBC Wrapping Tool]&lt;br /&gt;
&lt;br /&gt;
==Using fckEditor on ColdFusion 10 or Higher==&lt;br /&gt;
When getting the following error for fckEditor:&lt;br /&gt;
 '''&amp;quot;The server didn't reply with a proper XML data. Please check your configuration.&amp;quot;'''&lt;br /&gt;
&lt;br /&gt;
If you are on a ColdFusion 10+ server this will be cause by the '''FileUpload()''' function that is being used.&lt;br /&gt;
In ColdFusion 10+ ''FileUpload'' is a built-in function name, so you'll need to rename the ''FileUpload'' function used in fckeditor.&lt;br /&gt;
You can update the text for fckeditor by changing all instances of &amp;quot;FileUpload&amp;quot; to &amp;quot;fckFileUpload&amp;quot; to remove this conflict.&lt;br /&gt;
&lt;br /&gt;
==Optimze CFIMAGE Rendering in Three Steps==&lt;br /&gt;
===USE===&lt;br /&gt;
When full size images are required, re-sized images need to be used for displaying smaller images or thumbnails and the application needs to perform at optimal speed for displaying images in a browser. &lt;br /&gt;
&lt;br /&gt;
===KEY POINTS===&lt;br /&gt;
Except for during development cfimage '''action=&amp;quot;writeToBrowser&amp;quot;''' should not be used to display images.&lt;br /&gt;
Use CFIMAGE to resize images ''ONCE'', if possible during upload but if page timeouts make this impossible break up the task by using a CFC to check and re-size images as needed.&lt;br /&gt;
&lt;br /&gt;
===SUMMARY===&lt;br /&gt;
Those sites that display many images often times also upload many photos via form or via FTP and need to display both the FULL size images and smaller images for thumb nails or ''(small, med, large)'' optional sizes. The process of uploading images using CFFile can impose time constraints specifically for large files, or if the coldfusion page timeouts are set lower than is possible for large file upload and re-size jobs. To overcome this issue we can write a simple CFC for resizing the images after the upload is complete and the page is run for the first time. This will be ideal for either form based upload or FTP upload making this solution very versatile. &lt;br /&gt;
&lt;br /&gt;
====Step 1 - Create the CFC for re-sizing and writing images to disk====&lt;br /&gt;
&lt;br /&gt;
Create file &amp;quot;GetResizedImage.cfc&amp;quot; in the directory with the CFM files that display images.&lt;br /&gt;
Use the code below for the contents of this file and modify as needed.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfcomponent&amp;gt;&lt;br /&gt;
	&amp;lt;cffunction name=&amp;quot;GetImage&amp;quot; hint=&amp;quot;Re-sizes images for display in album&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the image path where photos exist ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset imgpath = &amp;quot;imgdir/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the domain path, allows reuse resized images on other sites ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset domain = &amp;quot;domain.com&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;!--- Re-writes image extension if for alternates of JPG, and adds _resized to differentiate from fullsize images ---&amp;gt;&lt;br /&gt;
&amp;lt;cfset rfile= &amp;quot;#REReplace(&amp;quot;#img#&amp;quot;,&amp;quot;.(jpg|JPG|JPEG|jpeg)&amp;quot;,&amp;quot;_resized.jpg&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Checks if file is already resized ---&amp;gt;&lt;br /&gt;
        &amp;lt;cfif FileExists(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp;&amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#rfile#&amp;quot;)&amp;gt;&lt;br /&gt;
           &amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;cfelse&amp;gt;&lt;br /&gt;
&amp;lt;!--- Resizes image if it has not been done already ---&amp;gt;&lt;br /&gt;
            &amp;lt;cfset myImage=ImageNew(URLDecode(&amp;quot;d:\home\#domain#\wwwroot\&amp;quot; &amp;amp; &amp;quot;#imgpath#&amp;quot; &amp;amp; &amp;quot;#img#&amp;quot;))&amp;gt;&lt;br /&gt;
                    &amp;lt;cfset ImageResize(myImage,&amp;quot;175&amp;quot;,&amp;quot;175&amp;quot;,&amp;quot;bilinear&amp;quot;)&amp;gt;&lt;br /&gt;
&amp;lt;!--- Saves image, and to eliminate problems with url friendly encoding when getting our images re-replace %20 with no-space ---&amp;gt;&lt;br /&gt;
                    &amp;lt;cfimage source=&amp;quot;#myImage#&amp;quot; action=&amp;quot;write&amp;quot; overwrite=true destination=&amp;quot;d:\home\#domain#\wwwroot\#imgpath##REReplace(&amp;quot;#rfile#&amp;quot;,&amp;quot;%20&amp;quot;,&amp;quot; &amp;quot;,&amp;quot;ALL&amp;quot;)#&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Set the new path for the image for browser output ---&amp;gt;&lt;br /&gt;
			&amp;lt;cfset myImage=&amp;quot;http://#domain#/#imgpath##rfile#&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;!--- Return the image variable ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfreturn myImage&amp;gt;&lt;br /&gt;
	&amp;lt;/cffunction&amp;gt;&lt;br /&gt;
&amp;lt;/cfcomponent&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Step 2 - Invoke the CFC====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Generate image name from query ---&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput query=&amp;quot;MyEvent&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;!--- Invoke CFC to check if resized image exists, if not resize and output URL for resized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvoke component=&amp;quot;GetResizedImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare what part of the CFC handles checking / getting the image ---&amp;gt;&lt;br /&gt;
	method=&amp;quot;GetImage&amp;quot;&lt;br /&gt;
&amp;lt;!--- Declare variable that will pass back the new image name ---&amp;gt;&lt;br /&gt;
	returnvariable=&amp;quot;myImage&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;cfinvokeargument name=&amp;quot;img&amp;quot; value=&amp;quot;#event.Pic#&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;/cfinvoke&amp;gt;&lt;br /&gt;
&amp;lt;!--- Display re-sized image ---&amp;gt;&lt;br /&gt;
	&amp;lt;img src=&amp;quot;#myImage#&amp;quot; alt=&amp;quot;&amp;quot; /&amp;gt;     &lt;br /&gt;
&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
====Step 3 - Test====&lt;br /&gt;
The proposed solution cut page load times from 20+ seconds to below one second after the first page load. During the FIRST or FIRST FEW times the page loads all the re-sizing will be done.&lt;br /&gt;
&lt;br /&gt;
===Q and A===&lt;br /&gt;
'''Question''': Checking if a file exists each time the page loads is excessive.&amp;lt;br /&amp;gt;&lt;br /&gt;
'''Answer''': We agree but it's much better than resizing every image each time the page loads.&lt;br /&gt;
&lt;br /&gt;
==How to create Services for Additional ColdFusion Instances==&lt;br /&gt;
If you've created additional ColdFusion instances on your VPS/Dedicated Server, and ColdFusion was unable to create the Services for those instances just do the following:&lt;br /&gt;
&lt;br /&gt;
#Open a Command Prompt as Administrator&lt;br /&gt;
#Run this command, replacing INSTANCE with the actual name of your new ColdFusion instance: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;sc create &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; binPath= &amp;quot;C:\ColdFusion10\INSTANCE\bin\coldfusionsvc.exe&amp;quot; displayname= &amp;quot;ColdFusion 10 INSTANCE Application Server&amp;quot; start= auto&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you will be able to start your instance through the Windows Services Manager. If you need to know how to create additional ColdFusion instances, please see this guide from Adobe: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSAB4367BA-6D91-4c69-8DBA-E2839394658A.html Defining Additional ColdFusion Instances]&lt;br /&gt;
&lt;br /&gt;
Once you've created the instances, you can attach them to your Web server as described here: [http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363a5d-7ffc.html Web Server Configuration]&lt;br /&gt;
&lt;br /&gt;
If you're using IIS, this video has a great walkthrough for using the ColdFusion Web Server Connector tool: [http://blogs.coldfusion.com/post.cfm/video-learn-about-iis-connectors-in-coldfusion10 Learn About ColdFusion IIS Connectors]&lt;br /&gt;
&lt;br /&gt;
==How to Fix Error: Value '0000-00-00' can not be represented as java.sql.Date==&lt;br /&gt;
If your application has null values in a MySQL datetime/date column you may encounter the error &amp;quot;Value '0000-00-00' can not be represented as java.sql.Date&amp;quot;. The easiest way to fix this is by adding the parameter '''zeroDateTimeBehavior=convertToNull''' to your site's DSN [http://helpx.adobe.com/coldfusion/kb/mysql-error-java-sql-sqlexception.html as recommended by Adobe].&lt;br /&gt;
===How to Fix Null DateTime Error - '''Shared Hosting'''===&lt;br /&gt;
#Log into your site's WCP control panel&lt;br /&gt;
#Click the ''DataSources (DSNs)'' button&lt;br /&gt;
#Click the ''Edit'' icon next to your DataSource (DSN)&lt;br /&gt;
#Add the following to the '''JDBC Query Parameters''' field: &amp;lt;pre&amp;gt;zeroDateTimeBehavior=convertToNull&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' To add multiple JDBC Query Parameters, separate each name/value pair by an ''''&amp;amp;''''. &lt;br /&gt;
''Example: zeroDateTimeBehavior=convertToNull&amp;amp;characterEncoding=UTF-8''&lt;br /&gt;
===How to Fix Null DateTime Error - '''VPS Hosting'''===&lt;br /&gt;
If your site uses WCP to manage its DSNs, you may utilize the Shared Hosting solution. Otherwise, follow the steps below:&lt;br /&gt;
#Log into ColdFusion Administrator on your VPS/Dedicated Server. &lt;br /&gt;
#Navigate to the &amp;quot;Data Sources&amp;quot; page and click your site's DSN name.&lt;br /&gt;
#On the page that opens add '''?zeroDateTimeBehavior=convertToNull''' to the end of the JDBC URL field.&lt;br /&gt;
#Click '''Submit''' and your site should no longer display the date representation error.&lt;br /&gt;
&lt;br /&gt;
==Find the Java Version Used by ColdFusion or Railo==&lt;br /&gt;
This CFML code will report the version of Java used by your ColdFusion or Railo server:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfoutput&amp;gt;#CreateObject(&amp;quot;java&amp;quot;, &amp;quot;java.lang.System&amp;quot;).getProperty(&amp;quot;java.version&amp;quot;)#&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Reference:''' [http://www.petefreitag.com/item/743.cfm Pete Freitag's Blog - What Version of Java is ColdFusion Using?]&lt;br /&gt;
&lt;br /&gt;
==Reset ColdFusion Admin Password on CF 10+ VPS==&lt;br /&gt;
===Reset CF Admin Password - Windows VPS===&lt;br /&gt;
*On your VPS, open a command prompt window as Administrator&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.bat'' script: &amp;lt;pre&amp;gt;.\passwordreset.bat&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===Reset CF Admin Password - cPanel/Linux VPS===&lt;br /&gt;
*SSH into your VPS&lt;br /&gt;
*Issue the following command to change to the ColdFusion ''bin'' directory ''replace ColdFusion10 with the actual path to your ColdFusion installation''': &amp;lt;pre&amp;gt;cd /opt/ColdFusion10/cfusion/bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Execute the ''passwordreset.sh'' script: &amp;lt;pre&amp;gt;./passwordreset.sh&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Enter '''1'' to change your ColdFusion administrator password&lt;br /&gt;
*Enter a new strong password, then enter it again to confirm the password&lt;br /&gt;
*The next section will ask for a new RDS password. If you're not using RDS you may leave the password and confirmation blank, or you can enter a secure password if you like. &lt;br /&gt;
*Restart ColdFusion to force the new password into effect&lt;br /&gt;
&lt;br /&gt;
===HTML5 Audio Player with Coldfusion===&lt;br /&gt;
This player uses an list named ''Tunes'' within the ''session'' scope to store a list of mp3 names. After populating the list, you can use this code as the foundation for an HTML audio player that plays each song in the list.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cfm&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;cfif action is &amp;quot;play_next_tune&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfset myArray=ListtoArray(session.Tunes)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset T_max=Arraylen(myArray)&amp;gt;&lt;br /&gt;
	&amp;lt;cfset session.track=session.track+1&amp;gt;&lt;br /&gt;
	&amp;lt;cfif session.track GT T_max&amp;gt;&lt;br /&gt;
		 &amp;lt;cfset session.track=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
		 &amp;lt;cflocation url=&amp;quot;tunespage.cfm&amp;quot; addtoken=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;cfoutput&amp;gt;&lt;br /&gt;
		&amp;lt;audio controls id=&amp;quot;myVideo&amp;quot; autoplay&amp;gt;&lt;br /&gt;
		&amp;lt;source src=&amp;quot;path/#myarray[session.track]#&amp;quot; type=&amp;quot;audio/mpeg&amp;quot;&amp;gt;&lt;br /&gt;
		Your browser does not support the audio element.&lt;br /&gt;
		&amp;lt;/audio&amp;gt;&lt;br /&gt;
	&amp;lt;/cfoutput&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;script language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
		document.getElementById('myVideo').addEventListener(&amp;quot;ended&amp;quot;,function() {&lt;br /&gt;
		window.location.href=&amp;quot;tunespage.cfm?action=play_next_tune&amp;quot;;&lt;br /&gt;
		});&lt;br /&gt;
	&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/cfif&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Upgrading_ColdFusion&amp;diff=2308</id>
		<title>Upgrading ColdFusion</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Upgrading_ColdFusion&amp;diff=2308"/>
				<updated>2014-11-06T18:19:17Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Post-Upgrade: Upgrade the IIS connector */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
==Upgrading ColdFusion 10+==&lt;br /&gt;
===Upgrading ColdFusion 10+ to the latest version===&lt;br /&gt;
In our experience it is most reliable to download the latest cumulative update through ColdFusion Administrator, then manually execute the update from the command line. Follow these steps to apply ColdFusion updates from the command line on your server:&lt;br /&gt;
====Step 1 - Install Java if not already installed====&lt;br /&gt;
Your VPS may be using the built-in Java JRE bundled with ColdFusion, but it is a good idea to use a separate version of Java for installing ColdFusion updates. You may download the latest version of Java from Oracle: [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]&lt;br /&gt;
&lt;br /&gt;
At the download page accept the license agreement, then download the appropriate version for your operating system. Most likely, you'll want the 64-bit version for your OS. During installation, it is a good idea to only install the development tools; the source code and public JRE are not needed.&amp;lt;br /&amp;gt;[[File:Jdk-options.png]]&lt;br /&gt;
====Step 2 - Ensure Java Bin Folder is in System Path====&lt;br /&gt;
#To check your path first open your system properties by right-clicking your VPS's '''Computer''' icon in '''Windows Explorer''', then clicking '''Propteries'''.&amp;lt;br /&amp;gt;[[File:Cf10updates-01.png]]&lt;br /&gt;
#In the window that opens, click the '''Advanced System Settings''' link off to the left.&amp;lt;br /&amp;gt;[[File:Cf10updates-02.png]]&lt;br /&gt;
#In the popup that appears, click the '''Environment Variables''' button toward the bottom right.&amp;lt;br /&amp;gt;[[File:Cf10updates-03.png]]&lt;br /&gt;
#In the next popup, select the '''Path''' variable under '''System Variables''', then click '''Edit'''.&amp;lt;br /&amp;gt;[[File:Cf10updates-04.png]]&lt;br /&gt;
#In the next popup, check the '''Variable value''' textbox to see if the path to a Java bin folder exists. If not, add a semicolon to the end of the line, followed by the path to your Java bin folder. For example, if you just installed Java as described above, you'd add a path like this: &amp;lt;pre&amp;gt;C:\Program Files\Java\jdk1.8.0_25\bin\&amp;lt;/pre&amp;gt;[[File:Winpath.png]]&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you've updated your system's PATH variable, you can click OK on all the popup windows to save your changes.&lt;br /&gt;
&lt;br /&gt;
====Step 3 - Download the ColdFusion Update====&lt;br /&gt;
#Log into ColdFusion Administrator for your server&lt;br /&gt;
#Navigate to the '''Server Update'''--&amp;gt;'''Updates''' section&lt;br /&gt;
##If you do not see an available update, click the '''Check for Updates''' button&lt;br /&gt;
##If you see an available update, click the '''Download''' button&amp;lt;br /&amp;gt;[[File:Cf10-update14.png]]&lt;br /&gt;
#ColdFusion will download the file to '''''&amp;lt;cf_home&amp;gt;''/hf-updates/''' (eg. C:\ColdFusion10\cfusion\hf-updates)&lt;br /&gt;
====Step 4 - Run the Update Installer====&lt;br /&gt;
#Stop ColdFusion. This will help ensure the update will install properly.&lt;br /&gt;
#Open a command prompt window on your server as ''Administrator''. You can do this by right-clicking on the ''CMD'' icon in the Start Menu, then choosing ''Run As Administrator''&lt;br /&gt;
#Navigate to the location where ColdFusion downloaded your update. &amp;lt;br /&amp;gt;''CF 10 Example:'' &amp;lt;pre&amp;gt;cd c:\ColdFusion10\cfusion\hf-updates&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;''CF 11 Example:'' &amp;lt;pre&amp;gt;cd c:\ColdFusion11\cfusion\hf-updates&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Launch your update via the following command: &amp;lt;pre&amp;gt;javaw -jar hotfix_0XX.jar&amp;lt;/pre&amp;gt; (replace '''0XX''' with the actual update number)&lt;br /&gt;
#Your CF update will be launched in a GUI. Just follow the prompts to install the update, and it will take care of the rest. If you are running a multi-instance ColdFusion server, ensure the boxes for all your instances are checked, and the updater will patch each instance automatically for you.&lt;br /&gt;
&lt;br /&gt;
Once the update has completed, just log into ColdFusion Administrator and go back to the Server Updates section. If it shows the update you applied in the '''Installed Updates''' tab, your ColdFusion installation has been updated successfully.&lt;br /&gt;
&lt;br /&gt;
===Post-Upgrade: Upgrade the IIS connector===&lt;br /&gt;
The ColdFusion to IIS connector must be upgraded after applying most ColdFusion 10+ updates. After applying the latest update for ColdFusion 10 or 11, perform the following steps:&lt;br /&gt;
#Open a command prompt as ''Administrator''&lt;br /&gt;
#Navigate to ''&amp;lt;cf_home&amp;gt;''\cfusion\runtime\bin:&amp;lt;br /&amp;gt;''CF 10 Example:''&amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\runtime\bin&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;''CF 11 Example:''&amp;lt;pre&amp;gt;cd C:\ColdFusion11\cfusion\runtime\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Open 'wsconfig.exe', issuing it the upgrade parameter: &amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;.\wsconfig.exe -ws iis -site 0 -upgrade -v&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tool will restart IIS, then you'll be able to continue using ColdFusion.&lt;br /&gt;
&lt;br /&gt;
===ColdFusion 10 Mandatory Update===&lt;br /&gt;
If you happen to have a server on Coldfusion 10 version 282462 or earlier, you will first need to apply the ColdFusion 10 Mandatory Update first. Follow these steps to complete the installation:&lt;br /&gt;
#[http://download.macromedia.com/pub/coldfusion/10/cf10_mdt_updt.jar Download the JAR file] for the update from Adobe. &lt;br /&gt;
#On your server, open a command prompt as '''Administrator''' then navigate to the folder containing the update's JAR file. &lt;br /&gt;
#Launch the JAR with this command: &amp;lt;pre&amp;gt;java -jar cf10_mdt_updt.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Follow the installer's instructions, and the update will complete in a couple minutes.&lt;br /&gt;
&lt;br /&gt;
Once the mandatory update has been installed, you'll be able to proceed through the update instructions above.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Upgrading_ColdFusion&amp;diff=2307</id>
		<title>Upgrading ColdFusion</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Upgrading_ColdFusion&amp;diff=2307"/>
				<updated>2014-11-06T18:12:00Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
==Upgrading ColdFusion 10+==&lt;br /&gt;
===Upgrading ColdFusion 10+ to the latest version===&lt;br /&gt;
In our experience it is most reliable to download the latest cumulative update through ColdFusion Administrator, then manually execute the update from the command line. Follow these steps to apply ColdFusion updates from the command line on your server:&lt;br /&gt;
====Step 1 - Install Java if not already installed====&lt;br /&gt;
Your VPS may be using the built-in Java JRE bundled with ColdFusion, but it is a good idea to use a separate version of Java for installing ColdFusion updates. You may download the latest version of Java from Oracle: [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]&lt;br /&gt;
&lt;br /&gt;
At the download page accept the license agreement, then download the appropriate version for your operating system. Most likely, you'll want the 64-bit version for your OS. During installation, it is a good idea to only install the development tools; the source code and public JRE are not needed.&amp;lt;br /&amp;gt;[[File:Jdk-options.png]]&lt;br /&gt;
====Step 2 - Ensure Java Bin Folder is in System Path====&lt;br /&gt;
#To check your path first open your system properties by right-clicking your VPS's '''Computer''' icon in '''Windows Explorer''', then clicking '''Propteries'''.&amp;lt;br /&amp;gt;[[File:Cf10updates-01.png]]&lt;br /&gt;
#In the window that opens, click the '''Advanced System Settings''' link off to the left.&amp;lt;br /&amp;gt;[[File:Cf10updates-02.png]]&lt;br /&gt;
#In the popup that appears, click the '''Environment Variables''' button toward the bottom right.&amp;lt;br /&amp;gt;[[File:Cf10updates-03.png]]&lt;br /&gt;
#In the next popup, select the '''Path''' variable under '''System Variables''', then click '''Edit'''.&amp;lt;br /&amp;gt;[[File:Cf10updates-04.png]]&lt;br /&gt;
#In the next popup, check the '''Variable value''' textbox to see if the path to a Java bin folder exists. If not, add a semicolon to the end of the line, followed by the path to your Java bin folder. For example, if you just installed Java as described above, you'd add a path like this: &amp;lt;pre&amp;gt;C:\Program Files\Java\jdk1.8.0_25\bin\&amp;lt;/pre&amp;gt;[[File:Winpath.png]]&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you've updated your system's PATH variable, you can click OK on all the popup windows to save your changes.&lt;br /&gt;
&lt;br /&gt;
====Step 3 - Download the ColdFusion Update====&lt;br /&gt;
#Log into ColdFusion Administrator for your server&lt;br /&gt;
#Navigate to the '''Server Update'''--&amp;gt;'''Updates''' section&lt;br /&gt;
##If you do not see an available update, click the '''Check for Updates''' button&lt;br /&gt;
##If you see an available update, click the '''Download''' button&amp;lt;br /&amp;gt;[[File:Cf10-update14.png]]&lt;br /&gt;
#ColdFusion will download the file to '''''&amp;lt;cf_home&amp;gt;''/hf-updates/''' (eg. C:\ColdFusion10\cfusion\hf-updates)&lt;br /&gt;
====Step 4 - Run the Update Installer====&lt;br /&gt;
#Stop ColdFusion. This will help ensure the update will install properly.&lt;br /&gt;
#Open a command prompt window on your server as ''Administrator''. You can do this by right-clicking on the ''CMD'' icon in the Start Menu, then choosing ''Run As Administrator''&lt;br /&gt;
#Navigate to the location where ColdFusion downloaded your update. &amp;lt;br /&amp;gt;''CF 10 Example:'' &amp;lt;pre&amp;gt;cd c:\ColdFusion10\cfusion\hf-updates&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;''CF 11 Example:'' &amp;lt;pre&amp;gt;cd c:\ColdFusion11\cfusion\hf-updates&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Launch your update via the following command: &amp;lt;pre&amp;gt;javaw -jar hotfix_0XX.jar&amp;lt;/pre&amp;gt; (replace '''0XX''' with the actual update number)&lt;br /&gt;
#Your CF update will be launched in a GUI. Just follow the prompts to install the update, and it will take care of the rest. If you are running a multi-instance ColdFusion server, ensure the boxes for all your instances are checked, and the updater will patch each instance automatically for you.&lt;br /&gt;
&lt;br /&gt;
Once the update has completed, just log into ColdFusion Administrator and go back to the Server Updates section. If it shows the update you applied in the '''Installed Updates''' tab, your ColdFusion installation has been updated successfully.&lt;br /&gt;
&lt;br /&gt;
===Post-Upgrade: Upgrade the IIS connector===&lt;br /&gt;
The ColdFusion to IIS connector must be upgraded after applying a ColdFusion 10 Update. After applying the latest update for ColdFusion 10, perform the following steps:&lt;br /&gt;
#Open a command prompt as ''Administrator''&lt;br /&gt;
#Navigate to ''&amp;lt;cf_home&amp;gt;''\cfusion\runtime\bin:&amp;lt;br /&amp;gt;''CF 10 Example:''&amp;lt;pre&amp;gt;cd C:\ColdFusion10\cfusion\runtime\bin&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;''CF 11 Example:''&amp;lt;pre&amp;gt;cd C:\ColdFusion11\cfusion\runtime\bin&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Open 'wsconfig.exe', issuing it the upgrade parameter: &amp;lt;br /&amp;gt;&amp;lt;pre&amp;gt;.\wsconfig.exe -ws iis -site 0 -upgrade -v&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tool will restart IIS, then you'll be able to continue using ColdFusion.&lt;br /&gt;
&lt;br /&gt;
===ColdFusion 10 Mandatory Update===&lt;br /&gt;
If you happen to have a server on Coldfusion 10 version 282462 or earlier, you will first need to apply the ColdFusion 10 Mandatory Update first. Follow these steps to complete the installation:&lt;br /&gt;
#[http://download.macromedia.com/pub/coldfusion/10/cf10_mdt_updt.jar Download the JAR file] for the update from Adobe. &lt;br /&gt;
#On your server, open a command prompt as '''Administrator''' then navigate to the folder containing the update's JAR file. &lt;br /&gt;
#Launch the JAR with this command: &amp;lt;pre&amp;gt;java -jar cf10_mdt_updt.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Follow the installer's instructions, and the update will complete in a couple minutes.&lt;br /&gt;
&lt;br /&gt;
Once the mandatory update has been installed, you'll be able to proceed through the update instructions above.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Upgrading_ColdFusion&amp;diff=2306</id>
		<title>Upgrading ColdFusion</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Upgrading_ColdFusion&amp;diff=2306"/>
				<updated>2014-11-06T18:03:33Z</updated>
		
		<summary type="html">&lt;p&gt;Jakeh: /* Upgrading ColdFusion 10+ to the latest version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
==Upgrading ColdFusion 10==&lt;br /&gt;
===Upgrading ColdFusion 10+ to the latest version===&lt;br /&gt;
In our experience it is most reliable to download the latest cumulative update through ColdFusion Administrator, then manually execute the update from the command line. Follow these steps to apply ColdFusion updates from the command line on your server:&lt;br /&gt;
====Step 1 - Install Java if not already installed====&lt;br /&gt;
Your VPS may be using the built-in Java JRE bundled with ColdFusion, but it is a good idea to use a separate version of Java for installing ColdFusion updates. You may download the latest version of Java from Oracle: [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Java SE Development Kit 8 Downloads]&lt;br /&gt;
&lt;br /&gt;
At the download page accept the license agreement, then download the appropriate version for your operating system. Most likely, you'll want the 64-bit version for your OS. During installation, it is a good idea to only install the development tools; the source code and public JRE are not needed.&amp;lt;br /&amp;gt;[[File:Jdk-options.png]]&lt;br /&gt;
====Step 2 - Ensure Java Bin Folder is in System Path====&lt;br /&gt;
#To check your path first open your system properties by right-clicking your VPS's '''Computer''' icon in '''Windows Explorer''', then clicking '''Propteries'''.&amp;lt;br /&amp;gt;[[File:Cf10updates-01.png]]&lt;br /&gt;
#In the window that opens, click the '''Advanced System Settings''' link off to the left.&amp;lt;br /&amp;gt;[[File:Cf10updates-02.png]]&lt;br /&gt;
#In the popup that appears, click the '''Environment Variables''' button toward the bottom right.&amp;lt;br /&amp;gt;[[File:Cf10updates-03.png]]&lt;br /&gt;
#In the next popup, select the '''Path''' variable under '''System Variables''', then click '''Edit'''.&amp;lt;br /&amp;gt;[[File:Cf10updates-04.png]]&lt;br /&gt;
#In the next popup, check the '''Variable value''' textbox to see if the path to a Java bin folder exists. If not, add a semicolon to the end of the line, followed by the path to your Java bin folder. For example, if you just installed Java as described above, you'd add a path like this: &amp;lt;pre&amp;gt;C:\Program Files\Java\jdk1.8.0_25\bin\&amp;lt;/pre&amp;gt;[[File:Winpath.png]]&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you've updated your system's PATH variable, you can click OK on all the popup windows to save your changes.&lt;br /&gt;
&lt;br /&gt;
====Step 3 - Download the ColdFusion Update====&lt;br /&gt;
#Log into ColdFusion Administrator for your server&lt;br /&gt;
#Navigate to the '''Server Update'''--&amp;gt;'''Updates''' section&lt;br /&gt;
##If you do not see an available update, click the '''Check for Updates''' button&lt;br /&gt;
##If you see an available update, click the '''Download''' button&amp;lt;br /&amp;gt;[[File:Cf10-update14.png]]&lt;br /&gt;
#ColdFusion will download the file to '''''&amp;lt;cf_home&amp;gt;''/hf-updates/''' (eg. C:\ColdFusion10\cfusion\hf-updates)&lt;br /&gt;
====Step 4 - Run the Update Installer====&lt;br /&gt;
#Stop ColdFusion. This will help ensure the update will install properly.&lt;br /&gt;
#Open a command prompt window on your server as ''Administrator''. You can do this by right-clicking on the ''CMD'' icon in the Start Menu, then choosing ''Run As Administrator''&lt;br /&gt;
#Navigate to the location where ColdFusion downloaded your update. &amp;lt;br /&amp;gt;''CF 10 Example:'' &amp;lt;pre&amp;gt;cd c:\ColdFusion10\cfusion\hf-updates&amp;lt;/pre&amp;gt;&amp;lt;br /&amp;gt;''CF 11 Example:'' &amp;lt;pre&amp;gt;cd c:\ColdFusion11\cfusion\hf-updates&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Launch your update via the following command: &amp;lt;pre&amp;gt;javaw -jar hotfix_0XX.jar&amp;lt;/pre&amp;gt; (replace '''0XX''' with the actual update number)&lt;br /&gt;
#Your CF update will be launched in a GUI. Just follow the prompts to install the update, and it will take care of the rest. If you are running a multi-instance ColdFusion server, ensure the boxes for all your instances are checked, and the updater will patch each instance automatically for you.&lt;br /&gt;
&lt;br /&gt;
Once the update has completed, just log into ColdFusion Administrator and go back to the Server Updates section. If it shows the update you applied in the '''Installed Updates''' tab, your ColdFusion installation has been updated successfully.&lt;br /&gt;
&lt;br /&gt;
===Post-Upgrade: Upgrade the IIS connector===&lt;br /&gt;
The ColdFusion to IIS connector must be upgraded after applying a ColdFusion 10 Update. After applying the latest update for ColdFusion 10, perform the following steps:&lt;br /&gt;
#Open a command prompt as ''Administrator''&lt;br /&gt;
#Navigate to C:\ColdFusion10\cfusion\runtime\bin:&amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;cd C:\ColdFusion10\cfusion\runtime\bin&amp;lt;/code&amp;gt;&lt;br /&gt;
#Open 'wsconfig.exe', issuing it the upgrade parameter: &amp;lt;br /&amp;gt;&amp;lt;code&amp;gt;.\wsconfig.exe -ws iis -site 0 -upgrade -v&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The tool will restart IIS, then you'll be able to continue using ColdFusion.&lt;br /&gt;
&lt;br /&gt;
===ColdFusion 10 Mandatory Update===&lt;br /&gt;
If you happen to have a server on Coldfusion 10 version 282462 or earlier, you will first need to apply the ColdFusion 10 Mandatory Update first. Follow these steps to complete the installation:&lt;br /&gt;
#[http://download.macromedia.com/pub/coldfusion/10/cf10_mdt_updt.jar Download the JAR file] for the update from Adobe. &lt;br /&gt;
#On your server, open a command prompt as '''Administrator''' then navigate to the folder containing the update's JAR file. &lt;br /&gt;
#Launch the JAR with this command: &amp;lt;pre&amp;gt;java -jar cf10_mdt_updt.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Follow the installer's instructions, and the update will complete in a couple minutes.&lt;br /&gt;
&lt;br /&gt;
Once the mandatory update has been installed, you'll be able to proceed through the update instructions above.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Jakeh</name></author>	</entry>

	</feed>