Help! Installing MAMP + CF8 on Leopard

Jun 27, 2008

Ok, some help needed here:

I have a brand new Mac Pro at work; Running the latest and greatest version of OSX with all the security updates etc.

So I need to install CF locally, and have already installed MAMP.
MAMP I got working with no problems, and running on the default ports for MySQL + Apache.

Installed CF8, 64bit edition, and when installing, did the single server instance. I can't remember if I specified the built in webserver, or tried to point it to MAMP, but post installation, I had nothing in the web server config, so set up the web server connector as follows:

jrun Host: localhost
jrun Server: ColdFusion
Web Server: Apache
Configuration Directory: /Applications/MAMP/conf/apache
Configure web server for ColdFusion 8 Applications: ticked

And in Advanced:

Enable verbose logging for connector: unticked
Enable native OS memory allocator: unticked
Build Apache module from source using APache eXtenSion tool: unticked
Directory and file name of server binary: /Applications/MAMP/bin/apache2/bin/httpd
Directory and file name of server control script: /Applications/MAMP/bin/apache2/bin/apachectl

Now, when I try and start MAMP, mySQL runs, but Apache itself won't start.
I've checked that CF has written the appropriate lines into the http.conf file, which it has - it's added the .cfm extensions etc.

When I try and start Apache via Terminal, I get this:

Syntax error on line 1114 of /Applications/MAMP/conf/apache/httpd.conf:
Cannot load /Applications/ColdFusion8/runtime/lib/wsconfig/1/mod_jrun20.so into server: cannot create object file image or add library

"mod_jrun20.so" does exist in that location.

Any ideas what to try next?

**update**
Now solved! - installed the 32bit version instead of the 64bit version, as MAMP ain't got enough bits. :)
Thanks to Stephen Erat!

Comments

Steven Erat

Steven Erat wrote on 06/27/08 2:56 PM

I'm just waking up and am starting my first cup of coffee, so I may be foggy here...


I think the problem is that because you installed 64bit CF and tried to configure a 32bit version of Apache that comes with MAMP. Is MAMP available with a 64bit Apache? So perhaps the 32bit Apache cannot load the 64bit connector module mod_jrun20.so.

To see if this is the problem, try running the file command on the mod_jrun and on the htttpd binary file. Just do: $ file <path/to/file> and if its 64bit then it will say so (IIRC), but if its 32bit it doesn't specifically say 32bit.
Tom K

Tom K wrote on 06/27/08 3:11 PM

CF is coming back as 64bit under the file command, and as you say, httpd is coming back without the 64bit, i.e implying 32bit.

I downloaded the 64bit version as I assumed that Leopard would require it, being a 64bit OS.

WIll Leopard run the 32bit version of CF then?
Steven Erat

Steven Erat wrote on 06/27/08 3:24 PM

Yes, ColdFusion can run as a 32bit application on 64bit OSes. In fact, this is exactly what its been doing for many years on Solaris. I've been using a 64bit PowerMac G5 for 3 years and running ColdFusion 6.1, 7, and 8 on it just fine.

I think it should be possible to leave CF run as 64bit, but configure a 32bit connector for the webserver. The connector runs in the webserver process (it gets loaded by Apache) so they must be compatible, but it should be independent of how CF is installed.

Try running the wsconfig tool on the commandline instead of using ColdFusinoLauncher.app. On the commandline set up all the options and DO NOT use the -ws64 option. Then you should get a 32bit connector which will work with your Apache.

Alternatively, you can probably take a short cut by finding your wsconfig.jar, copy it to a temp directory and unjar or unzip it. Then look in the connectors directory for the 32bit version of the connector (mod_jrun20.so). Make sure you go into the subdirectory with the right architecture like mac-intel or macppc. Use the file command to make sure you get the one that's not 64bit. Then rename wsconfig/1/mod_jrun20.so to something else and replace it with the 32bit one you found in the jar.

more coffee now...
Tom K

Tom K wrote on 06/27/08 4:25 PM

Well, rather than go that whole process of creating a 32bit connector (as I'm still a bit of a mac n00b) I downloaded the 32bit version and reinstalled CF.

Everything works a charm (well, the CF administrator does at least)

Thanks Steven!
Blake Southwood

Blake Southwood wrote on 07/21/08 4:39 AM

I just bought CF8 and I have Apache 2.2 loaded but I can't get CF to work.
I can't get the administration cf page to show up nor any CF code to render.
What did I do wrong? I have a Macbook Pro and just got the hard drive
replaced by Apple and I still can't get CF code to work.
What are the steps - step by step to properly install CF8 on the mac
to use the Apache server - please? I called Adobe and I get sent to India and they
don't seem to know either. I also went to Adobe in San Jose, CA and they "refused" to
help me get it working ( so I could use it) and told me to call their 800 number.

I'm a former web developer (C and JavaScript and HTML ) for Charles Schwab.
I've never encountered so much frustration in my life with a software program - never ever.

In fact, anyone who helps me get it working I will send them a check for 100 dollars.
Tom K

Tom K wrote on 07/21/08 12:19 PM

Ok, I've added a quick step by step post, just for you. Aren't I nice.
See here: http://www.oxalto.co.uk/blog/index.cfm/2008/7/21/CF8--MAMP-on-OSX-step-by-step

Write your comment



(it will not be displayed)