Adding a PHP Extension
Tim Roberts
tim_roberts at cms.org
Mon Dec 27 16:05:43 PST 2010
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.
Today, I used MacPorts to install php5-mcrypt. That installed a bunch of things including apache2 (which, of course, I already have). Scary. Stopped and restarted apache. Still no mcrypt.
I'm enclosing what was displayed in the terminal window from today's episode.
The following two notes are bothering me:
Note: apache2 installs files outside the common directory structure.
Note: php5 installs files outside the common directory structure.
Does this mean that I have somehow polluted the default apache and php installations?
What does this mean:
To customize php, copy /opt/local/etc/php5/php.ini-development (if this is a development server) or /opt/local/etc/php5/php.ini-production (if this is a production server) to /opt/local/etc/php5/php.ini and then make changes.
If this is your first install, you need to activate PHP in your web server.
To enable PHP in Apache, run cd /opt/local/apache2/modules /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
I don't understand the big picture. It appears everything that MacPorts does is contained in the /opt directory? I'm obviously missing something that would be obvious to a "guru". I would appreciate any insight.
Thank you.
Timothy H. Roberts
Senior Director, Division of Information Technology/Membership
Colorado Medical Society
720-859-1001
800-654-5653
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PHP.pdf
Type: application/pdf
Size: 30431 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20101227/7a408d22/attachment.pdf>
More information about the macports-users
mailing list