Showing posts with label ColdFusion. Show all posts
Showing posts with label ColdFusion. Show all posts

Coldfusion9 - Change ColdFusion geographic/language locale value




You can display ColdFusion geographic/language locale value using the following code.


<cfoutput>
        <p>#getLocale()#</p>
</cfoutput>


ColdFusion determines the locale value as follows:
By default, ColdFusion uses the JVM locale, and the default JVM locale is the operating system locale. You can set JVM locale value explicitly in ColdFusion in the ColdFusion Administrator Java and JVM Settings page JVM Arguments field; for example:

-Duser.language=en -Duser.region=US


or

You can open the jvm.config file and change the 'java.args' entry. You can add the following entry at the end of 'java.args'. If those entries already exists, you can change the values of Duser.language and Duser.region as you wish.

-Duser.language=en -Duser.region=US

Here in my case i need to change to en_US. So my 'java.args' entry in 'jvm.config' is as follows.

root@coldfusion [~]# cat /opt/coldfusion9/bin/jvm.config | grep java.args
java.args=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -server -Djava.awt.headless=true -Djava.security.manager "-Djava.security.policy=/opt/coldfusion9/lib/coldfusion.policy" "-Djava.security.auth.policy=/opt/coldfusion9/lib/neo_jaas.policy" -Xmx2048m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=512m -XX:+UseParallelGC -Xbatch -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/../wwwroot/WEB-INF/cfform/jars -Duser.language=en -Duser.region=US



Reference:
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7fa3.html

cPanel - Apache configuration for Coldfusion 9



If there is any problems in connecting Coldfusion9 with apache in cPanel Server, you have to go through the following configurations to sort out the problem.


1. SELinux must be disabled in the server.
 
   /etc/selinux/config
 
   SELINUX=disabled

2. Check jrun module is loaded with Apache. If the result of following commmand is null do the step 3 and check again.
 
   root@server [~]# httpd -M | grep jrun
   Syntax OK
   jrun_module (shared)

3. The following script is used to build jrun module.
   root@server [~]# /opt/coldfusion9/runtime/lib/wsconfig/1/build_jrun22


   In order to load jrun_module with Apache, the following entries must be added in the httpd.conf.
   Adobe ColdFusion 9 JRun Module Connector for Apache httpd.conf is as follows.
 
   --------------------------------------------------------------------------------------------------------------------------------

   # JRun Settings Start

   <IfModule prefork.c>
       LoadModule jrun_module /opt/coldfusion9/runtime/lib/wsconfig/1/mod_jrun22.so
   </IfModule>


   <IfModule mod_jrun22.c>
      JRunConfig Verbose false
      JRunConfig Apialloc false
      JRunConfig Ignoresuffixmap false
      JRunConfig Serverstore /opt/coldfusion9/runtime/lib/wsconfig/1/jrunserver.store
      JRunConfig Bootstrap 127.0.0.1:51800
      #JRunConfig Errorurl url <optionally redirect to this URL on errors>
    #JRunConfig ProxyRetryInterval 600 <no. of seconds to wait before trying to reconnect to unreachable clustered server>
      #JRunConfig ConnectTimeout 15 <number of seconds to wait on a socket connect to a jrun server>
      #JRunConfig RecvTimeout 300 <number of seconds to wait on a socket receive to a jrun server>
      #JRunConfig SendTimeout 15 <number of seconds to wait on a socket send to a jrun server>
      AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf
   </IfModule>


   <IfModule mime_module>
      TypesConfig conf/mime.types
      AddType application/x-compress .Z
      AddType application/x-gzip .gz .tgz
 
      AddType application/vnd.adobe.air-application-installer-package+zip .air

   </IfModule>

   # JRun Settings End
 
  ---------------------------------------------------------------------------------------------------------------------------------


  There will be a 'mime_module' section in the httpd.conf. You just need to make sure that the following line is added in that section. If it is not there, just add those line in it.

  AddType application/vnd.adobe.air-application-installer-package+zip .air

  Note:-
  jrun module's .so file is different in different apache versions. So please note the location and name of .so file before adding it to httpd.conf file.
  The above configuration changes are based on Apache 2.x
  /opt/coldfusion9/runtime/lib/wsconfig/1/mod_jrun.so (Apache 1.3.x)
  /opt/coldfusion9/runtime/lib/wsconfig/1/mod_jrun20.so (Apache 2.0)
  /opt/coldfusion9/runtime/lib/wsconfig/1/mod_jrun22.so (Apache 2.x)


4. Direct modifications to the Apache configuration file may be lost upon subsequent regeneration of the configuration file.
   To have modifications retained, all modifications must be checked into the configuration system by running: /usr/local/cpanel/bin/apache_conf_distiller --update
   Create a backup copy of current httpd.conf before it.
 
   cp /usr/local/apache/conf/httpd.conf /usr/local/apache/conf/httpd.conf.bak

   /usr/local/cpanel/bin/apache_conf_distiller --update

   To see if your changes will be conserved, regenerate the Apache configuration file by running:
   /scripts/rebuildhttpdconf

5. There is a apache connector script used in coldfusion, /opt/coldfusion9/bin/connectors/apache_connector.sh
   It is look like as the following.
 
   --------------------------------------------------------------------------------------
   #!/bin/sh

   #
   # Configure the Apache connector.
   # -dir should be the *directory* which contains httpd.conf
   # -bin should be the path to the apache *executable*
   # -script should be the path to the script which is used to
   # start/stop apache
   #
   ../../runtime/bin/wsconfig \
   -server coldfusion \
        -ws apache \
   -dir /etc/httpd/conf \
   -bin /usr/sbin/httpd \
   -script /etc/init.d/httpd \
     -coldfusion

    exit $#
   ---------------------------------------------------------------------------------------------

   Make sure that the parameters, dir, bin and script are given as mentioned in the commented parts of the script.

   Check again jrun module is loaded with Apache.
   root@server [~]# httpd -M | grep jrun

6. Finally check colfusion binary file, /etc/init.d/coldfusion_9.
 
  .
  .
  .
  .
  CONNECTOR=""
  RUNTIME_USER=""nobody""
  JAVA_HOME="/opt/coldfusion9/runtime/jre"
  JAVA_EXECUTABLE="/opt/coldfusion9/runtime/jre/bin/java"
  DOCROOT="/usr/local/apache/htdocs"
  CF_DIR="/opt/coldfusion9"
  .
  .
  .
  .


  Note:-
  All the above configurations are based on default installation of colfusion and apache.
  If you have changed installation directory, you have to replace '/opt/coldfusion9' with the new directory.
  Here it is assumed that Coldfusion installed on /opt/coldfusion9 directory.

  You can check currently loaded apache configration using the command, httpd -V

  In a cPanel server, /etc/httpd is a symbolic link to /usr/local/apache/ so it can be used interchangeably.
  root@server [~]# ll /etc/httpd
  lrwxrwxrwx 1 root root 17 Jan  4  2011 /etc/httpd -> /usr/local/apache/

  /usr/sbin/httpd is a symbolic link to /usr/local/apache/bin/apachectl so it can be used interchangeably.
  root@server [~]# ll /usr/sbin/httpd
  lrwxrwxrwx 1 root root 31 Jan  4  2011 /usr/sbin/httpd -> /usr/local/apache/bin/apachectl*

Coldfusion9 Installation on CentOS Server



Coldfusion Installation on CentOS Server


Must be Check/Done Before Proceeding Installation:


1. # yum update
   -Update your CentOS server before proceeding installation.

2. Disable SELinux if it is already enabled.

3. # yum install libstdc++.so.5
    -To install the required libstdc++.so.5 C++ Library

4. # which httpd
    /usr/sbin/httpd
    httpd must be installed. It is needed the location of httpd binary file for the installation of coldfusion.

5. # uname -m
   -Check the architecture of the OS, whether it is 64 bit or 32 bit.

6. Note down the serial number if you have one or install the trial version.



Installation:



1. # cd /usr/local/src

   Download the correct 64/32 bit version of Coldfusion9 as per the OS architecure.
   You can follow the the URL given below to check the versions.

   # wget http://download.macromedia.com/pub/coldfusion/cf9_installer/ColdFusion_9_WWEJ_linux.bin
   -Download the 32 bit version

   # wget http://download.macromedia.com/pub/coldfusion/cf9_installer/ColdFusion_9_WWEJ_linux64.bin
   -Download the 64 bit version

2. # chmod +x ColdFusion_9_WWEJ_linux*.bin
   -To give executable permission to the downloaded installation binary file.

3.  For the 32-bit installation
    # ./coldfusion_9_WWEJ_linux.bin

    For the 64-bit installation
    # ./coldfusion_9_WWEJ_linux64.bin

4. Installation process will ask you somany questions. Select the options as you want to customize. The questions are as like the following.


DO YOU ACCEPT THE TERMS OF THIS LICENSE AGREEMENT? (Y/N): Y

====================================================
Install Type
------------

If you do not have a serial number, select either 30-day trial or Developer
Edition.

->1- Install new version of Adobe ColdFusion 9 with a serial number
2- 30-day trial
3- Developer Edition

Installation Choice: 1

Serial Number: XXXX-XXXX-XXXX-XXXX-XXXX-XXXX

====================================================
Installer Configuration
-----------------------

What kind of installation do you want?

->1- Server configuration
2- Enterprise Multiserver configuration
3- J2EE configuration (EAR file)
4- J2EE configuration (WAR file)

Choose one of the following options:: 1

====================================================
Is Adobe ColdFusion 9 (Server Configuration) Installed?
-------------------------------------------------------

You cannot install the server configuration of Adobe ColdFusion 9 if it is already installed on this computer.

Is there already a server configuration of Adobe ColdFusion 9 installed?

1- Yes
->2- No

ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT:: 2

====================================================
Subcomponent installation
-------------------------

The following options are available for installation.

An option marked with "[X]" in front will be installed and an option with "[ ]"
will not. Choosing an option will toggle it on or off

[X] 1) ColdFusion 9 Documentation
[X] 2) ColdFusion 9 Solr Services
[X] 3) ColdFusion 9 Search Services
[X] 4) Start ColdFusion on system init

5) Continue with installation

Select an option: 5

====================================================
Choose Install Folder
---------------------

Select the directory where you want to install Adobe ColdFusion 9.

Directory:

Default Install Folder: /opt/coldfusion9

ENTER AN ABSOLUTE PATH, OR PRESS <ENTER> TO ACCEPT THE DEFAULT
:

====================================================
Earlier Versions of Adobe ColdFusion installed?
-----------------------------------------------

If you installed an earlier version of ColdFusion on this computer, you can migrate your settings to Adobe ColdFusion 9.

Is there an earlier version of ColdFusion installed on this computer (for example, ColdFusion 6 or ColdFusion MX 7)?

1- Yes
->2- No

ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::

====================================================
Configure Web Servers
---------------------

Please configure your web server(s). If you do not configure a web server the
built-in web server will be used on port 8500 or the next available port.

1- Add Web Server Configuration
->2- Continue with installation

Choice: 1

****************************************************

->1- Apache
2- Sun ONE Web Server (iPlanet)
3- Cancel

What kind of web server are you configuring: 1

What directory contains your Apache configuration file (httpd.conf)? (For
example, on Red Hat Linux it could be located in the /etc/httpd/conf
directory if you installed from an rpm, or for SuSe Linux, it could be in
/etc/apache2)

Directory: /etc/httpd/conf

****************************************************

Where is the Apache program binary file? (For example, on Red Hat Linux it
could be /usr/sbin/httpd if you installed from an rpm, or for SuSE Linux it
could be located at /usr/sbin/httpd2) If you have more than one instance of
Apache on your computer, enter the binary file location for the Apache web
server that will use ColdFusion. (Note: this is not the Apache start and
stop script.)

File: /usr/sbin/httpd

****************************************************

Where is the control file that you use to start and stop the Apache web
server? (For example, this could be /etc/init.d/httpd on Red Hat Linux if
you installed from an rpm, /usr/sbin/apache2ctl on SuSe Linux, or it could
be /usr/local/apache/bin/apachectl on hand-compiled versions.)

File: /etc/init.d/httpd

****************************************************

Please configure your web server(s). If you do not configure a web server the
built-in web server will be used on port 8500 or the next available port.

1- Add Web Server Configuration
2- Remove Web Server Configuration
3- Edit:Apache : /etc/httpd/conf
->4- Continue with installation

Choice: 4

====================================================
Choose Adobe ColdFusion 9 Administrator Location
------------------------------------------------

Select the location of the web root for Adobe ColdFusion 9. This is where the installer places the Adobe ColdFusion 9 Administrator.

This directory must be the web root for one of the websites to be configured for use with Adobe ColdFusion 9.

Directory: (DEFAULT: /var/www/html):

====================================================
Runtime User
------------

Enter the name of the runtime user. This user must already exist on the system.

User Name: (DEFAULT: nobody):

====================================================
Configure ColdFusion with OpenOffice
------------------------------------

Configuring OpenOffice installation with ColdFusion will enable Office documents to be processing using OpenOffice. If OpenOffice is not configured ColdFusion will not be able to convert some Microsoft Office Documents to PDF. Check the documentation for more details.

1- Configure ColdFusion with local Openoffice installation
->2- Skip

ENTER THE NUMBER FOR YOUR CHOICE, OR PRESS <ENTER> TO ACCEPT THE DEFAULT::

====================================================
Administrator Password
----------------------

Enter the password that you will use to restrict access to the ColdFusion
Administrator.

This field is required.

Password: ********
Confirm Password: ********

====================================================
Enable RDS
----------

The ColdFusion Remote Development Service (RDS) lets developers using Adobe
tools remotely connect to this server for development purposes. RDS is required
for Line Debugging, Report Builder, and Dreamweaver Extensions.

If this is a production server, Adobe recommends that you disable RDS.
Note, however, that disabling RDS also disables debugging, the directory
browsing applets in the ColdFusion Administrator and some of the functionality
in the Report Builder.

Enable RDS (Y/N): Y
Password: *******
Confirm Password: ********

====================================================
Installation Confirmation
-------------------------

Installation Type:
Server configuration

Licensing:
Enterprise edition
Serial Number: XXXX-XXXX-XXXX-XXXX-XXXX-XXXX

Installation Directories:
Product: /opt/coldfusion9
Web root: /var/www/html

Server Information:
Web Server: Apache (/etc/httpd/conf)
Port:
Search Services: installed
ColdFusion Solr Search Services: installed
Documentation: installed
RDS: enabled

Disk Space Information (for Installation Target):
Required: 992,437,542 bytes
Available: 110,094,069,760 bytes

PRESS <ENTER> TO CONTINUE:

====================================================
Installing...
-------------

[==================]

====================================================
Installation Complete
---------------------

You have successfully completed the first step in installing Adobe ColdFusion





5. # cd /opt/coldfusion9/bin
   # ./coldfusion start
   # ./coldfusion stop
   -To start/stop coldfusion on the server.

6. To access the adminstrator panel, use the following link.
   http://[machinename]/CFIDE/administrator
   Enter the administrator password you have given during the installation.


Note:-

ColdFusion - Security: The requested template has been denied access to cfregistry


You may get an error(as shown below) in the browser when you try to access a website written in coldfusion.



By default, CFRegistry tag is disabled in the server. On CFMX this affects the CFApplication tag if client storage is left to it's default or set to "Registry".

At default, the CFApplicaiton tag has a parameter of clientstorage with a default value of Registry. By disabling the CFRegisty tag, this creates a conflict. To resolve the problem, the CFApplicaiton tag MUST include the clientstorage="Cookie" or clientstorage="Datasource_Name" to ensure that CFMX does not try to access the registry.

Here is an example of a good CFApplication tag.

<cfapplication name="Your_App_Name"
clientmanagement="yes"
sessionmanagement="yes"
setclientcookies="yes"
setdomaincookies="yes"
sessiontimeout="#createTimeSpan(0,8,0,0)#"
applicationtimeout="#createTimeSpan(0,8,0,0)#"
Clientstorage="Cookie"   <----- Add this line in cfapplication tag
loginstorage="session">

Note:- You can follow the links given below for clodfusion related information.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_a-b_5.html