Mcrypt was.Apologies in advance for the potential n00b questions, I am trying to install the mcrypt extension for PHP on my OSX Mountain Lion machine.If you know that you have this update, you can skip to Step 3. Verify the exact version of PHP you are running.Ive successfully installed mcrypt via homebrew but Im struggling to find the path to mcrypt.so to include it as an extension in php.ini. Next we will download the PHP source.
Mcrypt 10.8 Software For EasyThen finally do a quick ls to see which extensions you are using: ls -l.PlayOnMac is a Wine-based software for easy installation of Windows applications on Mac OS. And into your php.d directory. Then CD to your php directory. Brew reinstall libtool -universal & brew unlink libtool & brew link libtool. Dll file that caused the WampServer install to break.The following steps in terminal is what I have done so far to achieve my PHP install cd /path/to/downloaded/php-5.3.21/ext/mcrypt/The mcrypt extension is missing OS X Mavericks Install mcrypt in 10.9 installing and configuring mcrypt to work in a Mac OS X 10.9 Mavericks development.First Install libtool from homebrew, which is a dependency in 10.10 Yosemite. In some previous attempts to install EgoWeb 2.0 without first installing the update file above, WAMP crashed after install because of a missing.If you're anOptimist, you can skip down to the building the mcrypt extensionSection, but you may very well see the errors I did, telling me toI have just gone through this on a fresh install of OSX 10.9. The process is actually fairly straight-forward. /configure -with-config-file-path=/private/etc/php.ini -with-apxs2=/usr/sbin/apxs -with-mcryptWhich seems to work OK, but then upon "make", it returns ext/mcrypt/mcrypt.o: No such file or directoryExt/mcrypt/mcrypt_filter.o: No such file or directoryWhat am I doing wrong? It seems like the physical compile of mcrypt.so is not happening, or is compiling incorrectly as I would suspect there to be another mcrypt.so found under locate?Anyone please help? I've gone through pages upon pages of Google searches with no luck!Installing php- mcrypt without the use of port or brewNote: these instructions are long because they intend to be thorough. I have then done sudo nano /private/etc/php.iniAlong with an Apache restart, phpinfo() doesn't show that the mcrypt extension is loaded.I then tried to specify the extension_dir inside php.ini, again with no luck./opt/local/lib/php/extensions/no-debug-non-zts-20090626/mcrypt.so/usr/local/Cellar/php53-mcrypt/5.3.18/mcrypt.soAnd tried both directories as the extension_dir, with no luck.I have also tried the following, after much Googling. /configure -with-config-file-path=/private/etc/php.ini -with-apxs2=/usr/sbin/apxsWhich seems to work well and installs PHP 5.3.21 fine. After downloading the DMG.![]() ![]() This is most-readily available buried within the source code for all of PHP. Hopefully the brief stint into dependency hell is over now.First, we're going to need to get the source code for the mcrypt extension. /configure step for the mcrypt extension itself (below) building the mcrypt extensionThis is our actual goal. The method I used was based on the one described here, but I have attempted to simplify things as best I can:First, download the libmcrypt source, available from SourceForge, and available as of the time of this writing, specifically, at:You'll need to jump through the standard SourceForge hoops to get at the real download link, but once you have it, you can pass it in to something like this: $ mkdir -p ~/mcrypt/dependencies/libmcryptThe only way I know of to verify that this has worked is via the. /configure # this is the step which fails without the above dependenciesIn theory, mcrypt.so is now in your PHP extension directory. For these, you can use something like: $ mkdir -p ~/mcrypt/phpOnce you have it, (and all the dependencies, from above), you can get to the main process of actually building/installing the module. If it is, you can type something like: $ mkdir -p ~/mcrypt/phpUnfortunately, my current version (5.4.17, in this case) was not available, so I needed to use the alternative/historical links at (also an official PHP download site). $ php -version # to get your PHP versionNow, if you're lucky, your current version will be available for download from the main mirrors. Instead, the file /private/etc/php.ini.default lists the default configuration, and can be used as a good template for creating the "true" php.ini, if it does not already exist.To determine whether php.ini already exists, run: $ ls /private/etc/php.iniIf there is a result, it already exists, and you should skip the next command.To create the php.ini file, run: $ sudo cp /private/etc/php.ini.default /private/etc/php.iniNext, you need to add the line: extension=mcrypt.soSomewhere in the file. By default in OSX 10.9, it actually has mcrypt-specific configuration information, but it doesn't actually activate mcrypt unless you tell it to.The php.ini file does not, by default, exist. Configuring the mcrypt extensionYour php.ini file needs to be told to load mcrypt. Serial key windows 7 professional 32 bit asusThe other option is to edit the extension_dir setting. Also remember that all the files in this directory get loaded in alphabetical order, so if you have one called adjustments.ini that contains mcrypt directives, and there is a mcrypt.ini, most likely your settings will be overridden.One alternative to specifying extension="mcrypt.so" is to specify the full path to the mcrypt.so file. Ini files" because what that means is it gives you a place to put your own file, like tweaks.ini that is loaded after the main configuration file so that you can make changes and keep up with them easily. Most likely it will be something like /usr/local/etc/php/5.4/php.ini if you are using the homebrew version.Take note of the part under it that says something like "Scan this dir for additional. You can do so via: $ sudo apachectl restartPHP complains if one of the files like mcrypt.so is included using the syntax extension="mcrypt.so" but the file is not in the extension_dir path ( use or php -i to check that).It will also tell you which php.ini config file is being loaded so you will know where the settings are coming from. You can verify that this has worked by running: php -m | grep mcryptWhich should output " mcrypt", and nothing else.If your use of PHP relies on Apache's httpd, you will need to restart it before you will notice the changes on the web. It's one of the reasons to use homebrew in the first place - it's a package manager (with a HUGE community).There is a lot of development on the homebrew project and - if you have problems I'd suggest checking out their issues pageSo yes you can build it from source and that might seem like a good option right now if you just want mcrypt to work but you may hate yourself for doing this later.If you don't want to be using php54 there is also the php53 branch. It's not hard to build from source - but I don't want to have to maintain that. I did a fresh install of homebrew and then added the josegonzalez tap using: brew tap josegonzalez/homebrew-php(My other laptop was running Mountain Lion and was also using homebrew in this setup.)After you've tapped that awesome repo you can install php and mcrypt using something like: brew install php54 php54-mcryptWhat if this doesn't work (and why should I use homebrew anyway?)I would highly advise trying this route before downloading and building it from source.
0 Comments
Leave a Reply. |
AuthorCorey ArchivesCategories |