<?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=Kylet</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=Kylet"/>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/Special:Contributions/Kylet"/>
		<updated>2026-05-05T04:07:02Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Mura&amp;diff=2864</id>
		<title>Mura</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Mura&amp;diff=2864"/>
				<updated>2016-08-18T15:35:25Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &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;
==java.lang.IllegalArgumentException: wrong number of arguments==&lt;br /&gt;
&lt;br /&gt;
[https://github.com/blueriver/MuraCMS/issues/2113 Fixed Issue for CF2016 in Mura]&lt;br /&gt;
&lt;br /&gt;
CF2016 has some compatibility problems with how JavaLoader.cfc works. This has been fixed in Mura, but some plugins for Slatwall and Mura may include their own JavaLoader.cfc that needs the fix.&lt;br /&gt;
&lt;br /&gt;
JavaProxy.cfc around line 67&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;diff&amp;quot;&amp;gt; &lt;br /&gt;
 		constructor = _resolveMethodByParams(&amp;quot;Constructor&amp;quot;, _getClass().getConstructors(), arguments);  &lt;br /&gt;
    &lt;br /&gt;
-		instance = constructor.newInstance(_buildArgumentArray(arguments));  &lt;br /&gt;
+		if (StructCount(arguments) &amp;gt; 0){  &lt;br /&gt;
+			   instance = constructor.newInstance(_buildArgumentArray(arguments));  &lt;br /&gt;
+		} else {  &lt;br /&gt;
+			   instance = constructor.newInstance(JavaCast(&amp;quot;null&amp;quot;, 0));  &lt;br /&gt;
+		}  &lt;br /&gt;
   &lt;br /&gt;
 		_setClassInstance(instance);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&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>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2813</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=2813"/>
				<updated>2016-03-28T14:01:32Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: remove dead links and ColdFusion 32bit reference.&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;
*Alternative Option to Restarting ColdFusion:&lt;br /&gt;
#Instead of Restarting ColdFusion we've seen success in just restarting a client's specific application, here is how:&lt;br /&gt;
#*[https://wiki.hostek.com/ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application How to Restart a ColdFusion Application]&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;
&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;
==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;
There was a problem with ColdFusion 11's PDF Generation with Update 5 and has been fixed in Update 7. You can apply the hotfix or contact support to install the hotfix on your server.&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;
&lt;br /&gt;
==Connecting to RDS on your Coldfusion VPS==&lt;br /&gt;
RDS is not enabled on our Shared Servers and is not supported on them.  If you wish to use RDS on your Coldfusion VPS you must first enable it and use the correct connection settings for it to work. Follow the below steps to do so.&lt;br /&gt;
&lt;br /&gt;
#Log in to the Coldfusion Administrator&lt;br /&gt;
#Go to the 'Security Section'&lt;br /&gt;
#Click on 'RDS'&lt;br /&gt;
#Check the box to enable it&lt;br /&gt;
#Check the box to use single password&lt;br /&gt;
#Submit the changes&lt;br /&gt;
#Restart Coldfusion&lt;br /&gt;
#Using your client enter for the host your servers CFAdmin URL (typically &amp;quot;cf.vps-yourservername-com.ezhostingserver.com)&lt;br /&gt;
#The port is port 80&lt;br /&gt;
#Username is Admin&lt;br /&gt;
#Password is your CFAdmin password&lt;br /&gt;
&lt;br /&gt;
With these settings you will be able to connect using RDS and a client such as Coldfusion Builder to build sites and administrate Coldfusion.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_2016&amp;diff=2794</id>
		<title>ColdFusion 2016</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_2016&amp;diff=2794"/>
				<updated>2016-02-18T16:53:45Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: Created page with &amp;quot;__FORCETOC__  == Known Incompatibilities ==  === Mura throws 500 invalid arguments === It appears JavaProxy will need to be modified for ColdFusion 2016. The quick fix if they...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
== Known Incompatibilities ==&lt;br /&gt;
&lt;br /&gt;
=== Mura throws 500 invalid arguments ===&lt;br /&gt;
It appears JavaProxy will need to be modified for ColdFusion 2016. The quick fix if they don't require Java in Mura is to change the true to false for &amp;lt;code&amp;gt;javaenabled&amp;lt;/code&amp;gt; in their &amp;lt;code&amp;gt;settings.ini.cfm&amp;lt;/code&amp;gt;. Alternatively, you can change update the specific line causing the issue following the second comment on issue [https://github.com/blueriver/MuraCMS/issues/2113 #2113]&lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Performance&amp;diff=2752</id>
		<title>ColdFusion Performance</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Performance&amp;diff=2752"/>
				<updated>2015-12-17T17:57:43Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: added note about increasing G1 Heap Size if there are too many humongous allocations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When analyzing ColdFusion's performance, There are several things to keep in mind including JVM (memory) settings, slowness on the database tier, and memory leaks that can be easily avoided. &lt;br /&gt;
&lt;br /&gt;
==JVM Settings==&lt;br /&gt;
===Sizing the Heap===&lt;br /&gt;
====Memory Allocation====&lt;br /&gt;
Trying to find the right size for your server's ColdFusion memory heap is an iterative process. However, the following memory allocation arguments will give you a good start: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;java.args=-server -XX:+UseCompressedOops -XX:+DisableExplicitGC -Xms1024m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=512m -XX:SurvivorRatio=8 -XX:PermSize=128m -XX:MaxPermSize=512m&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note: The above arguments only control memory allocation. You should still retain any garbage collector and class-related arguments.''&lt;br /&gt;
&lt;br /&gt;
The settings shown above specify a maximum ColdFusion heap of 2 GB ''(2048 MB)'', an Eden/New space ''(where Java creates new objects)'' that starts at 256 MB and can grow to 512 MB, and a non-heap Perm space with a maximum of 512 MB. If your application needs a bit more memory, you can adjust the &amp;quot;-Xmx&amp;quot; and &amp;quot;-Xms&amp;quot; values as needed. Setting the maximum heap argument ''(-Xmx)'' to a value higher than the minimum heap argument ''(-Xms)'' will allow ColdFusion to utilize more RAM during times of peak activity. This will increase startup time slightly, but it gives the server more stability when your sites are busy.&lt;br /&gt;
&lt;br /&gt;
====Choosing a Garbage Collector====&lt;br /&gt;
After specifying good memory settings for your ColdFusion server, you'll want to ensure it uses an appropriate garbage collector for the work being done on your sites. &lt;br /&gt;
=====Mostly Concurrent Collector=====&lt;br /&gt;
If the sites on your server are primarily lightweight request/response applications where response times are critical, then the ''mostly'' concurrent garbage collector is a great choice for your server. This collector does its best to collect dead objects from memory while applications on the server are still processing data. This adds a small bit of overhead for transactional applications, but it helps such applications maintain their response-time SLAs. To enable this garbage collector, add the following JVM arguments after your memory allocation settings: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+UseParNewGC&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' The main downside of this collector is that it can consume too much CPU when memory-intensive applications run on the server. Servers running such applications would want to use the ''throughput collector'' mentioned below.&lt;br /&gt;
=====Throughput/Parallel Collector=====&lt;br /&gt;
If the applications on your server are memory intensive and allocate a lot of objects, then the throughput/parallel garbage collector would be a great choice for your server. Any application performing image manipulation or creating a lot of objects would be a great candidate for the throughput collector. To enable this garbage collector, add the following JVM arguments after your memory allocation settings: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-XX:+UseParallelOldGC -XX:YoungGenerationSizeIncrement=50 -XX:TenuredGenerationSizeIncrement=25 -XX:AdaptiveSizeDecrementScaleFactor=10 -XX:MaxGCPauseMillis=10000 -XX:GCTimeRatio=19&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first thing to note about this collector is the ''-XX:+UseParallelOldGC'' name. This doesn't mean you're using old garbage collection techniques; rather it mean that both the ''old'' (or ''tenured'') and the ''new'' (or ''eden'') sections of memory are collected in parallel. This allows Java to perform collections much faster than normal. One thing to keep in mind is that with this collector when the heap fills up Java will pause all application processing for a short period of time to clean up memory. The above settings act to minimize the time of such pauses so your end users typically won't notice any slowness.&lt;br /&gt;
&lt;br /&gt;
=====Garbage First Garbage Collector=====&lt;br /&gt;
If you are running the latest Java 8 JVM on your servers, you can take advantage of G1GC. G1GC was introduced before Java 8; however unless you have a support contract with Oracle for Java 7, Oracle only recommends using it with Java 8. This garbage collector works best on larger heaps (3GB+). The goal off this collector is to reduce GC pauses by doing more collections and marking objects concurrently with the running application. To enable this garbage collector, add the following JVM arguments after your memory allocation settings: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+ParallelRefProcEnabled -XX:+AggressiveOpts -XX:ParallelGCThreads=4 -XX:ConcGCThreads=2&amp;lt;/pre&amp;gt; You will want to to make ParallelGCThreads to the number of cores you have and make ConcGCThreads half of ParallelGCThreads. You may also need to adjust the G1 Heap Size manually if you notice too many &amp;quot;humongous&amp;quot; allocations.&lt;br /&gt;
&lt;br /&gt;
You will notice more CPU being used by this collector, but you should notice better performance with less latency between requests. This collector uses ~2048 regions of memory instead of 4 regions of memory. Oracle's documentation explains this is great detail at http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html&lt;br /&gt;
&lt;br /&gt;
====References====&lt;br /&gt;
*Tuning ColdFusion 10 for performance and stability: [http://cfwhisperer.com/post.cfm/coldfusion-10-enhanced-performance-settings ColdFusion 10 Enhanced Performance Settings]&lt;br /&gt;
*Optimizing Garbage Collection Pause Times: [http://wouterzelle.wordpress.com/2008/07/28/advanced-java-memory-tuning/ Advanced Java Memory Tuning]&lt;br /&gt;
*Oracle Java Garbage Collection Tuning Guidelines: [http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html Java Garbage Collection Tuning]&lt;br /&gt;
&lt;br /&gt;
===Garbage Collection Performance Logging===&lt;br /&gt;
Because a lot of the JVM's processing time can be spent in garbage collection of memory, it can be helpful to enable Garbage Collection Logging to your server. In order to do so, just add the following arguments to your ColdFusion server's ''jvm.config'' file: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-Xloggc:gc-1.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to change the name of the log file, just change 'gc-1.log' to the filename you wish. By default, this file will be created in the same folder as your ''jvm.config'' file.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''If Using Railo'': When using Railo it's more reliable to specify a full path to the GC log file like this: &lt;br /&gt;
    -Xloggc:C:\railo\gc-1.log&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''NOTE'': This section primarily applies to VPS/Dedicated customers only. Our administrators make sure the Heap is properly sized on our shared ColdFusion servers.&lt;br /&gt;
&lt;br /&gt;
==Tuning the Database Tier==&lt;br /&gt;
===Add Indexes===&lt;br /&gt;
Make sure all database fields are indexed properly. At the minimum your tables should have a primary (unique) key and indexes for any columns used in a WHERE clause. &lt;br /&gt;
&lt;br /&gt;
For your reference, this video from Percona describes how to make the most of table indexes: [https://www.youtube.com/watch?v=zeRqU0SlJa4 MySQL Indexing Best Practices]&lt;br /&gt;
&lt;br /&gt;
===Tune Your Queries===&lt;br /&gt;
Be sure to remove any 'SELECT *' statements in the code. Instead, explicitly name each column used in a query. Also, make use of query advisors such as the following:&lt;br /&gt;
*'''MySQL - Percona Query Advisor''': https://tools.percona.com/query-advisor&lt;br /&gt;
*'''MS SQL Server - Database Engine Tuning Advisor''': http://www.mssqltips.com/sqlservertutorial/286/database-engine-tuning-advisor/&lt;br /&gt;
&lt;br /&gt;
===Cache Queries (cfquery / cfstoredproc) Where Possible===&lt;br /&gt;
Does your application have queries that are ran often and the data rarely changes? If so, enable caching on those queries as shown here: [http://www.coldfusionmuse.com/index.cfm/2010/9/19/safe.caching Good Developers Practice Safe Query Caching]&lt;br /&gt;
&lt;br /&gt;
The main takeaway is that your application should use the '''cachedwithin''' attribute on as many cfquery and cfstoredproc tags as possible. Query caching helps reduce the load on the database server and  improves page response time noticeably.&lt;br /&gt;
&lt;br /&gt;
To enable this attribute on your queries, just add the '''cachedwithin''' attribute to your cfquery or cfstoredproc tags. This example will cache a query for 15 minutes:&amp;lt;pre&amp;gt;&amp;lt;cfquery name=&amp;quot;myquery&amp;quot; datasource=&amp;quot;mydsn&amp;quot; cachedwithin=&amp;quot;#createTimespan(0,0,15,0)#&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
''Note'': It is not recommended to cache queries for very long periods of time, so try to keep the timespan to an hour or less.&lt;br /&gt;
&lt;br /&gt;
==Preventing Known Memory 'Leaks'==&lt;br /&gt;
===Specify CFFunction Output Attribute===&lt;br /&gt;
For any &amp;lt;cffunction&amp;gt; and &amp;lt;cfcomponent&amp;gt; tags, make sure that you have '''output=&amp;quot;false&amp;quot;''' specified. If for some reason you do need output from the function, be sure to explicitly add the output=&amp;quot;true&amp;quot; attribute. There is a bug in CF that leaks memory when the output function is left of function and component declarations.&lt;br /&gt;
&lt;br /&gt;
===Use Var Scope for Variables within CFFunction===&lt;br /&gt;
Make sure all functions have their variables in the &amp;quot;var&amp;quot; scope, including queries. The varscoper utility here will check your code for any missing var statements in your code: http://varscoper.riaforge.org/&lt;br /&gt;
We highly recommend using this on a regular basis for all your sites.&lt;br /&gt;
&lt;br /&gt;
===Handle Bots and Spiders Properly===&lt;br /&gt;
Because bots and spiders can create a lot of useless sessions when indexing sites, we recommend setting a custom session timeout as shown here: [[ColdFusion_Tips_%26_Tricks#Lower_Session_Timeouts_for_Bots_and_Spiders|Lower Session Timeouts for Bots and Spiders]]&lt;br /&gt;
&lt;br /&gt;
==Debugging Individual Scripts==&lt;br /&gt;
During non-peak hours for your site, try enabling the ColdFusion debug output and adding your IP to the remote debug IP list. Then load the most frequently accessed pages and grab the debug output. Once you have this, focus on improving the slowest sections of code first. &lt;br /&gt;
&lt;br /&gt;
Additionally, if you have '''Seefusion''' on your VPS, it will hightlight the server's slowest scripts. You can also obtain stack traces of running scripts to find the root cause of any slowness. &amp;lt;br /&amp;gt;&lt;br /&gt;
'''More info''': [[ColdFusion_Tips_%26_Tricks#Using_SeeFusion_to_Monitor_ColdFusion_Performance_on_a_VPS.2FDedicated_Server|Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated_Server]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''NOTE'': This section primarily applies to VPS/Dedicated customers only. We do not allow debugging on our shared ColdFusion servers, as it negatively impacts server performance. Also, Seefusion is not available to our shared hosting customers.&lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:VPS]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Performance&amp;diff=2751</id>
		<title>ColdFusion Performance</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Performance&amp;diff=2751"/>
				<updated>2015-12-17T17:55:25Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: fix copypaste mistake on the header...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When analyzing ColdFusion's performance, There are several things to keep in mind including JVM (memory) settings, slowness on the database tier, and memory leaks that can be easily avoided. &lt;br /&gt;
&lt;br /&gt;
==JVM Settings==&lt;br /&gt;
===Sizing the Heap===&lt;br /&gt;
====Memory Allocation====&lt;br /&gt;
Trying to find the right size for your server's ColdFusion memory heap is an iterative process. However, the following memory allocation arguments will give you a good start: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;java.args=-server -XX:+UseCompressedOops -XX:+DisableExplicitGC -Xms1024m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=512m -XX:SurvivorRatio=8 -XX:PermSize=128m -XX:MaxPermSize=512m&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note: The above arguments only control memory allocation. You should still retain any garbage collector and class-related arguments.''&lt;br /&gt;
&lt;br /&gt;
The settings shown above specify a maximum ColdFusion heap of 2 GB ''(2048 MB)'', an Eden/New space ''(where Java creates new objects)'' that starts at 256 MB and can grow to 512 MB, and a non-heap Perm space with a maximum of 512 MB. If your application needs a bit more memory, you can adjust the &amp;quot;-Xmx&amp;quot; and &amp;quot;-Xms&amp;quot; values as needed. Setting the maximum heap argument ''(-Xmx)'' to a value higher than the minimum heap argument ''(-Xms)'' will allow ColdFusion to utilize more RAM during times of peak activity. This will increase startup time slightly, but it gives the server more stability when your sites are busy.&lt;br /&gt;
&lt;br /&gt;
====Choosing a Garbage Collector====&lt;br /&gt;
After specifying good memory settings for your ColdFusion server, you'll want to ensure it uses an appropriate garbage collector for the work being done on your sites. &lt;br /&gt;
=====Mostly Concurrent Collector=====&lt;br /&gt;
If the sites on your server are primarily lightweight request/response applications where response times are critical, then the ''mostly'' concurrent garbage collector is a great choice for your server. This collector does its best to collect dead objects from memory while applications on the server are still processing data. This adds a small bit of overhead for transactional applications, but it helps such applications maintain their response-time SLAs. To enable this garbage collector, add the following JVM arguments after your memory allocation settings: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+UseParNewGC&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' The main downside of this collector is that it can consume too much CPU when memory-intensive applications run on the server. Servers running such applications would want to use the ''throughput collector'' mentioned below.&lt;br /&gt;
=====Garbage First Garbage Collector=====&lt;br /&gt;
If the applications on your server are memory intensive and allocate a lot of objects, then the throughput/parallel garbage collector would be a great choice for your server. Any application performing image manipulation or creating a lot of objects would be a great candidate for the throughput collector. To enable this garbage collector, add the following JVM arguments after your memory allocation settings: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-XX:+UseParallelOldGC -XX:YoungGenerationSizeIncrement=50 -XX:TenuredGenerationSizeIncrement=25 -XX:AdaptiveSizeDecrementScaleFactor=10 -XX:MaxGCPauseMillis=10000 -XX:GCTimeRatio=19&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first thing to note about this collector is the ''-XX:+UseParallelOldGC'' name. This doesn't mean you're using old garbage collection techniques; rather it mean that both the ''old'' (or ''tenured'') and the ''new'' (or ''eden'') sections of memory are collected in parallel. This allows Java to perform collections much faster than normal. One thing to keep in mind is that with this collector when the heap fills up Java will pause all application processing for a short period of time to clean up memory. The above settings act to minimize the time of such pauses so your end users typically won't notice any slowness.&lt;br /&gt;
&lt;br /&gt;
=====Throughput/Parallel Collector=====&lt;br /&gt;
If you are running the latest Java 8 JVM on your servers, you can take advantage of G1GC. G1GC was introduced before Java 8; however unless you have a support contract with Oracle for Java 7, they recommend only using it with Java 8. This garbage collector works best on larger heaps (3GB+). The goal off this collector is to reduce GC pauses by doing more collections and marking objects concurrently with the running application. To enable this garbage collector, add the following JVM arguments after your memory allocation settings: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+ParallelRefProcEnabled -XX:+AggressiveOpts -XX:ParallelGCThreads=4 -XX:ConcGCThreads=2&amp;lt;/pre&amp;gt; You will want to to make ParallelGCThreads to the number of cores you have and make ConcGCThreads half of ParallelGCThreads.&lt;br /&gt;
&lt;br /&gt;
You will notice more CPU being used by this collector, but you should notice better performance with less latency between requests. This collector uses ~2048 regions of memory instead of 4 regions of memory. Oracle's documentation explains this is great detail at http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html &lt;br /&gt;
====References====&lt;br /&gt;
*Tuning ColdFusion 10 for performance and stability: [http://cfwhisperer.com/post.cfm/coldfusion-10-enhanced-performance-settings ColdFusion 10 Enhanced Performance Settings]&lt;br /&gt;
*Optimizing Garbage Collection Pause Times: [http://wouterzelle.wordpress.com/2008/07/28/advanced-java-memory-tuning/ Advanced Java Memory Tuning]&lt;br /&gt;
*Oracle Java Garbage Collection Tuning Guidelines: [http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html Java Garbage Collection Tuning]&lt;br /&gt;
&lt;br /&gt;
===Garbage Collection Performance Logging===&lt;br /&gt;
Because a lot of the JVM's processing time can be spent in garbage collection of memory, it can be helpful to enable Garbage Collection Logging to your server. In order to do so, just add the following arguments to your ColdFusion server's ''jvm.config'' file: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-Xloggc:gc-1.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to change the name of the log file, just change 'gc-1.log' to the filename you wish. By default, this file will be created in the same folder as your ''jvm.config'' file.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''If Using Railo'': When using Railo it's more reliable to specify a full path to the GC log file like this: &lt;br /&gt;
    -Xloggc:C:\railo\gc-1.log&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''NOTE'': This section primarily applies to VPS/Dedicated customers only. Our administrators make sure the Heap is properly sized on our shared ColdFusion servers.&lt;br /&gt;
&lt;br /&gt;
==Tuning the Database Tier==&lt;br /&gt;
===Add Indexes===&lt;br /&gt;
Make sure all database fields are indexed properly. At the minimum your tables should have a primary (unique) key and indexes for any columns used in a WHERE clause. &lt;br /&gt;
&lt;br /&gt;
For your reference, this video from Percona describes how to make the most of table indexes: [https://www.youtube.com/watch?v=zeRqU0SlJa4 MySQL Indexing Best Practices]&lt;br /&gt;
&lt;br /&gt;
===Tune Your Queries===&lt;br /&gt;
Be sure to remove any 'SELECT *' statements in the code. Instead, explicitly name each column used in a query. Also, make use of query advisors such as the following:&lt;br /&gt;
*'''MySQL - Percona Query Advisor''': https://tools.percona.com/query-advisor&lt;br /&gt;
*'''MS SQL Server - Database Engine Tuning Advisor''': http://www.mssqltips.com/sqlservertutorial/286/database-engine-tuning-advisor/&lt;br /&gt;
&lt;br /&gt;
===Cache Queries (cfquery / cfstoredproc) Where Possible===&lt;br /&gt;
Does your application have queries that are ran often and the data rarely changes? If so, enable caching on those queries as shown here: [http://www.coldfusionmuse.com/index.cfm/2010/9/19/safe.caching Good Developers Practice Safe Query Caching]&lt;br /&gt;
&lt;br /&gt;
The main takeaway is that your application should use the '''cachedwithin''' attribute on as many cfquery and cfstoredproc tags as possible. Query caching helps reduce the load on the database server and  improves page response time noticeably.&lt;br /&gt;
&lt;br /&gt;
To enable this attribute on your queries, just add the '''cachedwithin''' attribute to your cfquery or cfstoredproc tags. This example will cache a query for 15 minutes:&amp;lt;pre&amp;gt;&amp;lt;cfquery name=&amp;quot;myquery&amp;quot; datasource=&amp;quot;mydsn&amp;quot; cachedwithin=&amp;quot;#createTimespan(0,0,15,0)#&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
''Note'': It is not recommended to cache queries for very long periods of time, so try to keep the timespan to an hour or less.&lt;br /&gt;
&lt;br /&gt;
==Preventing Known Memory 'Leaks'==&lt;br /&gt;
===Specify CFFunction Output Attribute===&lt;br /&gt;
For any &amp;lt;cffunction&amp;gt; and &amp;lt;cfcomponent&amp;gt; tags, make sure that you have '''output=&amp;quot;false&amp;quot;''' specified. If for some reason you do need output from the function, be sure to explicitly add the output=&amp;quot;true&amp;quot; attribute. There is a bug in CF that leaks memory when the output function is left of function and component declarations.&lt;br /&gt;
&lt;br /&gt;
===Use Var Scope for Variables within CFFunction===&lt;br /&gt;
Make sure all functions have their variables in the &amp;quot;var&amp;quot; scope, including queries. The varscoper utility here will check your code for any missing var statements in your code: http://varscoper.riaforge.org/&lt;br /&gt;
We highly recommend using this on a regular basis for all your sites.&lt;br /&gt;
&lt;br /&gt;
===Handle Bots and Spiders Properly===&lt;br /&gt;
Because bots and spiders can create a lot of useless sessions when indexing sites, we recommend setting a custom session timeout as shown here: [[ColdFusion_Tips_%26_Tricks#Lower_Session_Timeouts_for_Bots_and_Spiders|Lower Session Timeouts for Bots and Spiders]]&lt;br /&gt;
&lt;br /&gt;
==Debugging Individual Scripts==&lt;br /&gt;
During non-peak hours for your site, try enabling the ColdFusion debug output and adding your IP to the remote debug IP list. Then load the most frequently accessed pages and grab the debug output. Once you have this, focus on improving the slowest sections of code first. &lt;br /&gt;
&lt;br /&gt;
Additionally, if you have '''Seefusion''' on your VPS, it will hightlight the server's slowest scripts. You can also obtain stack traces of running scripts to find the root cause of any slowness. &amp;lt;br /&amp;gt;&lt;br /&gt;
'''More info''': [[ColdFusion_Tips_%26_Tricks#Using_SeeFusion_to_Monitor_ColdFusion_Performance_on_a_VPS.2FDedicated_Server|Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated_Server]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''NOTE'': This section primarily applies to VPS/Dedicated customers only. We do not allow debugging on our shared ColdFusion servers, as it negatively impacts server performance. Also, Seefusion is not available to our shared hosting customers.&lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:VPS]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Performance&amp;diff=2750</id>
		<title>ColdFusion Performance</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_Performance&amp;diff=2750"/>
				<updated>2015-12-17T17:39:58Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When analyzing ColdFusion's performance, There are several things to keep in mind including JVM (memory) settings, slowness on the database tier, and memory leaks that can be easily avoided. &lt;br /&gt;
&lt;br /&gt;
==JVM Settings==&lt;br /&gt;
===Sizing the Heap===&lt;br /&gt;
====Memory Allocation====&lt;br /&gt;
Trying to find the right size for your server's ColdFusion memory heap is an iterative process. However, the following memory allocation arguments will give you a good start: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;java.args=-server -XX:+UseCompressedOops -XX:+DisableExplicitGC -Xms1024m -Xmx2048m -XX:NewSize=256m -XX:MaxNewSize=512m -XX:SurvivorRatio=8 -XX:PermSize=128m -XX:MaxPermSize=512m&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note: The above arguments only control memory allocation. You should still retain any garbage collector and class-related arguments.''&lt;br /&gt;
&lt;br /&gt;
The settings shown above specify a maximum ColdFusion heap of 2 GB ''(2048 MB)'', an Eden/New space ''(where Java creates new objects)'' that starts at 256 MB and can grow to 512 MB, and a non-heap Perm space with a maximum of 512 MB. If your application needs a bit more memory, you can adjust the &amp;quot;-Xmx&amp;quot; and &amp;quot;-Xms&amp;quot; values as needed. Setting the maximum heap argument ''(-Xmx)'' to a value higher than the minimum heap argument ''(-Xms)'' will allow ColdFusion to utilize more RAM during times of peak activity. This will increase startup time slightly, but it gives the server more stability when your sites are busy.&lt;br /&gt;
&lt;br /&gt;
====Choosing a Garbage Collector====&lt;br /&gt;
After specifying good memory settings for your ColdFusion server, you'll want to ensure it uses an appropriate garbage collector for the work being done on your sites. &lt;br /&gt;
=====Mostly Concurrent Collector=====&lt;br /&gt;
If the sites on your server are primarily lightweight request/response applications where response times are critical, then the ''mostly'' concurrent garbage collector is a great choice for your server. This collector does its best to collect dead objects from memory while applications on the server are still processing data. This adds a small bit of overhead for transactional applications, but it helps such applications maintain their response-time SLAs. To enable this garbage collector, add the following JVM arguments after your memory allocation settings: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 -XX:+UseParNewGC&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''Note:'' The main downside of this collector is that it can consume too much CPU when memory-intensive applications run on the server. Servers running such applications would want to use the ''throughput collector'' mentioned below.&lt;br /&gt;
=====Throughput/Parallel Collector=====&lt;br /&gt;
If the applications on your server are memory intensive and allocate a lot of objects, then the throughput/parallel garbage collector would be a great choice for your server. Any application performing image manipulation or creating a lot of objects would be a great candidate for the throughput collector. To enable this garbage collector, add the following JVM arguments after your memory allocation settings: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-XX:+UseParallelOldGC -XX:YoungGenerationSizeIncrement=50 -XX:TenuredGenerationSizeIncrement=25 -XX:AdaptiveSizeDecrementScaleFactor=10 -XX:MaxGCPauseMillis=10000 -XX:GCTimeRatio=19&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first thing to note about this collector is the ''-XX:+UseParallelOldGC'' name. This doesn't mean you're using old garbage collection techniques; rather it mean that both the ''old'' (or ''tenured'') and the ''new'' (or ''eden'') sections of memory are collected in parallel. This allows Java to perform collections much faster than normal. One thing to keep in mind is that with this collector when the heap fills up Java will pause all application processing for a short period of time to clean up memory. The above settings act to minimize the time of such pauses so your end users typically won't notice any slowness. &lt;br /&gt;
=====Throughput/Parallel Collector=====&lt;br /&gt;
If you are running the latest Java 8 JVM on your servers, you can take advantage of G1GC. G1GC was introduced before Java 8; however unless you have a support contract with Oracle for Java 7, they recommend only using it with Java 8. This garbage collector works best on larger heaps (3GB+). The goal off this collector is to reduce GC pauses by doing more collections and marking objects concurrently with the running application. To enable this garbage collector, add the following JVM arguments after your memory allocation settings: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+ParallelRefProcEnabled -XX:+AggressiveOpts -XX:ParallelGCThreads=4 -XX:ConcGCThreads=2&amp;lt;/pre&amp;gt; You will want to to make ParallelGCThreads to the number of cores you have and make ConcGCThreads half of ParallelGCThreads.&lt;br /&gt;
&lt;br /&gt;
You will notice more CPU being used by this collector, but you should notice better performance with less latency between requests. This collector uses ~2048 regions of memory instead of 4 regions of memory. Oracle's documentation explains this is great detail at http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html &lt;br /&gt;
====References====&lt;br /&gt;
*Tuning ColdFusion 10 for performance and stability: [http://cfwhisperer.com/post.cfm/coldfusion-10-enhanced-performance-settings ColdFusion 10 Enhanced Performance Settings]&lt;br /&gt;
*Optimizing Garbage Collection Pause Times: [http://wouterzelle.wordpress.com/2008/07/28/advanced-java-memory-tuning/ Advanced Java Memory Tuning]&lt;br /&gt;
*Oracle Java Garbage Collection Tuning Guidelines: [http://www.oracle.com/technetwork/java/javase/gc-tuning-6-140523.html Java Garbage Collection Tuning]&lt;br /&gt;
&lt;br /&gt;
===Garbage Collection Performance Logging===&lt;br /&gt;
Because a lot of the JVM's processing time can be spent in garbage collection of memory, it can be helpful to enable Garbage Collection Logging to your server. In order to do so, just add the following arguments to your ColdFusion server's ''jvm.config'' file: &amp;lt;pre style=&amp;quot;white-space: pre-wrap&amp;quot;&amp;gt;-Xloggc:gc-1.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wish to change the name of the log file, just change 'gc-1.log' to the filename you wish. By default, this file will be created in the same folder as your ''jvm.config'' file.&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;''If Using Railo'': When using Railo it's more reliable to specify a full path to the GC log file like this: &lt;br /&gt;
    -Xloggc:C:\railo\gc-1.log&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''NOTE'': This section primarily applies to VPS/Dedicated customers only. Our administrators make sure the Heap is properly sized on our shared ColdFusion servers.&lt;br /&gt;
&lt;br /&gt;
==Tuning the Database Tier==&lt;br /&gt;
===Add Indexes===&lt;br /&gt;
Make sure all database fields are indexed properly. At the minimum your tables should have a primary (unique) key and indexes for any columns used in a WHERE clause. &lt;br /&gt;
&lt;br /&gt;
For your reference, this video from Percona describes how to make the most of table indexes: [https://www.youtube.com/watch?v=zeRqU0SlJa4 MySQL Indexing Best Practices]&lt;br /&gt;
&lt;br /&gt;
===Tune Your Queries===&lt;br /&gt;
Be sure to remove any 'SELECT *' statements in the code. Instead, explicitly name each column used in a query. Also, make use of query advisors such as the following:&lt;br /&gt;
*'''MySQL - Percona Query Advisor''': https://tools.percona.com/query-advisor&lt;br /&gt;
*'''MS SQL Server - Database Engine Tuning Advisor''': http://www.mssqltips.com/sqlservertutorial/286/database-engine-tuning-advisor/&lt;br /&gt;
&lt;br /&gt;
===Cache Queries (cfquery / cfstoredproc) Where Possible===&lt;br /&gt;
Does your application have queries that are ran often and the data rarely changes? If so, enable caching on those queries as shown here: [http://www.coldfusionmuse.com/index.cfm/2010/9/19/safe.caching Good Developers Practice Safe Query Caching]&lt;br /&gt;
&lt;br /&gt;
The main takeaway is that your application should use the '''cachedwithin''' attribute on as many cfquery and cfstoredproc tags as possible. Query caching helps reduce the load on the database server and  improves page response time noticeably.&lt;br /&gt;
&lt;br /&gt;
To enable this attribute on your queries, just add the '''cachedwithin''' attribute to your cfquery or cfstoredproc tags. This example will cache a query for 15 minutes:&amp;lt;pre&amp;gt;&amp;lt;cfquery name=&amp;quot;myquery&amp;quot; datasource=&amp;quot;mydsn&amp;quot; cachedwithin=&amp;quot;#createTimespan(0,0,15,0)#&amp;quot;&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
''Note'': It is not recommended to cache queries for very long periods of time, so try to keep the timespan to an hour or less.&lt;br /&gt;
&lt;br /&gt;
==Preventing Known Memory 'Leaks'==&lt;br /&gt;
===Specify CFFunction Output Attribute===&lt;br /&gt;
For any &amp;lt;cffunction&amp;gt; and &amp;lt;cfcomponent&amp;gt; tags, make sure that you have '''output=&amp;quot;false&amp;quot;''' specified. If for some reason you do need output from the function, be sure to explicitly add the output=&amp;quot;true&amp;quot; attribute. There is a bug in CF that leaks memory when the output function is left of function and component declarations.&lt;br /&gt;
&lt;br /&gt;
===Use Var Scope for Variables within CFFunction===&lt;br /&gt;
Make sure all functions have their variables in the &amp;quot;var&amp;quot; scope, including queries. The varscoper utility here will check your code for any missing var statements in your code: http://varscoper.riaforge.org/&lt;br /&gt;
We highly recommend using this on a regular basis for all your sites.&lt;br /&gt;
&lt;br /&gt;
===Handle Bots and Spiders Properly===&lt;br /&gt;
Because bots and spiders can create a lot of useless sessions when indexing sites, we recommend setting a custom session timeout as shown here: [[ColdFusion_Tips_%26_Tricks#Lower_Session_Timeouts_for_Bots_and_Spiders|Lower Session Timeouts for Bots and Spiders]]&lt;br /&gt;
&lt;br /&gt;
==Debugging Individual Scripts==&lt;br /&gt;
During non-peak hours for your site, try enabling the ColdFusion debug output and adding your IP to the remote debug IP list. Then load the most frequently accessed pages and grab the debug output. Once you have this, focus on improving the slowest sections of code first. &lt;br /&gt;
&lt;br /&gt;
Additionally, if you have '''Seefusion''' on your VPS, it will hightlight the server's slowest scripts. You can also obtain stack traces of running scripts to find the root cause of any slowness. &amp;lt;br /&amp;gt;&lt;br /&gt;
'''More info''': [[ColdFusion_Tips_%26_Tricks#Using_SeeFusion_to_Monitor_ColdFusion_Performance_on_a_VPS.2FDedicated_Server|Using SeeFusion to Monitor ColdFusion Performance on a VPS/Dedicated_Server]]&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
''NOTE'': This section primarily applies to VPS/Dedicated customers only. We do not allow debugging on our shared ColdFusion servers, as it negatively impacts server performance. Also, Seefusion is not available to our shared hosting customers.&lt;br /&gt;
&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:VPS]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2744</id>
		<title>Lucee</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Lucee&amp;diff=2744"/>
				<updated>2015-11-22T23:33:28Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: add troubleshooting tip for Lucee rest not working.&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;br /&gt;
&lt;br /&gt;
===Rest service not working===&lt;br /&gt;
'''Error:''' &amp;lt;br&amp;gt;&lt;br /&gt;
 no rest service for [PATH_HERE] found&lt;br /&gt;
Lucee was recently restarted and the web context for your site has not initialized fully.&lt;br /&gt;
&lt;br /&gt;
'''Solution:''' &amp;lt;br&amp;gt;&lt;br /&gt;
Browse to a page that is not part of the rest service and it will kick start the web context creation. Afterward, you should be able to use your rest service.&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_Tips_%26_Tricks&amp;diff=2742</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=2742"/>
				<updated>2015-11-18T19:32:22Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: add note about Update 5 breaking PDF Generation and note about the hotfix that fixes this issue.&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;
*Alternative Option to Restarting ColdFusion:&lt;br /&gt;
#Instead of Restarting ColdFusion we've seen success in just restarting a client's specific application, here is how:&lt;br /&gt;
#*[https://wiki.hostek.com/ColdFusion_Tips_%26_Tricks#Restart_a_ColdFusion_Application How to Restart a ColdFusion Application]&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;
There was a problem with ColdFusion 11's PDF Generation with Update 5 and has been fixed in Update 7. You can apply the hotfix or contact support to install the hotfix on your server.&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;
&lt;br /&gt;
==Connecting to RDS on your Coldfusion VPS==&lt;br /&gt;
RDS is not enabled on our Shared Servers and is not supported on them.  If you wish to use RDS on your Coldfusion VPS you must first enable it and use the correct connection settings for it to work. Follow the below steps to do so.&lt;br /&gt;
&lt;br /&gt;
#Log in to the Coldfusion Administrator&lt;br /&gt;
#Go to the 'Security Section'&lt;br /&gt;
#Click on 'RDS'&lt;br /&gt;
#Check the box to enable it&lt;br /&gt;
#Check the box to use single password&lt;br /&gt;
#Submit the changes&lt;br /&gt;
#Restart Coldfusion&lt;br /&gt;
#Using your client enter for the host your servers CFAdmin URL (typically &amp;quot;cf.vps-yourservername-com.ezhostingserver.com)&lt;br /&gt;
#The port is port 80&lt;br /&gt;
#Username is Admin&lt;br /&gt;
#Password is your CFAdmin password&lt;br /&gt;
&lt;br /&gt;
With these settings you will be able to connect using RDS and a client such as Coldfusion Builder to build sites and administrate Coldfusion.&lt;br /&gt;
[[Category:ColdFusion]]&lt;br /&gt;
[[Category:ColdFusion-VPS]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=About_Hosted_Exchange&amp;diff=2729</id>
		<title>About Hosted Exchange</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=About_Hosted_Exchange&amp;diff=2729"/>
				<updated>2015-10-21T14:05:48Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: Redirected page to SmarterMail&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[SmarterMail]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Main_Page&amp;diff=2728</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Main_Page&amp;diff=2728"/>
				<updated>2015-10-21T13:59:14Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: /* Start Here */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
== About This Site ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the Hostek.com wiki based knowledge base for Hostek.com customers.  &lt;br /&gt;
&lt;br /&gt;
Keeping with the nature of a great wiki, anyone can read articles and comments and any Hostek.com customer can create new articles and update existing ones. NOTE:  This is not the place to ask a question.  Since a customer can create/edit, some of the articles may be incomplete or incorrect; but that doesn't mean that it will stay that way very long. So if you are a customer and find a mistake, feel free to correct the mistake.&lt;br /&gt;
&lt;br /&gt;
== Start Here ==&lt;br /&gt;
&lt;br /&gt;
Get some help by browsing the categories here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--div style=&amp;quot;column-count:4;-webkit-column-count:4;-moz-column-count:4;&amp;quot;--&amp;gt;&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;background: #fdfdfd; border: 1px solid #eee; padding: 1em;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''General'''&lt;br /&gt;
| '''Shared Hosting'''&lt;br /&gt;
| '''Email'''&lt;br /&gt;
| '''Databases'''&lt;br /&gt;
| '''VPS / Virtual Servers'''&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;bull; [[:Category:Getting Started|Getting Started]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:ColdFusion|ColdFusion]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:SmarterMail|SmarterMail]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:Databases-MySQL|MySQL]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:VPS|VPS]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;bull; [[:Category:Tutorials|Tutorials]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:Linux|Linux]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:Configuring-Email-Clients|Configuring Email Clients]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:Databases-MSSQL|MS SQL]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:ColdFusion-VPS|ColdFusion VPS]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;bull; [[:Category:Control-Panels|Control Panels]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:Railo|Railo]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:Databases-Access|MS Access]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:Linux-VPS|Linux VPS]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;bull; [[:Category:Domain-Names|Domain Names]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:Windows|Windows]]&lt;br /&gt;
| &amp;amp;bull; [[Dedicated-Email-Server|Dedicated Email Server]]&lt;br /&gt;
|&lt;br /&gt;
| &amp;amp;bull; [[:Category:Railo-VPS|Railo VPS]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;bull; [[:Category:Sales|Sales]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:Resellers|Resellers]]&lt;br /&gt;
| &amp;amp;bull; [[:Category:Misc-Email|Misc Email Items]]&lt;br /&gt;
|&lt;br /&gt;
| &amp;amp;bull; [[:Category:Windows-VPS|Windows VPS]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;bull; [[:Category:Billing|Billing]]&lt;br /&gt;
|&lt;br /&gt;
| &amp;amp;bull; [[:Category:cPanel-Mail|cPanel Mail]]&lt;br /&gt;
|&lt;br /&gt;
| &amp;amp;bull; [[:Category:Email-VPS|SmarterMail VPS]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;amp;bull; [[:Category:Infrastructure|Infrastructure]]&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Contribute ==&lt;br /&gt;
&lt;br /&gt;
If you would like to contribute to this wiki, please first search and make sure the content does not already exist.&lt;br /&gt;
&lt;br /&gt;
If the content does not exist, login using your cp.hostek.com login information.&lt;br /&gt;
&lt;br /&gt;
Please follow the policies and guidelines when adding or editing an article. Thank you for contributing and sharing your knowledge with the rest of us. &lt;br /&gt;
&lt;br /&gt;
NOTE:  This is not a place to add spam or to try to promote your business.  Any user doing such will be banned from editing/contributing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Official Guides==&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Wikipedia:How_to_edit_a_page Quick Guide]&lt;br /&gt;
* [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide WikiMedia User's Guide]&lt;br /&gt;
* [http://meta.wikimedia.org/wiki/Help:Editing MediaWiki editing help]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=ColdFusion_FAQs&amp;diff=2708</id>
		<title>ColdFusion FAQs</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=ColdFusion_FAQs&amp;diff=2708"/>
				<updated>2015-09-21T16:32:53Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: use wayback machine to fix link timeouts for cfx_imagecr3.&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;
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>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=Getting_Started&amp;diff=2476</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=Getting_Started&amp;diff=2476"/>
				<updated>2015-05-04T16:23:39Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: Redirected page to Category:Getting Started&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[:Category:Getting Started]]&lt;br /&gt;
&lt;br /&gt;
Topics on how to get started with your Hostek.com hosting account.&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=MySQL_Workbench&amp;diff=2438</id>
		<title>MySQL Workbench</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=MySQL_Workbench&amp;diff=2438"/>
				<updated>2015-03-16T22:26:19Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
==What is MySQL Workbench?==&lt;br /&gt;
MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, and much more. MySQL Workbench is available on Windows, Linux and Mac OS.&lt;br /&gt;
==Where can I get MySQL Workbench?==&lt;br /&gt;
You can obtain a copy of MySQL Workbench here: [http://dev.mysql.com/downloads/workbench/5.2.html MySQL Workbench Download]&lt;br /&gt;
&lt;br /&gt;
==How do I connect to my database using MySQL Workbench? ==&lt;br /&gt;
Before connecting connecting to your database using MySQL Workbench, you'll have to first get the host name or the IP address of the Hostek MySQL server your database is on. &lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
#Login to your control panel&lt;br /&gt;
#Under Databases, Click on MySQL. &amp;lt;br /&amp;gt; [[File:Mysqlicon.png|350px]]&lt;br /&gt;
#You can find the host next to the database name. &amp;lt;br /&amp;gt; [[File:Mysqlscreen.png|350px]]&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
You should be able to use your domain name as the host. However in order to connect externally to your database with programs such as MySQL workbench you'll need to enable remote MySQL access to your database. &lt;br /&gt;
&lt;br /&gt;
Depending on your cPanel theme, the location and text may be different. The screenshots below are from the themes x3 and paper lantern.&lt;br /&gt;
&lt;br /&gt;
#Login to your cPanel&lt;br /&gt;
#Under Databases go to Remote MySQL. &amp;lt;br /&amp;gt; [[File:Mysqlcpanelicon.png|350px|x3 Theme]] [[File:Mysqlcpanelicon_paper.png|350px|Paper Lantern Theme]]&lt;br /&gt;
#If you have a specific static IP you want to grant remote access to, you can enter it here and click on &amp;quot;Add Host&amp;quot;. Otherwise you can grant remote access from any IP by entering % as the host and click on Add Host. &amp;lt;br /&amp;gt; [[File:Mysqlremoteaccess.png|350px|x3 Theme]] [[File:Mysqlremoteaccess_paper.png|350px|Paper Lantern Theme]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring MySQL Workbench ===&lt;br /&gt;
&lt;br /&gt;
# Open MySQL Workbench on your local machine&lt;br /&gt;
# Click on the (+) icon &amp;lt;br /&amp;gt; [[File:Mysqlworkbench.png|350px]]&lt;br /&gt;
# Fill in the connection details and you can optionally store your password in the vault. &amp;lt;br /&amp;gt; [[File:Mysqlworkbenchlogin.png|350px]]&lt;br /&gt;
&lt;br /&gt;
==How to use MySQL Workbench to backup your MySQL database==&lt;br /&gt;
&lt;br /&gt;
[[File:Mysqlworkbenchexportmenu.png|350px]] [[File:Mysqlworkbenchdataexport.png|350px]]&lt;br /&gt;
&lt;br /&gt;
# Click on Server in the menu and then click on Data Export &lt;br /&gt;
# Click the box next to the Schema (also known as a database) that you are wanting to export. (Optionally, you can change the location where the file is going to be dumped)&lt;br /&gt;
# Press the 'Start Export' button&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to use MySQL Workbench to Restore your MySQL database==&lt;br /&gt;
&lt;br /&gt;
[[File:mysqlworkbenchimportmenu.png|350px]] [[File:Mysqlworkbenchdataimport.png|350px]]&lt;br /&gt;
&lt;br /&gt;
# Click on Server in the menu and then click on Data Import &amp;lt;br /&amp;gt; &lt;br /&gt;
# Click on the button next to the &amp;quot;Import From Self-Contained File&amp;quot; textbox and select the MySQL dump file you want to import and select the target schema (also known as a database) or alternatively you can create a new schema.&lt;br /&gt;
# Press the 'Start Import' button&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Databases-MySQL]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlworkbenchimportmenu.png&amp;diff=2437</id>
		<title>File:Mysqlworkbenchimportmenu.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlworkbenchimportmenu.png&amp;diff=2437"/>
				<updated>2015-03-16T22:21:34Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlworkbenchexportmenu.png&amp;diff=2436</id>
		<title>File:Mysqlworkbenchexportmenu.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlworkbenchexportmenu.png&amp;diff=2436"/>
				<updated>2015-03-16T22:21:14Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlworkbenchdataimport.png&amp;diff=2435</id>
		<title>File:Mysqlworkbenchdataimport.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlworkbenchdataimport.png&amp;diff=2435"/>
				<updated>2015-03-16T22:20:57Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlworkbenchdataexport.png&amp;diff=2434</id>
		<title>File:Mysqlworkbenchdataexport.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlworkbenchdataexport.png&amp;diff=2434"/>
				<updated>2015-03-16T22:20:32Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=MySQL_Workbench&amp;diff=2433</id>
		<title>MySQL Workbench</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=MySQL_Workbench&amp;diff=2433"/>
				<updated>2015-03-16T21:47:54Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: /* How do I connect to my database using MySQL Workbench? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
==What is MySQL Workbench?==&lt;br /&gt;
MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, and much more. MySQL Workbench is available on Windows, Linux and Mac OS.&lt;br /&gt;
==Where can I get MySQL Workbench?==&lt;br /&gt;
You can obtain a copy of MySQL Workbench here: [http://dev.mysql.com/downloads/workbench/5.2.html MySQL Workbench Download]&lt;br /&gt;
&lt;br /&gt;
==How do I connect to my database using MySQL Workbench? ==&lt;br /&gt;
Before connecting connecting to your database using MySQL Workbench, you'll have to first get the host name or the IP address of the Hostek MySQL server your database is on. &lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
#Login to your control panel&lt;br /&gt;
#Under Databases, Click on MySQL. &amp;lt;br /&amp;gt; [[File:Mysqlicon.png|350px]]&lt;br /&gt;
#You can find the host next to the database name. &amp;lt;br /&amp;gt; [[File:Mysqlscreen.png|350px]]&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
You should be able to use your domain name as the host. However in order to connect externally to your database with programs such as MySQL workbench you'll need to enable remote MySQL access to your database. &lt;br /&gt;
&lt;br /&gt;
Depending on your cPanel theme, the location and text may be different. The screenshots below are from the themes x3 and paper lantern.&lt;br /&gt;
&lt;br /&gt;
#Login to your cPanel&lt;br /&gt;
#Under Databases go to Remote MySQL. &amp;lt;br /&amp;gt; [[File:Mysqlcpanelicon.png|350px|x3 Theme]] [[File:Mysqlcpanelicon_paper.png|350px|Paper Lantern Theme]]&lt;br /&gt;
#If you have a specific static IP you want to grant remote access to, you can enter it here and click on &amp;quot;Add Host&amp;quot;. Otherwise you can grant remote access from any IP by entering % as the host and click on Add Host. &amp;lt;br /&amp;gt; [[File:Mysqlremoteaccess.png|350px|x3 Theme]] [[File:Mysqlremoteaccess_paper.png|350px|Paper Lantern Theme]]&lt;br /&gt;
&lt;br /&gt;
=== Configuring MySQL Workbench ===&lt;br /&gt;
&lt;br /&gt;
# Open MySQL Workbench on your local machine&lt;br /&gt;
# Click on the (+) icon &amp;lt;br /&amp;gt; [[File:Mysqlworkbench.png|350px]]&lt;br /&gt;
# Fill in the connection details and you can optionally store your password in the vault. &amp;lt;br /&amp;gt; [[File:Mysqlworkbenchlogin.png|350px]]&lt;br /&gt;
&lt;br /&gt;
==How to use MySQL Workbench to backup your MySQL database==&lt;br /&gt;
Once you have installed MySQL Workbench launch it and under the &amp;quot;Server Administration&amp;quot; click on &amp;quot;New Server Instance&amp;quot;. This will pull up a new Instance wizard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Specify the Host Machine the Database Server is running on&amp;quot; click on &amp;quot;Remote Host&amp;quot; and for the address put an IP of the server that your database is on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Set the Database Connection values&amp;quot; screen you can leave &amp;quot;Connection Name&amp;quot; the same as the server IP or change it to something more meaningful like &amp;quot;My wordpress database server&amp;quot;. Leave &amp;quot;Connection Method&amp;quot; as &amp;quot;Standard (TCP/IP)&amp;quot;. Under the &amp;quot;Parameters&amp;quot; tab make sure that hostname matches the IP from the previous step. Leave port as &amp;quot;3306&amp;quot; and enter your database username. Click on &amp;quot;Store in Vault&amp;quot; and enter the password for the above user. Leave &amp;quot;Default Schema&amp;quot; empty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing the connection should give you three check marks and show &amp;quot;Database connection tested successfully.&amp;quot; Click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On &amp;quot;Set remote configuration parameters&amp;quot; UNCHECK &amp;quot;Enable SSH login based administration&amp;quot; and click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under &amp;quot;Create the Instance Profile&amp;quot; you can use something like &amp;quot;My backup&amp;quot; and click &amp;quot;Finish&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the steps above your &amp;quot;Workbench Central&amp;quot; should now have new connection listed under the &amp;quot;Server Administration&amp;quot; on the right. Click on &amp;quot;Manage Import / Export&amp;quot; link and then from the pop-up window click the instance you created earlier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Export to Disk&amp;quot; tab place a check-mark next to your database name. Under &amp;quot;Options&amp;quot; to the right check &amp;quot;Export to Self-Contained File&amp;quot; and click on &amp;quot;Start Export&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to use MySQL Workbench to Restore your MySQL database==&lt;br /&gt;
Once you have installed MySQL Workbench launch it and under the &amp;quot;Server Administration&amp;quot; click on &amp;quot;New Server Instance&amp;quot;. This will pull up a new Instance wizard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Specify the Host Machine the Database Server is running on&amp;quot; click on &amp;quot;Remote Host&amp;quot; and for the address put an IP of the server that your database is on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Set the Database Connection values&amp;quot; screen you can leave &amp;quot;Connection Name&amp;quot; the same as the server IP or change it to something more meaningful like &amp;quot;My wordpress database server&amp;quot;. Leave &amp;quot;Connection Method&amp;quot; as &amp;quot;Standard (TCP/IP)&amp;quot;. Under the &amp;quot;Parameters&amp;quot; tab make sure that hostname matches the IP from the previous step. Leave port as &amp;quot;3306&amp;quot; and enter your database username. Click on &amp;quot;Store in Vault&amp;quot; and enter the password for the above user. Leave &amp;quot;Default Schema&amp;quot; empty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing the connection should give you three check marks and show &amp;quot;Database connection tested successfully.&amp;quot; Click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On &amp;quot;Set remote configuration parameters&amp;quot; UNCHECK &amp;quot;Enable SSH login based administration&amp;quot; and click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under &amp;quot;Create the Instance Profile&amp;quot; you can use something like &amp;quot;My backup&amp;quot; and click &amp;quot;Finish&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the steps above your &amp;quot;Workbench Central&amp;quot; should now have new connection listed under the &amp;quot;Server Administration&amp;quot; on the right. Click on &amp;quot;Manage Import / Export&amp;quot; link and then from the pop-up window click the instance you created earlier. You may need to enter your database password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will select &amp;quot;Import from Dump Project Folder&amp;quot; and you can select the location through the &amp;quot;Folder Path&amp;quot; field. You will then click on the Load Folder Contents Button&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the Start Import button, you may be asked for the database password again. The length of time it takes for the import depends on the size of the backup of your database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Databases-MySQL]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=MySQL_Workbench&amp;diff=2432</id>
		<title>MySQL Workbench</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=MySQL_Workbench&amp;diff=2432"/>
				<updated>2015-03-16T19:07:17Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: /* How do I connect to my database using MySQL Workbench? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
==What is MySQL Workbench?==&lt;br /&gt;
MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, and much more. MySQL Workbench is available on Windows, Linux and Mac OS.&lt;br /&gt;
==Where can I get MySQL Workbench?==&lt;br /&gt;
You can obtain a copy of MySQL Workbench here: [http://dev.mysql.com/downloads/workbench/5.2.html MySQL Workbench Download]&lt;br /&gt;
&lt;br /&gt;
==How do I connect to my database using MySQL Workbench? ==&lt;br /&gt;
Before connecting connecting to your database using MySQL Workbench, you'll have to first get the host name or the IP address of the Hostek MySQL server your database is on. &lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
#Login to your control panel&lt;br /&gt;
#Under Databases, Click on MySQL. &amp;lt;br /&amp;gt; [[File:Mysqlicon.png|350px]]&lt;br /&gt;
#You can find the host next to the database name. &amp;lt;br /&amp;gt; [[File:Mysqlscreen.png|350px]]&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
You should be able to use your domain name as the host. However in order to connect externally to your database with programs such as MySQL workbench you'll need to enable remote MySQL access to your database. &lt;br /&gt;
&lt;br /&gt;
Depending on your cPanel theme, the location and text may be different. The screenshots below are from the themes x3 and paper lantern.&lt;br /&gt;
&lt;br /&gt;
#Login to your cPanel&lt;br /&gt;
#Under Databases go to Remote MySQL. &amp;lt;br /&amp;gt; [[File:Mysqlcpanelicon.png|350px|x3 Theme]] [[File:Mysqlcpanelicon_paper.png|350px|Paper Lantern Theme]]&lt;br /&gt;
#If you have a specific static IP you want to grant remote access to, you can enter it here and click on &amp;quot;Add Host&amp;quot;. Otherwise you can grant remote access from any IP by entering % as the host and click on Add Host. &amp;lt;br /&amp;gt; [[File:Mysqlremoteaccess.png|350px|x3 Theme]] [[File:Mysqlremoteaccess_paper.png|350px|Paper Lantern Theme]]&lt;br /&gt;
&lt;br /&gt;
==How to use MySQL Workbench to backup your MySQL database==&lt;br /&gt;
Once you have installed MySQL Workbench launch it and under the &amp;quot;Server Administration&amp;quot; click on &amp;quot;New Server Instance&amp;quot;. This will pull up a new Instance wizard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Specify the Host Machine the Database Server is running on&amp;quot; click on &amp;quot;Remote Host&amp;quot; and for the address put an IP of the server that your database is on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Set the Database Connection values&amp;quot; screen you can leave &amp;quot;Connection Name&amp;quot; the same as the server IP or change it to something more meaningful like &amp;quot;My wordpress database server&amp;quot;. Leave &amp;quot;Connection Method&amp;quot; as &amp;quot;Standard (TCP/IP)&amp;quot;. Under the &amp;quot;Parameters&amp;quot; tab make sure that hostname matches the IP from the previous step. Leave port as &amp;quot;3306&amp;quot; and enter your database username. Click on &amp;quot;Store in Vault&amp;quot; and enter the password for the above user. Leave &amp;quot;Default Schema&amp;quot; empty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing the connection should give you three check marks and show &amp;quot;Database connection tested successfully.&amp;quot; Click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On &amp;quot;Set remote configuration parameters&amp;quot; UNCHECK &amp;quot;Enable SSH login based administration&amp;quot; and click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under &amp;quot;Create the Instance Profile&amp;quot; you can use something like &amp;quot;My backup&amp;quot; and click &amp;quot;Finish&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the steps above your &amp;quot;Workbench Central&amp;quot; should now have new connection listed under the &amp;quot;Server Administration&amp;quot; on the right. Click on &amp;quot;Manage Import / Export&amp;quot; link and then from the pop-up window click the instance you created earlier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Export to Disk&amp;quot; tab place a check-mark next to your database name. Under &amp;quot;Options&amp;quot; to the right check &amp;quot;Export to Self-Contained File&amp;quot; and click on &amp;quot;Start Export&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to use MySQL Workbench to Restore your MySQL database==&lt;br /&gt;
Once you have installed MySQL Workbench launch it and under the &amp;quot;Server Administration&amp;quot; click on &amp;quot;New Server Instance&amp;quot;. This will pull up a new Instance wizard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Specify the Host Machine the Database Server is running on&amp;quot; click on &amp;quot;Remote Host&amp;quot; and for the address put an IP of the server that your database is on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Set the Database Connection values&amp;quot; screen you can leave &amp;quot;Connection Name&amp;quot; the same as the server IP or change it to something more meaningful like &amp;quot;My wordpress database server&amp;quot;. Leave &amp;quot;Connection Method&amp;quot; as &amp;quot;Standard (TCP/IP)&amp;quot;. Under the &amp;quot;Parameters&amp;quot; tab make sure that hostname matches the IP from the previous step. Leave port as &amp;quot;3306&amp;quot; and enter your database username. Click on &amp;quot;Store in Vault&amp;quot; and enter the password for the above user. Leave &amp;quot;Default Schema&amp;quot; empty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing the connection should give you three check marks and show &amp;quot;Database connection tested successfully.&amp;quot; Click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On &amp;quot;Set remote configuration parameters&amp;quot; UNCHECK &amp;quot;Enable SSH login based administration&amp;quot; and click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under &amp;quot;Create the Instance Profile&amp;quot; you can use something like &amp;quot;My backup&amp;quot; and click &amp;quot;Finish&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the steps above your &amp;quot;Workbench Central&amp;quot; should now have new connection listed under the &amp;quot;Server Administration&amp;quot; on the right. Click on &amp;quot;Manage Import / Export&amp;quot; link and then from the pop-up window click the instance you created earlier. You may need to enter your database password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will select &amp;quot;Import from Dump Project Folder&amp;quot; and you can select the location through the &amp;quot;Folder Path&amp;quot; field. You will then click on the Load Folder Contents Button&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the Start Import button, you may be asked for the database password again. The length of time it takes for the import depends on the size of the backup of your database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Databases-MySQL]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlremoteaccess_paper.png&amp;diff=2431</id>
		<title>File:Mysqlremoteaccess paper.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlremoteaccess_paper.png&amp;diff=2431"/>
				<updated>2015-03-16T17:44:47Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlremoteaccess.png&amp;diff=2430</id>
		<title>File:Mysqlremoteaccess.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlremoteaccess.png&amp;diff=2430"/>
				<updated>2015-03-16T17:44:28Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlcpanelicon_paper.png&amp;diff=2429</id>
		<title>File:Mysqlcpanelicon paper.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlcpanelicon_paper.png&amp;diff=2429"/>
				<updated>2015-03-16T17:44:04Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlcpanelicon.png&amp;diff=2428</id>
		<title>File:Mysqlcpanelicon.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlcpanelicon.png&amp;diff=2428"/>
				<updated>2015-03-16T17:43:49Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=MySQL_Workbench&amp;diff=2427</id>
		<title>MySQL Workbench</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=MySQL_Workbench&amp;diff=2427"/>
				<updated>2015-03-16T15:50:53Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: /* How do I connect to my database using MySQL Workbench? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__FORCETOC__&lt;br /&gt;
&lt;br /&gt;
==What is MySQL Workbench?==&lt;br /&gt;
MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, and much more. MySQL Workbench is available on Windows, Linux and Mac OS.&lt;br /&gt;
==Where can I get MySQL Workbench?==&lt;br /&gt;
You can obtain a copy of MySQL Workbench here: [http://dev.mysql.com/downloads/workbench/5.2.html MySQL Workbench Download]&lt;br /&gt;
&lt;br /&gt;
==How do I connect to my database using MySQL Workbench? ==&lt;br /&gt;
Before connecting connecting to your database using MySQL Workbench, you'll have to first get the host name or the IP address of the Hostek MySQL server your database is on. &lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
#Login to your control panel&lt;br /&gt;
#Under Databases, Click on MySQL. &amp;lt;br /&amp;gt; [[File:Mysqlicon.png|350px]]&lt;br /&gt;
#You can find the host next to the database name. &amp;lt;br /&amp;gt; [[File:Mysqlscreen.png|350px]]&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
You should be able to use your domain name as the host. However in order to connect externally to your database with programs such as MySQL workbench you'll need to enable remote MySQL access to your database. &lt;br /&gt;
#Login to your cPanel&lt;br /&gt;
#Under Databases go to Remote MySQL. &amp;lt;br /&amp;gt; If you have a specific static IP you want to grant remote access to, you can enter it here and click on &amp;quot;Add Host&amp;quot;. Otherwise you can grant remote access from any IP by entering % as the host and click on Add Host.&lt;br /&gt;
&lt;br /&gt;
==How to use MySQL Workbench to backup your MySQL database==&lt;br /&gt;
Once you have installed MySQL Workbench launch it and under the &amp;quot;Server Administration&amp;quot; click on &amp;quot;New Server Instance&amp;quot;. This will pull up a new Instance wizard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Specify the Host Machine the Database Server is running on&amp;quot; click on &amp;quot;Remote Host&amp;quot; and for the address put an IP of the server that your database is on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Set the Database Connection values&amp;quot; screen you can leave &amp;quot;Connection Name&amp;quot; the same as the server IP or change it to something more meaningful like &amp;quot;My wordpress database server&amp;quot;. Leave &amp;quot;Connection Method&amp;quot; as &amp;quot;Standard (TCP/IP)&amp;quot;. Under the &amp;quot;Parameters&amp;quot; tab make sure that hostname matches the IP from the previous step. Leave port as &amp;quot;3306&amp;quot; and enter your database username. Click on &amp;quot;Store in Vault&amp;quot; and enter the password for the above user. Leave &amp;quot;Default Schema&amp;quot; empty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing the connection should give you three check marks and show &amp;quot;Database connection tested successfully.&amp;quot; Click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On &amp;quot;Set remote configuration parameters&amp;quot; UNCHECK &amp;quot;Enable SSH login based administration&amp;quot; and click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under &amp;quot;Create the Instance Profile&amp;quot; you can use something like &amp;quot;My backup&amp;quot; and click &amp;quot;Finish&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the steps above your &amp;quot;Workbench Central&amp;quot; should now have new connection listed under the &amp;quot;Server Administration&amp;quot; on the right. Click on &amp;quot;Manage Import / Export&amp;quot; link and then from the pop-up window click the instance you created earlier.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Export to Disk&amp;quot; tab place a check-mark next to your database name. Under &amp;quot;Options&amp;quot; to the right check &amp;quot;Export to Self-Contained File&amp;quot; and click on &amp;quot;Start Export&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==How to use MySQL Workbench to Restore your MySQL database==&lt;br /&gt;
Once you have installed MySQL Workbench launch it and under the &amp;quot;Server Administration&amp;quot; click on &amp;quot;New Server Instance&amp;quot;. This will pull up a new Instance wizard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Specify the Host Machine the Database Server is running on&amp;quot; click on &amp;quot;Remote Host&amp;quot; and for the address put an IP of the server that your database is on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under the &amp;quot;Set the Database Connection values&amp;quot; screen you can leave &amp;quot;Connection Name&amp;quot; the same as the server IP or change it to something more meaningful like &amp;quot;My wordpress database server&amp;quot;. Leave &amp;quot;Connection Method&amp;quot; as &amp;quot;Standard (TCP/IP)&amp;quot;. Under the &amp;quot;Parameters&amp;quot; tab make sure that hostname matches the IP from the previous step. Leave port as &amp;quot;3306&amp;quot; and enter your database username. Click on &amp;quot;Store in Vault&amp;quot; and enter the password for the above user. Leave &amp;quot;Default Schema&amp;quot; empty&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing the connection should give you three check marks and show &amp;quot;Database connection tested successfully.&amp;quot; Click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On &amp;quot;Set remote configuration parameters&amp;quot; UNCHECK &amp;quot;Enable SSH login based administration&amp;quot; and click on &amp;quot;Next&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under &amp;quot;Create the Instance Profile&amp;quot; you can use something like &amp;quot;My backup&amp;quot; and click &amp;quot;Finish&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the steps above your &amp;quot;Workbench Central&amp;quot; should now have new connection listed under the &amp;quot;Server Administration&amp;quot; on the right. Click on &amp;quot;Manage Import / Export&amp;quot; link and then from the pop-up window click the instance you created earlier. You may need to enter your database password.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will select &amp;quot;Import from Dump Project Folder&amp;quot; and you can select the location through the &amp;quot;Folder Path&amp;quot; field. You will then click on the Load Folder Contents Button&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the Start Import button, you may be asked for the database password again. The length of time it takes for the import depends on the size of the backup of your database.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Databases-MySQL]]&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlscreen.png&amp;diff=2426</id>
		<title>File:Mysqlscreen.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlscreen.png&amp;diff=2426"/>
				<updated>2015-03-16T15:23:52Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: Kylet uploaded a new version of &amp;amp;quot;File:Mysqlscreen.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlscreen.png&amp;diff=2425</id>
		<title>File:Mysqlscreen.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlscreen.png&amp;diff=2425"/>
				<updated>2015-03-16T15:23:01Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: Kylet uploaded a new version of &amp;amp;quot;File:Mysqlscreen.png&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlworkbenchlogin.png&amp;diff=2424</id>
		<title>File:Mysqlworkbenchlogin.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlworkbenchlogin.png&amp;diff=2424"/>
				<updated>2015-03-16T15:17:36Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlworkbench.png&amp;diff=2423</id>
		<title>File:Mysqlworkbench.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlworkbench.png&amp;diff=2423"/>
				<updated>2015-03-16T15:17:15Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlscreen.png&amp;diff=2422</id>
		<title>File:Mysqlscreen.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlscreen.png&amp;diff=2422"/>
				<updated>2015-03-16T15:16:46Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	<entry>
		<id>https://wiki.hostek.com/index.php?title=File:Mysqlicon.png&amp;diff=2421</id>
		<title>File:Mysqlicon.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.hostek.com/index.php?title=File:Mysqlicon.png&amp;diff=2421"/>
				<updated>2015-03-16T15:16:19Z</updated>
		
		<summary type="html">&lt;p&gt;Kylet: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Kylet</name></author>	</entry>

	</feed>