I need to set up a magento site locally but during installation I'm getting the error 'PHP extension "mcrypt" must be loaded.' I then checked for the extension by doing php -m and noted the extension isn't there.
I then tried to install it with brew install php71-mcrypt which didn't work so I tried brew install mcrypt #php71-mcrypt but I'm getting the error 'Error: No available formula with the name "#php71-mcrypt"'.
Anybody know how to get this installed or how to bypass the error for the magento installation?
In case it helps anybody else I solved the issue by using a different php version for mamp!
Related
I installed Xampp on Ubuntu 16 to work with Laravel.
I ran my Laravel code and got this error : Mcrypt PHP extension required.
After that I tried to install Mcrypt on PHP.
I have done these :
sudo apt-get install mcrypt
sudo phpenmod mcrypt
I have also done this : Link
I also restart the all services from Xampp after every change but I still get error on Laravel.
Any idea ?
My PHP version is 7.0.22 and Ubuntu version is 16.04.1 .
Thank you .
Edit 1
I did this and I still see the error.
After trying to many things. I just got rid of this shit by installing both version on my computer.
First I installed php 7.1.19 version.
Secondly I installed php 7.2.15 version
Now I am working perfectly with my project.
So I have already installed Apache2 and Mysql on Linux Mint (the same as Ubuntu), Now I am trying to install PHP on Apache but I get a very strange error message :
configure: error: Cannot find php_pdo_driver.h.
I did some search on the Internet and I found out that these files were not embedded before in PHP, but they are now. I even checked for it myself in the PHP source folders and I found that specific file. Can anyone tell me what's the problem and how to solve it ?
actually PDO is included on PHP core.
You must install the PHP and MySQL bundled packages.
Use sudo apt-get install php5-mysql
you should check your php version, you must have php version 5 to load PDO.
I'm trying to set up gnupg for use in PHP on my mac.
I have tried following the directions found at the following links:
http://measure9.varkel.net/2013/10/building-gnupg-for-php-5-5-on-osx/
Install PHP gnupg using PECL on MAC/MAMP 10.8.4
What I seem to be running into with both is this message:
checking for gpgme_check_version in -lgpgme... no
configure: error: wrong gpgme lib version or lib not found
I see this when executing the './configure' command.
I have installed gpgme using Homebrew.
I'm a bit stuck as I've tried everything I can come up with and haven't had any luck.
I am running PHP 5.6.7 on OSX 10.10.2 using MAMP Pro.
Thank you in advance for any help you can provide.
EDIT:
My original question was unclear, so I'll try again.
I am trying to install gnupg for use in PHP in my dev environment, which is a macbook using MAMP.
I fist installed gpgme and gnpug using Homebrew, both with no issues.
Then I attempted to install gnupg using pecl via the following command
sudo pecl install gnupg
And I end up with this error message
configure: error: wrong gpgme lib version or lib not found
ERROR: `/private/tmp/pear/install/gnupg/configure' failed
I have tried editing my path with no success, adding usr/local/include and usr/local/lib, where gpgme.h and libgpgme.a files can be found. I see no change in the error message.
EDIT 2:
I believe that gpgme is being installed correctly and pecl is able to find it. I install it using the following command
brew install gpgme
If I then run the pecl command to install gnupg, I get the error message above.
Now, if I execute the brew command to uninstall gpgme
brew uninstall gpgme
I see the following error message when trying to install gnupg with pecl
configure: error: Please reinstall the gpgme distribution
ERROR: `/private/tmp/pear/temp/gnupg/configure' failed
which seems to indicate that the library is installing and being found, but it's an incorrect version.
I am unable to find any information on what version is required for pecl to install gnupg.
EDIT 3:
Looking at the terminal a little more, I see that it's failing to find a specific function (gpgme_check_version) in the lib file.
checking for gpgme_check_version in -lgpgme... no
configure: error: wrong gpgme lib version or lib not found
ERROR: `/private/tmp/pear/temp/gnupg/configure' failed
I'm not entirely sure what happened, but I believe my installation of autoconf was somehow compromised.
What ended up solving my problem was using brew to uninstall autoconf and gpgme, then using brew to reinstall both packages.
I installed imagick with homebrew on OS X Yosemite and want to install the imagemagick PHP extension with PECL. I am using the standard Apache server and PHP version included with the OS (not MAMP!). So, I tried
pecl install imagick
During the make process I get the error message
In file included from /private/tmp/pear/install/imagick/imagick_file.c:21:
/private/tmp/pear/install/imagick/php_imagick.h:51:12: fatal error: 'wand/magick-wand.h' file not found
# include <wand/magick-wand.h>
^
1 error generated.
When asked for the prefix of the Imagemagick installation
Please provide the prefix of Imagemagick installation [autodetect] :
I am not sure what to enter but I tried empty (autodetect), "/usr/local/Cellar/imagemagick/6.8.9-8/include/ImageMagick-6", and "/usr/local/Cellar/imagemagick/6.8.9-8"
There is a "magick-wand.h" file located in "/usr/local/Cellar/imagemagick/6.8.9-8/include/ImageMagick-6"/wand/magick-wand.h"
How do you install the imagemagick extension on OS X?
I got the same problem in OSX 10.10.3 with standard Apache, PHP in OSX
I found a solution from a blog.
http://charles.lescampeurs.org/2013/06/18/add-c-header-include-path-pecl
As the result, you only can compile the extension manually (I tried 3.1.2)
If you don't want to manually compile the source code, you may install the beta version of imagick (I try 3.3.1RC)
I get this error when i try to run following command
sudo pecl install mongo
Error:
...php_mongo.c:22:10: fatal error: 'php.h'
file not found
#include <php.h>
^
1 error generated.
make: *** [php_mongo.lo] Error 1
ERROR: `make' failed
I am new to MAC, please help me to resolve this and get Mongo Working with PHP.
I have installed MacPorts and autoconf
It seems, that you did not install the xampp "Developer Package", required to build additional php extension. You can download the "Developer Package" from:
http://www.apachefriends.org/en/xampp-macosx.html#849
This has already been answered.
Please follow the processes outlined in this answer - Install PECL on Mac OS X 10.6.
I followed the process outlined here http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/, referenced by the above Stackoverflow link and the process for install pear, followed by pecl and subsequently -
sudo pecl install mongo
works perfectly on OSX Lion.
You may need to modify the extensions in /etc/php.ini, however, this is explained in the output after you install the php mongo driver.
It took me the whole day to find this answer, I had tried everything, but this worked finally:
sudo C_INCLUDE_PATH=/usr/local/opt/openssl/include /Applications/XAMPP/xamppfiles/bin/pecl install mongodb
I found this article very helpful. Saved a lot of time after I wasted a lot of time to check other links. I did for MAMP and think will work for XAMPP too.
The thing is MAMP does not ship with all PHP sources to compile pecl mongo file and create mongo.so. All what you need is download php for respective version you are using. I was using php version 5.6.10. I checked php.net site that was having 5.6.13 version. I downloaded sources for this version from PhP.net. Executed "sudo pecl install mongo" again and it worked.