Been wanting to get more comfortable developing locally on my MacBook Air so I decided to get Lucee / Tomcat up and running tonight while I watched the Flyers game. I found a great article that really made the process super simple:
Brian Love's Article on Installing Lucee on OSX
Following the instructions on this page really just made this point and shoot. I do want to learn how to setup multiple sites running either via apache or tomcat, but at this point I can develop locally.
Another item I wanted to figure out was how to connect to a mySQL server I have running on my VPS, so I didn't have to keep two DB's in sync. Doing a little digging a found a pretty simple way of doing this using an ssh tunnel. Here is the command that I ended up using:
ssh git@servername.com -p 22 -L 3306:127.0.0.1:3306 -N
You can shift that command to the background or just leave it running in a terminal window. Once you have this running you can then go into the Lucee administrator and create your datasource connection to your mySQL database like it is running on your local computer.
Was a very productive evening fiddling around...
ColdFusion Tidbits and other dribble
Inside find random bits of ColdFusion goodness, SQL scripts I find useful and anything else I feel is interesting.
Tuesday, December 15, 2015
Tuesday, December 1, 2015
Been a long time...
Hoping to start a more regular blogging schedule now that I am developing some projects for myself again. I am finally recharged and energized about programming. On a side note, if you ever are working somewhere that causes you to dread what you love, leave quickly, no matter the financial cost, I nearly stopped programming because I waited to long to leave and it has taken nearly 3 years to recover...
OK, now onto what I am working on, LemonsWiki, this is a project to curate and category all the 24 Hours of Lemons videos I can find on YouTube. It is written using Railo 3.3 at this time, soon it will be on Lucee 5.0. The database is mySQL, but may be moving to MongoDB. jQuery is used heavily, along with Bootstrap for the HTML5 framework. I am also debating using AngularJS for the front-end. The point of the project is to take something I love, racing and tie to to something else I love, programming, while learning a bunch of new technologies.
Other things I am doing with this project is using git, including my own private repository server, to develop locally, upload to my repository server and then when ready deploy to the production site. I will be adding a staging domain to the mix shortly as well so I can test changing on the production server prior to going to true production. Making this workflow change is a huge shift for me, I have been used to developing on a dev server, then pushing to a stage server, then going to a production server. All development being done on the server. Now I am running Lucee, IIS and mySQL locally on my desktop computer, using Brackets as my IDE. I must admit I am liking this new model of development in some ways, others I still need to figure out, like how to keep two DB's in sync.
Anyways, first of many more posts as I develop this site, officially it is live, but I haven't really announced it or done anything to promote, so this is kind of it's coming out party...Enjoy!
OK, now onto what I am working on, LemonsWiki, this is a project to curate and category all the 24 Hours of Lemons videos I can find on YouTube. It is written using Railo 3.3 at this time, soon it will be on Lucee 5.0. The database is mySQL, but may be moving to MongoDB. jQuery is used heavily, along with Bootstrap for the HTML5 framework. I am also debating using AngularJS for the front-end. The point of the project is to take something I love, racing and tie to to something else I love, programming, while learning a bunch of new technologies.
Other things I am doing with this project is using git, including my own private repository server, to develop locally, upload to my repository server and then when ready deploy to the production site. I will be adding a staging domain to the mix shortly as well so I can test changing on the production server prior to going to true production. Making this workflow change is a huge shift for me, I have been used to developing on a dev server, then pushing to a stage server, then going to a production server. All development being done on the server. Now I am running Lucee, IIS and mySQL locally on my desktop computer, using Brackets as my IDE. I must admit I am liking this new model of development in some ways, others I still need to figure out, like how to keep two DB's in sync.
Anyways, first of many more posts as I develop this site, officially it is live, but I haven't really announced it or done anything to promote, so this is kind of it's coming out party...Enjoy!
Labels:
AngularJS,
Bootstrap,
Brackets,
ColdFusion,
git,
IIS. Railo,
jQuery,
Lucee
Wednesday, June 25, 2014
IIS7 / .NET / Cookie Issue
Long time no post, but hoping to change that with shorter, more matter-of-fact items being posted here...
Anyways, today we ran into a problem that probably has been around for a while, but really came to light with a feature we added to our site. We noticed that sessions were not being sticky when someone closed and re-opened Internet Explorer 11, after a bit of testing and doing a fair amount of Google searches we came up with the culprit being .NET only having version 2 installed on our server. We have no real need for .NET, but there was a change in the user agent string in IE 11 that requires you to either patch your older version of .NET or install a new version of .NET.
Essentially, previous version or unpatched versions of .NET in IIS use a pattern matching string to detect which browser you have and whether you can accept cookies or not. Due to the change in the IE11 user agent, this no longer worked and made IE11 default to a cookieless browser, thus it no longer stored cookies, which when you have a site that relies on them is pretty important. Way to go Microsoft!
Anywhoo, the path to correcting this is easy enough, install .NET 4.5, reboot, patch, reboot, and maybe patch again...
Here is the article that led up down the path to figuring this out: http://www.hanselman.com/blog/IE10AndIE11AndWindows81AndDoPostBack.aspx
Anyways, today we ran into a problem that probably has been around for a while, but really came to light with a feature we added to our site. We noticed that sessions were not being sticky when someone closed and re-opened Internet Explorer 11, after a bit of testing and doing a fair amount of Google searches we came up with the culprit being .NET only having version 2 installed on our server. We have no real need for .NET, but there was a change in the user agent string in IE 11 that requires you to either patch your older version of .NET or install a new version of .NET.
Essentially, previous version or unpatched versions of .NET in IIS use a pattern matching string to detect which browser you have and whether you can accept cookies or not. Due to the change in the IE11 user agent, this no longer worked and made IE11 default to a cookieless browser, thus it no longer stored cookies, which when you have a site that relies on them is pretty important. Way to go Microsoft!
Anywhoo, the path to correcting this is easy enough, install .NET 4.5, reboot, patch, reboot, and maybe patch again...
Here is the article that led up down the path to figuring this out: http://www.hanselman.com/blog/IE10AndIE11AndWindows81AndDoPostBack.aspx
Sunday, February 19, 2012
ColdFusion 10 - Codename Zues is in BETA!
All the buzz on twitter about ColdFusion has been the release of ColdFusion 10 into open beta, along with a new sub-version of ColdFusion Builder with all the necessary pieces to work with ColdFusion 10. After reading the release notes and watching the following presentation I can not wait to dig in and start playing with the new functionality!
ColdFusion 10 on Labs.Adobe.com
ColdFusion 10 Demo App / Presentation
ColdFusion 10 on Labs.Adobe.com
ColdFusion 10 Demo App / Presentation
Thursday, September 1, 2011
Facebook + ColdFusion Part II
Ok, in my continuing quest to get OAuth working with the Facebook API and ColdFusion I learned another lesson. CFLOCATION or redirection via CFHEADER is not liked by the Facebook API, seems HTTP Status Code 301 or 302 cause you to land on a page with a Facebook Logo on it and then you need to click the logo to end up on the page where a user can authorize your application. I changed the CFLOCATION to a JavaScript top.location.href, all of a sudden the magic started happening the way I wanted it.
Next on the list, OAuth error handling in case a user has de-authorized your application, their access token has expired, the user has logged out or a couple of other cases. In any of these cases simply re-direct to the authorization page.
Next on the list, OAuth error handling in case a user has de-authorized your application, their access token has expired, the user has logged out or a couple of other cases. In any of these cases simply re-direct to the authorization page.
Wednesday, August 31, 2011
Facebook + ColdFusion
Ok, been working on this off and on now for a few months. I had an old FBML Facebook Application that I wanted to convert over to the Graph API since FBML is going to go away at some point. I got stuck on a number of bugs and I wanted to pass along the solutions to each here.
#1. A very odd / old ColdFusion error message about a missing form variable --- This is a relic back to ColdFusion 3.1 which will disappear soon, however if you aren't thinking straight or are programming after mid-night this one might catch for a while. Thanks to Ray Camden for a very useful blog post which helped me with a very simple solution to this problem.
#2. Finding and parsing the cookie which holds the keys to the OAuth castle. Again I stumbled across a useful blog post which helped me over this hurdle. (look for Cookie.fbs_[your app id])
After getting through these two problems, the rest seems pretty straight forward and just requires a bunch of JSON parsing.
The Facebook Graph API Explorer is very helpful for putting together your requests and seeing what is going to be returned.
The Facebook API Docs are also useful. It would be helpful if their were some ColdFusion examples in there, but it seems that Facebook favors PHP.
#1. A very odd / old ColdFusion error message about a missing form variable --- This is a relic back to ColdFusion 3.1 which will disappear soon, however if you aren't thinking straight or are programming after mid-night this one might catch for a while. Thanks to Ray Camden for a very useful blog post which helped me with a very simple solution to this problem.
#2. Finding and parsing the cookie which holds the keys to the OAuth castle. Again I stumbled across a useful blog post which helped me over this hurdle. (look for Cookie.fbs_[your app id])
After getting through these two problems, the rest seems pretty straight forward and just requires a bunch of JSON parsing.
The Facebook Graph API Explorer is very helpful for putting together your requests and seeing what is going to be returned.
The Facebook API Docs are also useful. It would be helpful if their were some ColdFusion examples in there, but it seems that Facebook favors PHP.
Tuesday, August 30, 2011
Suppressing white space being added when using CFFUNCTION
I have run into this several times and I am sure others have as well. I wrote a nice little CFFUNCTION to get rid of some redundant code. Write the function, implement the function and now my output is broken because of some extra spaces showing up in the page now. Duh, forgot to set output="false" on the CFFUNCTION tag, done this a bunch of times and will probably do it every once in a while still. Maybe this post will cause me to stop doing it and commit it to permit long-term memory...
A bit more of an example...
<cffunction name="GetDuh" returntype="string">
<cfset returnvar = "duh" />
<cfreturn returnvar />
</cffunction>
This is a big ...#GetDuh()#... moment
returns: This is a big ... duh... moment
Change <cffunction name="GetDuh" returntype="string" output="false">
returns: This is a big ...duh... moment
A bit more of an example...
<cffunction name="GetDuh" returntype="string">
<cfset returnvar = "duh" />
<cfreturn returnvar />
</cffunction>
This is a big ...#GetDuh()#... moment
returns: This is a big ... duh... moment
Change <cffunction name="GetDuh" returntype="string" output="false">
returns: This is a big ...duh... moment
Subscribe to:
Posts (Atom)