snow leopard ate my apache config files

Being a Mac Geek, I purchased Snow Leopard and did the upgrade this past Sunday night. I did not get a chance to make sure everything worked after the upgrade, but I assumed it did.

Today, however, I tried to start up one of my ColdFusion instances and then went to a site. I got the big "Forbidden You don't have permission to access / on this server." error message in my browser. After doing some digging and working with Phil, our Mac god, we found that the httpd.conf file was modified. Around line 173 of that file, there is a block of code that was changed to this:

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

That last line is the key. I changed "Deny" to "Allow" (case sensitive without the quotes). Then I restarted Apache.

Once that was done, I got the "Not Found The requested URL / was not found on this server." error. We used named servers in Apache. Well, I looked in the httpd-vhosts.conf file, and it has wiped out my entire file! This is where I had all of my servers set up. I had to find an old copy and get one from a coworker (thanks Asha!) to get back up and running.

So, before you upgrade to Leopard, make sure to back up your httpd.conf file and any of the files in the apache2/extra directory!

I did find that in the apache2/users directory there was a file entitled myusername.conf which has what was the original of the code posted above. So the upgrade knew enough to save this off, just not the other stuff.

fckeditor and setting up the aspell spell checker on mac osx

My team uses the FCKEditor for some rich text editing on one of our products. A new requirement requested of us by product development, is that the editor have spell check enabled. So, I started digging. It sounds like the Aspell spell checker is the one to go with. Enabled like this:

FCKConfig.SpellChecker = 'SpellerPages';

Our servers are Windows servers, but we do our development on our local machines. Half of our developers use Macs and the other half are on Windows. This is where the problem comes in. I need to get it to work in both environments.

So, I am attempting to get the spell checking working on my MacBook Pro. I downloaded and installed aspell and successfully tested it with this command in Terminal:

echo "this word is mispeled" | /opt/local/bin/aspell -a -d american -H

So, that works. That returns a list of potentials for the misspelled word(s).

But, I needed to modify the spellchecker.cfm file because the stock cfexecute is set up for a Windows environment. Here is the original call:

<cfexecute name="cmd.exe" arguments='/c type "#tempfile_in#" | "#aspell_dir#\aspell.exe" #aspell_opts# > "#tempfile_out#"' timeout="100"/>

Here is the call that I modified it to:

<cfexecute name="/opt/local/bin/aspell" arguments='-c -type "#tempfile_in#" | -a --lang=en_US --encoding=utf-8 -H > "#tempfile_out#"' timeout="100" />

The problem is, is the system hangs for quite some time and I have not gotten it to return in a timely fashion, or at all. The second file is created with the suggestions, but the server hangs. What am I missing in my arguments? Or is there a better way to call it?

I am not an expert at Aspell, as I just downloaded it yesterday. I have been digging through the documentation but have not come up with a solution. Any help would be appreciated!

***UPDATE***
I am making some progress on this this morning. Here is the code that I have called from Terminal on my Mac...and it works there!

cat "/pathToFile/textToCheck.txt" | aspell -a --lang=en_US --encoding=utf-8 -H --rem-sgml-check=alt > "/pathToFile/dude.txt"

I still cannot get that to work with cfexecute. Anyone have any ideas? It would be just like in the DOS command "/c" which I thought was "script" on Unix, but I still can't get it to work.

***UPDATE AND FIX***
I found the fix! After 8+ hours of working through this, I finally got it to work! The "command" is different between Terminal on a Mac and cfexecut. In the cfexecute call, you need to use "bash" and tell it with the -c and quotes that you are running in command line mode. Here they both are. I hope this helps Mac and Unix users!

In Terminal:

cat "/pathToFile/textToCheck.txt" | aspell -a --lang=en_US --encoding=utf-8 -H --rem-sgml-check=alt > "/pathToFile/dude.txt"

From cfexecute:

<cfexecute name="/bin/bash" arguments='-c "cat #tempfile_in# | #aspell_dir# -a --lang=en_US --encoding=utf-8 -H > #tempfile_out#"' timeout="100" />

Here are some links that helped me get it to work!

http://www.yolinux.com/TUTORIALS/unix_for_dos_users.html

http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000243.htm

mac java 1.6 and eclipse

While I was setting up my Mac last week, I installed Eclipse, because I use CFEclipse exclusively for CF development and Subclipse for my SVN interaction. Well, I had already installed CF and changed my default JVM by doing these steps so that ColdFusion would use Java 1.6 which I need for some Java libraries that I use, I noticed that Eclipse would not work.

One of the developers on my team (thanks Chris!) found that Eclipse needs to use jre1.5 so if you change your systems CurrentJDK, you will break Eclipse. The solution is to open the Eclipse.app package (show package contents command) and edit the info.plist with a text editor. Uncomment out the line that uses jdk1.5 and save the file. Eclipse will work again.

I hope this helps some people out that make the change to Java 1.6 for ColdFusion on a Mac and still want to use Eclipse for CF development.

my mac is here

My Mac Book Pro showed up last week in my cube! Woohoo! I started to install stuff, ColdFusion in particular, and well, what can I say other than I totally crashed my Mac OS. Nothing like sudo and chmod and what kind of havoc they can create in the hands of a total newbie to Unix. So yeah, I did a sudo chmod 666 on my Private folder, hoping to fix some permissions issues. LOL.

Yup, in under 24 hours from getting my Mac, I had to put the DVD in and set it up again. But, we live and learn. And learn I did. I learned to use Google ALOT and make sure to write down what I was doing or what I had to do (or print it off) and boom, in about two days, I got CF set up and all of my other applications, and of course VMWare Fusion because I just can't part with my TOAD for SQL Server.

Today I was put to the test. We had an issue with one of our products in our test environment, and I had to spin up an instance of CF to run a test script, use CoRD to remote into a server, spin up my VM and TOAD to get some query data, and use Subclipse to check the history on our latest release branch. After we had fixed the issue, I sat in my cube and thought, heck yes, I can do this. Some growing pains, but now I am comfortable and just showed myself that I can use my Mac to do everything that I could with my PC.

I have to say that I really like the Mac OS interface and that stuff just works; setting up my mouse, keyboard, wireless, and printer. Sometimes I find that I can't figure things out, and then I sit back and when I stop trying to over complicate things like Windows often does, I figure it out immediately. I am a fan of my Mac and of Mac OS X. Oh yeah, and my wife named my named my Mac, Macenzie.

just ordered my new mac book pro

Here at work, we get to order a new computer every three years. Three years ago, I ordered a Dell Inspiron 9300 with a 17" widescreen display. It has a Pentium M 2.13GHz processor (single core) with 2GB of memory, and an 80GB 7200RPM hard drive. This of course was and still is running Windows XP Pro. Three years ago that was a great machine.

Enter November 2008. After dealing with many Windows issues, rebuilding my machine twice in three years, and spending hours doing that along with troubleshooting Windows issues, I decided that enough was enough and I was going to order a Mac. Why? Because Macs just work.

So, what did I order? It worked out that I was given the go-ahead after Apple released the new Mac Books. Here are the specs of my new Mac.

Mac Book Pro
2.53GHz Intel Core 2 Duo
15-inch widescreen
4GB Memory
250GB Serial ATA @ 7200RPM
NVIDIA GeForce 9400M + 9600M GT with 512MB

I ordered a copy of VMWare Fusion for those few applications (TOAD for SQL Server and Altova XML Spy) that do not run on Mac OSX. Also, for browser testing in Internet Explorer, I need to run Windows.

Now I play the waiting game. Purchasing is ordering it today, but it could be a few weeks (or even a month argh!) before I see the new Mac. I am very excited to be getting the Mac. I feel I have much to learn about Mac OSX, but I am up to the challenge and welcome the change!

BlogCFC was created by Raymond Camden. This blog is running version 5.7.002.