Re: Difficulties installing PHP iMagick with MacPorts ImageMagick installation
Don't forget to Reply All so mailing list subscribers get your message too. Otherwise it goes just to me, and I might not personally know the answers to your questions. On Mar 14, 2008, at 08:10, Elise van Looij wrote:
Op 14 mrt 2008, om 12:23 heeft Ryan Schmidt het volgende geschreven:
Following up on my earlier message:
On Mar 14, 2008, at 06:13, Ryan Schmidt wrote:
On Mar 13, 2008, at 10:25, Elise van Looij wrote:
<SNIP>
cd /Users/elisevanlooij/Downloads/imagick-2.1.1/imagick-2.1.1 sudo /opt/local/bin/phpize && ./configure --with-imagick=/opt/ local && make && make install
<SNIP>
So now I'm stymied. There is indeed a document named imagick.so, but it's in my download folder
/Users/elisevanlooij/Downloads/imagick-2.1.1/imagick-2.1.1/ modules/imagick.so
which I don't think is a good location, Should I move imagick.so and if so, where and how? The PHP extension_dir is set to ./ Any help would be appreciated.
Try running "sudo make install" (instead of "make install").
Doesn't the sudo at the beginning of the line take care of that? It would explain why I got the permissions error.
On my bash shell, I would have to say no. The "sudo" applies only to the first command, before the first "&&". So you're running phpize as root, then configuring, making and installing as your normal user.
But note that it looks like this will install the module into /usr/ lib/php/extensions, which is for Apple's PHP, not MacPorts's PHP.
Actually, the default location for extensions, if I interpret the results of my googling correctly, is /usr/lib/php/extensions/no- debug-non-zts-20060613
That's what I meant.
-- I would guess that 20060613 is the date Apple's PHP was built. Note that this folder is not indexed by Sherlock. What I finally did was copy imagick.so from /Users/elisevanlooij/Downloads/ imagick-2.1.1/imagick-2.1.1/modules/ to that folder
I would have thought that "sudo make install" would have done exactly that.
and add the following lines to MacPorts' php.ini (/opt/local/etc/ php.ini), around line 475:
extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20060613/"
and then, under Dynamic extensions, around line 580:
extension=imagick.so
I realize this is not the MacPorts way, but I need something that works now.
Ok. But note again that this is for Apple's PHP, not MacPorts's PHP. You had mentioned before that you had installed MacPorts's PHP, but now you won't be using it.
You might also want to consider making a port for imagick so that others won't have to go through what you went through to get it installed.
I'm flattered, and if I knew what I was doing, I would. But I imagine that making a port requires a bit more knowledge than can be found in UNIX for Dummies. I do hope that by writing this, I can help someone else.
Not too much more. :) There is a guide: http://guide.macports.org/ And also you can look at the thousands of existing portfiles to see how things are done. For example, to see how the ImageMagick port is written, you can type "port cat ImageMagick" or, if you have your EDITOR environment variable set up correctly, "port edit ImageMagick". Or maybe the portfile of a php extension like php5- xdebug would be more instructive.
You will probably need to find some additional parameters to tell imagick to install the module in the MacPorts prefix instead.
Elise van Looij
participants (1)
-
Ryan Schmidt