Ticket #18892 (closed defect: worksforme)
Compiling PHP mcrypt extension against libmcrypt has issues
| Reported by: | perl.programmer@… | Owned by: | ryandesign@… |
|---|---|---|---|
| Priority: | Low | Milestone: | |
| Component: | ports | Version: | 1.7.0 |
| Keywords: | Cc: | ||
| Port: | libmcrypt |
Description
Following the steps detailed here, I tried to install the php mcrypt extension so I wouldn't have to re-compile all of php. However, if a replace the libmcrypt installation steps with a macports install of libmcrypt, when PHP is loaded through Apache, the mcrypt extension fails to load. However, it does load when I run php from the command line. I had to modify the ./configure command a little bit to point to where libmcrypt is and to remove some of the unsupported archs. However, when I install libmcrypt from source, I don't have any of these problems and I don't have to change php.ini either. It may be that my machine is configured oddly, but I figured I would report the issue anyways in case it can be replicated.
The configure command:
MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS='-O2 -fno-common -arch i386' LDFLAGS='-L/opt/local/lib -L/usr/local/lib' CXXFLAGS='-O2 -fno-common -arch i386' \ ./configure --with-php-config=/Developer/SDKs/MacOSX10.5.sdk/usr/bin/php-config --with-mcrypt=/opt/local
Change History
comment:1 Changed 4 years ago by macsforever2000@…
- Owner changed from macports-tickets@… to ryandesign@…
comment:3 follow-up: ↓ 4 Changed 4 years ago by ryandesign@…
- Owner changed from ryandesign@… to snc@…
- Cc ryandesign@… added
So, the problem is that you cannot hand-compile php's mcrypt extension using libmcrypt in MacPorts? Ok, I'm not sure why that would be, and I'm assigning the ticket to the maintainer of libmcrypt. But I'm not sure there's much motivation to look into this issue, since the MacPorts php5 port has (until today) included support for mcrypt; as of today, that support has been moved to the separate php5-mcrypt port. Are you able to use these ok? Are these not sufficient?
I note above that you are instructing the configure script to look for things both in MacPorts' /opt/local prefix and in /usr/local. Note that the use of MacPorts while anything is installed in /usr/local in problematic and therefore unsupported. I recommend you remove what's in /usr/local and just use MacPorts to install the software you need.
comment:4 in reply to: ↑ 3 Changed 4 years ago by ryandesign@…
- Owner changed from snc@… to ryandesign@…
- Cc ryandesign@… removed
Replying to ryandesign@…:
I'm assigning the ticket to the maintainer of libmcrypt
Whoops, libmcrypt is maintained by me. How about that.

