Latest Posts

ColdFusion 8 on Leopard with Apache - an answer for the rest of us

Posted on October 29, 2007, under ColdFusion | 29267 Views

Mark Drew had a recent post describing his success in running ColdFusion 8 on Leopard. Unfortunately for me (and apparently several others) no matter how many deletes and reloads it didn't work for me. Just for the sake of completeness, I deleted the directories, emptied the trash, then rebooted between installations. Same exact problem with each installation.

I could get both the standalone and multiserver editions running from the terminal prompt using either of the following commands.

Standalone ColdFusion:
sudo /Applications/Coldfusion8/bin/coldfusion start &

Or for the Jrun Server Edition:
sudo /Applications/JRun4/bin/jrun -start cfusion &

In both of these cases, it started up and I was able to open the ColdFusion Administration page.

My problem was that I really wanted to get it working with Apache but I was having issues with the connector. The error became clearer when issuing the command: sudo /usr/sbin/httpd which returned this message:

Cannot load /Applications/JRun4/lib/wsconfig/1/ into server: dlopen(/Applications/JRun4/lib/wsconfig/1/, 10): no suitable image found. Did find:\n\t/Applications/JRun4/lib/wsconfig/1/ mach-o, but wrong architecture

A post by Ulf Unger on CF-Mac about Compiling Apache 2 2 Module on Leopard for ColdFusion MX 7 highlighted the answer.

go to terminal window.
cd /Applications/JRun4/lib
unzip -d src wsconfig.jar
cd src/connectors/src

apxs -c -Wc,-arch -Wc,x86_64 -Wl,-arch -Wl,x86_64 -n jrun22 \
mod_jrun22.c jrun_maptable_impl.c jrun_property.c jrun_session.c \
platform.c jrun_mutex.c jrun_proxy.c jrun_utils.c

apxs -i -n jrun22 -S LIBEXECDIR=/Applications/JRun4/lib/src/connectors/src/ \


Now run the connector configuration:
sudo java -jar /Applications/JRun4/lib/wsconfig.jar

After it finishes, run this command:
cp /Applications/JRun4/lib/src/connectors/src/ /Applications/JRun4/lib/wsconfig/1/

sudo apachectl restart

Knowing that some folks may have trouble with installing the Apple Developer tools on the Leopard DVD just to make a 90k file, I've attached the updated to this post. Run the wsconfig command then ignore the errors. After it has finished, Click the download link below and then replace your with the file in the zip.

I've tried this on a newer mpb, a first gen mbp, and a macbook with success. Let me hear from you if you have any issues with this.


UPDATE: Oct 30, 2007

You can mix/match to just compile for your mac

/usr/sbin/apxs -c \ -Wc,-arch -Wc,ppc7400 -Wl,-arch -Wl,ppc7400 \ -Wc,-arch -Wc,ppc64 -Wl,-arch -Wl,ppc64 \ -Wc,-arch -Wc,x86_64 -Wl,-arch -Wl,x86_64 \ -Wc,-arch -Wc,i386 -Wl,-arch -Wl,i386 \ -n jrun22 /Applications/Coldfusion8/runtime/lib/bak/connectors/src/mod_jrun22.c \ /Applications/Coldfusion8/runtime/lib/bak/connectors/src/jrun_mutex.c \ /Applications/Coldfusion8/runtime/lib/bak/connectors/src/jrun_property.c \ /Applications/Coldfusion8/runtime/lib/bak/connectors/src/jrun_proxy.c \ /Applications/Coldfusion8/runtime/lib/bak/connectors/src/jrun_session.c \ /Applications/Coldfusion8/runtime/lib/bak/connectors/src/jrun_utils.c \ /Applications/Coldfusion8/runtime/lib/bak/connectors/src/platform.c

Related Blog Entries