Here's a tricky little bug that I missed during a recent upgrade. The customer had Coldfusion 6.1 and we were tasked with moving them to Coldfusion 8. After reviewing the code and determining that no changes would be necessary, we did the upgrade. After we were finished everything seemed fine except one obscure task that was set up to run periodically. It was a command line task using Cfexecute. The task accessed the mysqlump.exe file to create periodic backups of the mysql database. The code (which was working on CF 6.1) looked like this:
So if you are troubleshooting Cfexecute after an upgrade to 7 or 8 and you are getting missing file exceptions and scratching your head. Check to see if you are using the old style Cfexecute syntax where the executable and the arguments are all on the same line and passed in the "name" argument. If you are, take the "arguments" portion of the command line and move them to the "arguments" attribute of the cfexecute tag. That might do the trick.
Ever so often an uber-geek Coldfusion programmer will ask me the question, "so.... what's your favorite Coldfusion tag?" It reminds me of a barfly asking "what's your sign". Nobody ever asks about my favorite CF function (I think I like "isValid( )" - very chic). As for my favorite tag, there are so many to choose from. Cfinvoke is a powerful, as is cfimport. Of course little actual work is ever done in CF without Cfquery. Cfcomponent and Cffunction earn high marks as well. But if you want to know my all time favorite tag I would have to say there are 2 tags that are more important and more useful than any other. In fact, I would say that the effective use of these two tags has made me into the Coldfusion Guru evangelist that I am today. If it wasn't for these 2 tags, people would not flock to my 72 Oldsmobile when I pull up at the quickie mart. I would not be able to afford that cubic zirconium ring I purchased for my lovely wife - and the Hottentots would just seem un-hot. Let me just step into the pulpit and tell you about them.
(Note: I've been sick and taking medication so please forgive me for the following)
I ran across this JVM configuration on a server recently. I should note that the server in question was having some issues, so this is not an endorsement of this approach. I simply had not seen this sort of configuration on a Coldfusion server before. Here are the JVM arguments:
Recently I got an error I had never seen before. That's news in itself. This error was especially cryptic. The template in question made a CreateObject() call to a CFC that was quite lengthy. In fact, this CFC was over 2000 lines of code (Coldfusion 7). When it tried to compile the code it threw an error that said branch target offset too large for short. You know you are a true geek when seeing an error you have never seen before raises your pulse. I started hunting for a solution - and I found one.
Read More
Everyone should have regular backups and a plan for restoring a server if something goes wrong. But let's say, for the sake of argument, that you have a problem with a server where all you have is the old drive with the Coldfusion install directory (c:\cfusionmx7\ for the sake of our scenario). If you have to do a reinstall, is there a way to get back all that careful tuning, datasources (there can be a lot of these), debugging IPs, settings, CFX tags, Mail settings, etc.? Actually it is not as hard as you think.
Do a fresh install to the same location as before (C:\CfusionMX7 in this case) being careful not to overwrite the old directory. You may need to rename that old directory if you are using the same drive over again. Once CF is completely installed and running, stop the server and any associated services like search, odbc server etc. Then install the "old" directory over the new. Use a rename if you like. The main issue is that the old directory should replace the new. Restart the services and log into the CF admin. If the admin fails to come up may have to rerun the "connector" script for your web server (found in CfusionMX7/bin/connetors). These magic scripts set ports and other things that "hook" your Coldfusion server into your web server.
Now before you add mean comments please know that I am aware there are other ways of doing this. You can grab several config files and anything that is an XML file from the old directory and simply copy them into the new directory and it will work. You can use wsconfig to recreate the services - possibly without a reinstall. I'm sure there are clever people out there that have all kinds of nifty tricks. This is just one trick that takes care of this scenario. But this trick is especially useful when you have to walk an inexperienced tech through it over the phone. The concepts are easy to understand and easy to guide someone through.
Hello Muse readers. It's been a long time between posts and that's quite unlike me. I've been vacationing, traveling, and swamped with new business. My biggest headache at the moment is finding advanced developers to join my team so if you know anyone send them my name. We are a Coldfusion shop doing high level Coldfusion and Flex work and we need 2 advanced developers as we speak. We have great wages and benefits and Omaha is one of the top 10 places in the country to live - just ask my friend and neighbor Warren Buffet (ha). Meanwhile, here's today's tip.
Let's suppose you have a production CFMX server where trusted cache is turned on. At some point you have to do some quick troubleshooting due to an error so you also turn on debugging. In the debug information you see the error detail and you know exactly what to do to get it fixed. What's your next move? Of course, using CFEclipse or Homesite or (gulp) Dreamweaver you open the file and make a change - then you refresh the page. What happens? Actually 2 very contradictory things happen.
Read More
If you ever find yourself trying to support a server without knowing which updaters or hot fixes have been applied you will find this link a very useful. It includes this table:
6,0,0,48097 | ColdFusion MX |
6,0,0,52311 | ColdFusion MX + Updater 1 |
6,0,0,55693 | ColdFusion MX + Updater 2 |
6,0,0,58500 | ColdFusion MX + Updater 3 |
6,1,0,63958 | ColdFusion MX 6.1 |
6,1,0,xxxxx | ColdFusion MX 6.1 + hot fix |
6,1,0,83762 | ColdFusion MX 6.1 Updater |
7,0,0,91690 | ColdFusion MX 7 |
7,0,1,116466 | ColdFusion MX 7.0.1 |
7,0,2,142559 | ColdFusion MX 7.0.2 |
As for hotfixes, once you know the updater you will have to search through the class path listed under system information for the specific hot fixes deployed. They all start with "hf".
Muse Reader Elliot Kayne Asks:
I have a CF 7.2 server and it is creating huge jrun_iis6_wildcard logs. Everyday I see 2gig log files. It is burning up drive space. How do I stop this crazy thing?
In case you are wondering the log files in question are hidden in the /cfusionmx7/runtime/lib/wsconfig/ directory. You will see numbered directories in there - possibly one for each site depending on your configuration. inside the numbered directory will be a sub-directory called "LogFiles" and inside of the logfiles directory is a set of, you guessed it, log files. These files log operations associated with the wildcard ISAPI filter. Elliot’s log files where growing quite large on a daily basis.
Read More