apache, mysql5, php5 post-install error "..not an Apache module DSO?"

Ryan Schmidt ryandesign at macports.org
Fri Aug 31 15:37:58 PDT 2007


On Aug 31, 2007, at 17:05, eyeamwhy-macports at yahoo.com wrote:

> i'm trying to install macport's apache, mysql server, and php5. i  
> did this without error (output omitted):
>   % sudo port install apache
>   % sudo port install mysql5 +server
>   % sudo port install php5 +apache +mysql5 +imap +tidy +sqlite +pear
>
> Then this (output omitted):
>   % sudo cp /opt/local/etc/php.ini-dist /opt/local/etc/php.ini
>   % cd /opt/local/libexec/apache
>   % sudo /opt/local/apache/bin/apxs -a -e -n "php5" libphp5.so
>
> ...but there is no "/opt/local/apache"

"sudo port install apache +apache_layout" would have given you /opt/ 
local/apache. However, "sudo port install apache" installs apache in  
other places within /opt/local. You can type "port contents apache"  
to see what all it installed, and from that, see where apxs is  
actually located on your system. I believe it should be at /opt/local/ 
sbin/apxs.

I see now that the instructions printed by my php5 port are wrong.  
Sorry about that. I'm not sure, though, why the apache port gives us  
two different options for where to install things. This seems to make  
it very difficult for other ports that require apache to know what to  
do.

> so from "/opt/local/libexec/apache" where "libphp5.so" exists, I  
> tried both apxs's in /opt/local/, like this:
>   % sudo /opt/local/sbin/apxs -a -e -n "php5" libphp5.so
>   [activating module `php5' in /opt/local/etc/apache/httpd.conf]
>   cp /opt/local/etc/apache/httpd.conf /opt/local/etc/apache/ 
> httpd.conf.bak
>   cp /opt/local/etc/apache/httpd.conf.new /opt/local/etc/apache/ 
> httpd.conf
>   rm /opt/local/etc/apache/httpd.conf.new
>   % sudo apachectl configtest
>   Syntax error on line 237 of /opt/local/etc/apache/httpd.conf:
>   API module structure `php5_module' in file /opt/local/libexec/ 
> apache/libphp5.so is
>   garbled - perhaps this is not an   Apache module DSO?
>
> Same result with
>   % sudo /opt/local/var/macports/software/apache/1.3.37_0/opt/local/ 
> sbin/apxs -a -e -n "php5" libphp5.so
>
> Any
> idea what the problem is? The /opt/local/ versions of apache &
> mysql are otherwise fine and working. I have a newish MPB w/OSX  
> 10.4.10 and
> latest Xcode...
>
> from /opt/local/etc/apache/httpd.conf
>   line 63:   ServerRoot "/opt/local"
>   line 237: LoadModule php5_module        libexec/apache/libphp5.so

[snip]

It looks like it may be this bug:

http://trac.macosforge.org/projects/macports/ticket/2750

The bug has been open for 2 years... either this means the problem  
experienced only rarely, or that almost nobody uses apache 1 anymore.  
Personally, I recommend you use apache2.




More information about the macports-users mailing list