Adding a PHP Extension

Bradley Giesbrecht brad at pixilla.com
Mon Dec 27 17:12:49 PST 2010


On Dec 27, 2010, at 4:05 PM, Tim Roberts wrote:

> Hello.
>
> Caveat: I'm not a unix guru.  Barely a server admin.  We use Mac OS  
> X Server because it 'just works'.  I manage the server via the  
> Server Admin GUI.
>
> We hired a contractor to build a new website for us using Expression  
> Engine.  The site is complete and running on the developer's  
> server.  It is time to transfer it to our server - Mac OS X Server  
> 10.6.4. The developer hit a snag because the mcrypt php extension is  
> non-existant.
>
> My goal is to add the mcrypt extension to php so we can complete the  
> installation.
>
> After a bunch of Google research, I learned that mcrypt is not  
> bundled with the default Mac OS X server build of php.  I gather  
> that I need to rebuild php (gulp!)  I also learned that MacPorts was  
> a tool that I could use to simplify this process.  So...
>
> Last night, I installed MacPorts.  Using MacPorts, I subsequently  
> installed mcrypt.  That process installed libmcrypt and mhash.   
> Stopped and restarted Apache.  Loaded info.php via a browser.  Still  
> no mcrypt.

Server Admin will not be using the MacPorts apache2 server nor the  
MacPorts php5 apache2 module.
This will probably work you (has for me in the past) if you want to  
continue to use SA.

In Terminal.app find the libphp5.so that MacPorts built.
$ port contents php5
## mine is located here /opt/local/apache2/modules/libphp5.so

In SA, change the location of you php apache module. I don't remember  
exactly what the SA GUI looks like but hunt around and you should find  
where the modules are included.
You will probably have a path like /usr/libexec/apache2/libphp5.so.  
Change that path to to the path to the MacPorts php5 apache2 module.


Regards,
Bradley Giesbrecht
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20101227/1e9294f9/attachment.html>


More information about the macports-users mailing list