Blog

Blog Archives - 112 Record(s)

Remove Filter Year: '2008'

ColdBox 2.6.2 is now released, merry x-mas!!

Posted by Luis Majano
Dec 21, 2008 00:00:00 UTC

In full X-Mas spirit, here is my X-Mas Gift to the ColdFusion Community: ColdBox 2.6.2 Final Release codename series "FAITH". 

This is a major maintenance release that is full of joy and goodies.  There have been over 33 critical fixes to the core, over 4 major sample applications added, over 5 more documentation guides and about 30 nice little additions that will make you giggle with joy!! So what are you waiting for, download it now!

Enjoy it and don't bother me as I leave for vacation tomorrow to El Salvador, to enjoy lots of sun, beach, good food and family!!

Railo's cool serialize() method, serialize anything!

Posted by Luis Majano
Dec 16, 2008 00:00:00 UTC
I have been developing more and more on Railo and I am really liking some of its unique features due to its simplicity and total awesomeness. Here is a small tip on how to serialize complex objects such as queries, structures, arrays, and a whole gammut of all those types NESTED!!. All you need to do is call the serialize() method to convert the entire complex object into its string represenation. Then call evaluate() and Railo will evaluate the text back to its original object. EASY!!

At least much easier than trying to do serialization and deserialization with java. Anyways, I thought I would share this little tip:

myStruct = {fname:'Luis',lname:'Majano',great:'You Know it!!',

dates:[now(),now()+1,now()+2],

TodayIs:'#now()#'};

dump(myStruct);

//Serialize the struct

MySerialization = serialize(myStruct);

writeOutput("MySerialized Structure: #MySerialization#");

//Reinflate it back.

NewStruct = evaluate(MySerialization);

dump(newStruct);

Tip when creating case sensitive structure keys in ColdFusion

Posted by Luis Majano
Dec 16, 2008 00:00:00 UTC
This is a tip and reminder (I just spent like 10 minutes shouting why why why!!), of a very subtle difference when creating structures in CF. AT first glance creating something like the following will produce what you expect:

mappings = structnew();

mappings.FirstName = "Luis";

mappings.LastName = "Majano";

You would say that the keys for this structure would be "FirstName" and "LastName" would you? Well, the answer is NO!! The keys would be "FIRSTNAME" and "LASTNAME" because the are uppercased by CF. If you really want to keep case, then don't use dot notation but array notation:

mappings = structnew();

mappings["FirstName"] = "Luis";

mappings["LastName"] = "Majano";

By using array notation you are explicitly setting the key with the correct case. I re-discovered this gem by yes, UNIT TESTING, the ColdBox caching engine and some tests where failing because the keys could not be found. Well, DUUHHHH!!! You where assigning them wrong. Anyways, I thought I would share my stupidity on the matter and hopefully save someone or even myself in the future, the few minutes of "WHY WHY WHY!!"

Railo Resin Apache and Mac OS X A FAST Combination

Posted by Luis Majano
Dec 05, 2008 00:00:00 UTC
Installing Railo + Apache in Mac OSX

This step by step guide is to show you how to install Railo and create a connector to Apache in Mac OS X. I am now using Railo as my development environment due to its speed and strict coding that I can assign to it. This makes sure that every ColdBox release is what it is supposed to be. I am still amazed at how fast and stable Railo is and I highly encourage you to give it a shot!

Anyways, now for the fun.

1) Download Railo from http://railo.ch/en/index.cfm?treeID=224

I downloaded the All OS download: railo-3.0.1.000-resin-3.1.2-without-jre.zip (39 MB)

Once downloaded I unpacked it and installed it in

/Applications/railo

2) Remove some windows files, because I am a cleanup freak.

rm -rf httpd.exe setup.exe win32

3) Let's compile the apache connector by following these commands, but first cd into the Railo directory via your terminal.

$ cd /Applications/railo

$ ./configure --with-apxs=/usr/sbin/apxs --with-java-home=/System/Library/Frameworks/JavaVM.framework/Home

Update:

For java in 64 bit mode (snow leopard or leopard), use the following command:

./configure --with-apxs=/usr/sbin/apxs --enable-64bit

This should spurt out a long list of compilation checks and please look at my java home as my default jvm in my Mac. Once it finishes it should finish with the following:

configure: creating ./config.status

config.status: creating Makefile

config.status: creating modules/c/src/Makefile

config.status: creating modules/c/src/common/Makefile

config.status: creating modules/c/src/apache1/Makefile

config.status: creating modules/c/src/apache2/Makefile

config.status: creating modules/c/src/resin_os/Makefile

config.status: creating contrib/init.resin

config.status: executing depfiles commands

This means we are done. So now let's make and install the mod_caucho.so connector.

$ make

$ make install

After this, you should be A-OK. The script will copy mod_caucho.so to /usr/libexec/apache2/mod_caucho.so and modify your apache conf with

#

# mod_caucho Resin Configuration

#

LoadModule caucho_module /usr/libexec/apache2/mod_caucho.so

ResinConfigServer localhost 6800

CauchoConfigCacheDirectory /tmp

CauchoStatus yes

Now it is up to you if you want to configure specifc virtual hosts to use resin or not. Example:

ServerName railo.jfetmac

DocumentRoot /Users/lmajano/Documents/MyDevelopment/

Options Indexes FollowSymLinks MultiViews Includes

DirectoryIndex index.html index.htm login.cfm index.php index.cfm

ResinConfigServer localhost 6800

CauchoConfigCacheDirectory /tmp

CauchoStatus yes

SetHandler caucho-status

Now we open the /Applications/railo/conf/resin.conf and add a few aliases that map our web application to apache:

railo.mac

After that just fire up apache and the resin server by running:

/Applications/railo/bin/httpd.sh

After that, the server runs and your application is up and running!!

Update

Some people have not been able to compile mod_caucho because Apache is running in 64bit mode and the caucho mod is 32 bit mode. Here is some extra help for you:

Here's how to change your apache to run in 32 bit mode.

From Adobe.com

---------------------------------------------

To switch Apache from running in 64-bit to 32-bit on Mac OS X 10.5, do the following:

1. Go to /usr/sbin and make a backup of httpd (for example,

httpd.back).

2. Run the following command from the terminal:

sudo lipo httpd -thin i386 -output httpd

3. To confirm the resulting http architecture, from /usr/sbin, run

the following command:

file httpd

4. The file command should give httpd:Mach-O executable i386.

5. Restart Apache by running the following command:

sudo ./apachectl restart

6. The conf file (httpd.conf) location remains the same

(/etc/apache2).

Vote for ColdBox Sessions for CFUnited

Posted by Luis Majano
Dec 04, 2008 00:00:00 UTC
CFUnited has opened their voting for sessions and ColdBox needs your support, so please go here: http://cfunited.com/go/survey/166 and vote for our sessions.

ColdBox 2.6.2 RC is now out!!

Posted by Luis Majano
Nov 24, 2008 00:00:00 UTC
ColdBox 2.6.2 RC is now out and about. Go to the downloads section and get it. This release is an incredibly ambitious release with tons of new updates and NEWS, you don't want to miss!!

Tons of updates, from LightWire Collaboration, Model Integration, SES package resolving, Dashboard going open source, new application generation, templating, and soooo much more.

Codex Wiki 0.5 Beta 1 released, enjoy!

Posted by Luis Majano
Nov 24, 2008 00:00:00 UTC
We have released our first open beta for the Codex Wiki with Mark Mandel and myself. This has been a truly great project to work with Mark. The wiki keeps getting better and better. We have done too many updates to count on right now, but we will be releasing more notes on it and some video tutorials on it during the coming weeks. So what are you waiting for, get wiki writing now!!

CFImage Captcha Error on not finding Fonts Need Help

Posted by Luis Majano
Nov 19, 2008 00:00:00 UTC
I have a vm running ubuntu with CF 8.01 and I am testing cfimage to create a captcha and it fails on linux but not on my windows and mac boxes. The error I get is the following:

The VERDANA,ARIAL,TIMES NEW ROMAN,COURIER font name is/are not supported. The problem is that this works on windows and mac? Here is the code?

text="#arguments.text#"

width="#arguments.width#"

height="#arguments.height#"

fonts="verdana,arial,times new roman,courier" />

I checked on the CF admin, and all of the fonts are installed. So why do I get this on Linux based cf? Any ideas?

ColdFusion Camp in Munich Next Week

Posted by Luis Majano
Nov 19, 2008 00:00:00 UTC

Are you in Europe? Are you a CF Developer? Are you going to ColdFusion Camp 2008 in Munich?

Well, you BETTER!!

It promises to be a great 1-day conference with lots of awesome presentations from Gert Franz of Railo, Mark Drew and yours truly. So head over to the CFCamp website and register.

And if it where not enough, I will be doing a CBOX-100 training course November 28th for only 300 euros. So head over here and register, you don't want to miss this one.

CBOX-100 Intro To ColdBox now open for registration in Europe

Posted by Luis Majano
Nov 11, 2008 00:00:00 UTC
We will be giving a CBOX-100 Intro To ColdBox Training course November 28th at ColdFusion Camp 2008 in Munich. So if you are interested in getting some ColdBox training for really cheap (298 euro), then head over to the ColdFusion Camp 2008 website and register for training now!

Site Updates

Archives

Entries Search