Recompiling PHP with mcrypt in Snow Leopard Server

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
broncotrolley
Forum Newbie
Posts: 1
Joined: Wed Nov 03, 2010 2:28 pm

Recompiling PHP with mcrypt in Snow Leopard Server

Post by broncotrolley »

I was given the task of installing Ushahidi on a Mac OS X 10.6.2 Server Edition installation. Before being assigned this project I had never done anything remotely similar to this so I am a pretty big noob. Talk to me as if I were a child and remember if you say something like "restart apache in the usual way" the first thing I'll do is paste that into google and pray for a relevant search result. With that out of the way, here is a brief synopsis of what I've done so far:

First I took a look at the requirements for installing Ushahidi and it looked like everything worked out except for some of the PHP modules required. I'm still not sure if PCRE was compiled with -enable-utf8 (although I did some test somehow that seemed to confirm it was) or with -enable-unicode-properties but for now that is not the issue; the issue is that mcrypt was not installed at all. So I installed xcode and macports and all that jazz and used those to install libmcrypt. Then I re-downloaded the correct PHP version (found on my phpinfo.php page) and used the terminal to go to that folder. At some point I added something to some ini file about mcrypt, and I apologize profusely that I can't tell you more about that. I tried to run ./ configure with all the commands from phpinfo (copy and paste, baby) but with '--with-mcrypt-=/opt/local/bin' tacked on to the end. I ran into some error messages right away:
configure: warning: /var/tmp/apache_mod_php/apache_mod_php-53.2.2~5/php/configure: invalid host type

[some other stuff]

checking host system type... Invalid configuration `/var/tmp/apache_mod_php/apache_mod_php-53.2.2~5/php/configure': machine `/var/tmp/apache_mod_php/apache_mod_php' not recognized

checking target system type... Invalid configuration `/var/tmp/apache_mod_php/apache_mod_php-53.2.2~5/php/configure': machine `/var/tmp/apache_mod_php/apache_mod_php' not recognized
All of those errors point to /var/tmp/apache_mod_php/apache_mod_php-53.2.2~5/php/configure but there is no apache_mod_php folder inside /var/tmp. It's also (maybe) worth noting that trying ./configure using the exact same commands from phpinfo (without any mention of mcrypt) gives the same errors. So my next brilliant idea was to download version 53.2.2 of apache_mod_php and just stick it in that folder, but alas I can find little evidence that version 53.2.2 of apache_mod_php has ever existed. I also tried completely ignoring those error messages (because that's how I solve most other problems) and running 'make' which returned this error:
make: *** No targets specified and no makefile found. Stop.
That 'Stop." at the end really hurt my feelings. It's as if the computer knows that I have no business doing any of this. So if anyone can help be solve any of these problems or can stop the computer from being so freaking pretentious and telling me to 'stop' I would be eternally grateful. I promise that if I am reincarnated as someone with any sort of technical qualifications I will return the favor.
Post Reply