I have installed Homestead and I am trying to work on a Laravel project version 4.2 however I keep getting the following error:
Mcrypt PHP extension required.
I have already installed Mcypt installed on the server and I have enabled it into the PHP 7 ini file. This problem does not want to go away for some reason.
Any recommendations to what I can do in order to enable Mcrypt on my virtual box please?
Since php7.1 mcrypt is deprecated so you have to downgrade php to php7.0
or install multiple versions of php but don't forget to enable the right
version inside your http server config file
or you can use php built in sever like :
cd project_dir/
php7.0 -S localhost:8000
Related
I am using Bitnami MAMP Stack 5.6.34. And installed it as root user so it loads at port 80. I am trying to install laravel 4.2 using composer and it shows that:
Mcrypt PHP extension required error.
and also while I try to use
php artisan
it does not work. Mcrypt is installed as it shows Enabled while I output phpinfo() function. But it still does not show up when I try using
php -m | grep mcrypt
I have modified php.ini file as follows:
mcrypt.algorithms_dir= /Applications/mampstack/common/lib/libmcrypt
mcrypt.modes_dir= /Applications/mampstack/common/lib/libmcrypt
But it does not work and still shows:
Mcrypt PHP extension required error.
But when I cd into mampstack and then use
sudo ./use_mampstack
then in the terminal I don't get any error while using composer install and can also use php artisan command as it finds that Mcrypt is enabled.
How can I get rid the Mcrypt error and load it with installed php
Bitnami Engineer here. I just installed Laravel in a fresh Bitnami installation in Mac OS X. These are the steps I followed
cd installdir/frameworks
curl -LO "https://github.com/laravel/laravel/archive/v4.2.11.zip"
unzip v4.2.11.zip
mv laravel-4.2.11 laravel
cd laravel
composer install
php artisan --version
Then, configure Apache using the similar config files (httpd-prefix.conf and httpd-app.conf) than the other frameworks or the ones at installdir/docs/demo. You will only need to modify the different paths in those files and include the httpd-prefix.conf file in the installdir/apache2/conf/bitnami/bitnami-apps-prefix.conf file. Restart Apache at the end to load this configuration.
I hope this helps
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.
when i tried to install composer with php 5.6.3 that return message said i have to install php 5.6.4 at least
so i just download xampp package that support php 7 to be able to install composer and laravel and when i tried to install composer after that the composer show me that Error :
The PHP exe file you specified did not run correctly [exit code 1]:
E:\xampp\php\php.exe
The php.ini used by your command-line PHP is: E:\xampp\php\php.ini
A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or the dll does not exist.
I also had this problem. Try install Xampp 5.6.24 / PHP 5.6.24 (Not the latest Xampp 7.0.9 / PHP 7.0.9)
I'm trying to get the latest Mongo Driver to work with MAMP 1.9.6 on OS X 10.5.8.
I built it successfully from source since it seems that there are no pre-compiled releases, included it into the right directory and restarted the apache.
But PHP doesn't recognize the extension. I used the 1.0.11 driver previously which worked fine, but I need the new version, because Doctrines ODM requires it.
When I replace the 1.2.10 mongo.so with the 1.0.11 and restart apache mongo is available. I don't get what could be wrong.
Anyone had this behaviour or any guesses to get this to work?
Update: The PHP error log shows the following:
[01-Jun-2012 22:02:37] PHP Warning: PHP Startup: mongo: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20090626
These options need to match
in Unknown on line 0
I'm not quite sure what it means?
2. Update:
I was finally able to sync the API version of phpize.
But now I'm not able to build the driver anymore.
I do the following:
phpize
./configure
make
sudo make install
But at the make command I'm getting tons of syntax errors. Seems that it can't find several header files.
The very first one is the zend_config.h and really I just have those other two files:
zend_config.nw.h
zend_config.w32.h
I downloaded the MAMP components to get this files. Why am I missing this one? And there are a lot of others.
I'm using PHP 5.3.5 Is there a way to get those header files from a different source?
I followed the instructions at Develop MongoDB web apps with MAMP under Mac OS X to successfully build mongo.so for MAMP with php 5.3 on OS X 10.7.3.
I'm adding this for historical purposes -- I guarantee that if you're having the same set of problems, you'll want to do this.
Personally, I had a really difficult time getting MAMP's php version to play nicely with the extension builds that I was trying to make.
I discovered that the problem was that MAMP really hadn't been set up to add extensions in general, and during the compilation of the mongo php drivers, it wasn't installing it in the right place -- so I followed the following tutorial on preparing MAMP for additional pecl and pear extensions.
After following those steps to prepare MAMP for adding extensions, you can easily install any extension.
At the part where it starts talking about adding an extension, use sudo pecl install mongo and restart apache from your MAMP interface.
I ran into the same problem when upgrading from PHP 5.3 to 5.4 and was able to solve it by following these steps:
Make sure to upgrade php5-cli as well as just php5 and php5-common
Uninstall the mongo drive
sudo pecl uninstall mongo
Re-install the mongo driver
sudo pecl install mongo
I want to upgrade to PHP 5.4.0 in XAMPP. I'm using windows operating system. I searched on web, but there was no proper guide for this as it was released recently.
Can anyone give me some instructions on how to upgrade to PHP 5.4.0 in XAMPP (windows)?
Download the latest binary version of PHP (make sure to get the .zip package not the installer)
De-archive it to a directory
Copy the contents of the directory in the php subfolder of your XAMPP installation directory, overwriting the files which are already present
Overwrite the files which are already present in the apache\bin directory with the newer versions.
Now the trick: take the files which have a "_2" in their names (for example php5apache2_2.dll or php5apache2_2_filter.dll), copy them in the apache\bin subdirectory and remove the "_2" part, overwriting the existing files. This is necessary because by XAMPP uses Apache version 2.2 and the files with the 2 prefix are built for Apache 2.0, so you must take the files build for the newer version (which has a different plugin interface) and rename them in the filenames XAMPP expects.
Source
I found a working php_uploadprogress.dll extension for xampp windows with php 5.4 here:
http://www.fsbcomputers.com/php_uploadprogress
there are 32 and 64 bit versions as well as a preview for php 5.5.
By the way, the php build numbers, apache /xampp refers to are:
PHP 5.2: 20060613
PHP 5.3: 20090626
PHP 5.4: 20100525
I hope that you are still following this, I installed php 5.4 on the latest xampp stable with no problem.
Fortunately for you, there is a beta update of xampp which makes life easier. http://www.apachefriends.org/en/xampp-beta.html
Just make sure to make a complete backup of your old xampp directory, and export your old databases so you can import them into your new (updated) mysql installation. Alternatively you do not need to update mysql, I use this beta and I can say that it's pretty solid.
EDIT: The pop-up warning were a problem that I had too, I recommend using the latest beta. But, you can fix the errors and use php 5.4 on your old install (not recommended) by commenting out the following line in php.ini
extension=php_oci8.dll
Change to
;extension=php_oci8.dll
I have done the upgrade in ubuntu. Following are the steps to do the upgrade.
sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get install php5
sudo /etc/init.d/apache2 restart