0
votes

I'm using

  • mac OS 1.8.3
  • RVM 1.19.6
  • Ruby ruby 1.9.3p327
  • Apache 2.4
  • Phusion Passenger 3.0.19

After an error free install of Apache I launched the server and it worked.

I wrote a 'start_apache.sh' script:

#!/bin/bash 
sudo /usr/local/apache2/bin/apachectl -k start

... which worked.

I then installed phusion passenger without error.

When I ran my start_apache.sh script, I got this error

httpd: Syntax error on line 504 of /usr/local/apache2/conf/httpd.conf: Cannot load /Users/perry_mac/.rvm/gems/ruby-1.9.3-p327/gems/passenger-3.0.19/ext/apache2/mod_passenger.so into server: dlopen(/Users/perry_mac/.rvm/gems/ruby-1.9.3-p327/gems/passenger-3.0.19/ext/apache2/mod_passenger.so, 10): Symbol not found: _unixd_config\n Referenced from: /Users/perry_mac/.rvm/gems/ruby-1.9.3-p327/gems/passenger-3.0.19/ext/apache2/mod_passenger.so\n Expected in: flat namespace\n in /Users/perry_mac/.rvm/gems/ruby-1.9.3-p327/gems/passenger-3.0.19/ext/apache2/mod_passenger.so

After following ++ a lot ++ of 'Can't loadModule' Q&A's, I tried

cd /usr/local/apache2/bin
sudo apachectl -k start

... and it worked.

Using the script still does not.

Can someone explain why?

Many thanks!

3

3 Answers

1
votes

Maybe it has to do with the working directory. Try this:

#!/bin/bash 
cd /usr/local/apache2/bin/ && sudo ./apachectl -k start
0
votes

Maybe this is some issue with user profile. Could you check environmental paramentrs values?

0
votes

Thank you rzymek.

Your insight lead me to try this:

perrys-MacBook-Pro:bin perry_mac$ ls
ab      apxs        dbmmanage   envvars-std htcacheclean    htdigest    httpd       logresolve
apachectl   checkgid    envvars     fcgistarter htdbm       htpasswd    httxt2dbm   rotatelogs
perrys-MacBook-Pro:bin perry_mac$ pwd
/usr/local/apache2/bin
perrys-MacBook-Pro:bin perry_mac$ which apachectl
/usr/sbin/apachectl
perrys-MacBook-Pro:bin perry_mac$ 

Here's what happened: I downloaded, built, and installed apache 2.4. Did not know mac OSX 10.8.3 still had a working apache installation. I had read some web posts about how Apple had "removed web sharing" from this OS version. Turns out that means they removed a GUI element, but left the server in place. As you can see, I now have two versions of apachectl and httpd. I am untangling the rest of the mess now. As a follow-up, if anyone has advice on how to best proceed, please comment below. Otherwise I am going to start by modifying $PATH and see how that goes.

ADDENDUM: Looks like this lead to a component of my confusion: http://www.modrails.com/documentation/Users%20guide%20Apache.html#_phusion_passenger_is_using_the_wrong_apache_during_installation ... but the link leads to no remedy (as of 5/5/2013). There must be an option to set during the phusion passenger installation to ensure it points to the desired apache installation, but I can't locate it.

In the end, I removed the ver 2.4 of apache that I built and reverted to the ver 2.2 that is included with the OS. So far, it's all working.