Having trouble php composer install IMAP missing - laravel - php

I'm having trouble getting the IMAP PHP module working on my mac. Trying to run Laravel app using MAMP. When I run the command composer install I get this error message below. Seem that IMAP is not installed or enabled.
The requested PHP extension IMAP is missing from your system
I tried a few things to resolve this issue but kept running into a loop.
I ran => brew install kabel/php-ext/php#7.2-imap
I ran => composer require webklex/laravel-imap
php -i | grep imap
PHP 7.1.23 (cli)
Mojave 10.14.5
I'm using MAMP

In your php.ini you will find a line like this ;extension=imap
remove ;
extension=imap
save your php.ini, restart apache and try again

Related

Ubuntu wrong path to oci8.so [duplicate]

After following the install instructions for oracle instant client, php is not able to load the oci8 extension.
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst
I am getting an error.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libmql1.so: cannot open shared object file: No such file or directory in Unknown on line 0
I have verified both oci8.so and libmql1.so locations.
Am I missing something?
I'm using Ubuntu 16.04 and php version 7.1
There are few directories in /usr/lib/php/
for example
20131226 for php5.6
20160303 for php7.1
so problem with me that, the oci8 extension got installed on the wrong ( a user lib folder for php7.2) so I had to remove the php 7.2 completly
sudo apt-get purge php7.2-common
then I had uninstall the oci8 by running following command
sudo pecl uninstall oci8
and install again by running the following command
sudo pecl install oci8
To check the configuration loaded you do
php-config --extension-dir
And make sure that all extension are installed in the correct extension directory.
Make changes in the /etc/php/7.1/apache2/php.ini and /etc/php/7.1/cli/php.ini
Check by running phpinfo(); You must see this, ignore the cli if that stills gives you same error as your web shows the extension is getting loaded.
I solved adding the following to /etc/environment:
LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH
I followed this tutorial: https://gist.github.com/hewerthomn/81eea2935051eb2500941a9309bca703
What I did was completely remove any installations of PHP and reinstall the version that I need.
sudo apt-get purge 'php*'
Source: https://askubuntu.com/a/59889/226518
Or:
export LD_LIBRARY_PATH=/usr/local/instantclient_12_1/
I had the same problem, it works for me.
After wasting entire day for this small problem finally I came with this solution.
Sorry guys I am not champion is PHP but somehow I manage.
In my system I have CentOS 7 and PHP 7.4.XX.
I changed my LD_LIBRARY_PATH,
I have restarted my httpd service and checked phpinfo in browser (http://localhost/info.php),
Last I restared php-fpm service ........... and it's work for me.
Thanking you,
Anand

Mcrypt Extention required error in Bitnami MAMP stack

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

PHP7.0 - unable to load dynamic library oci8.so (Ubuntu)

After following the install instructions for oracle instant client, php is not able to load the oci8 extension.
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst
I am getting an error.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libmql1.so: cannot open shared object file: No such file or directory in Unknown on line 0
I have verified both oci8.so and libmql1.so locations.
Am I missing something?
I'm using Ubuntu 16.04 and php version 7.1
There are few directories in /usr/lib/php/
for example
20131226 for php5.6
20160303 for php7.1
so problem with me that, the oci8 extension got installed on the wrong ( a user lib folder for php7.2) so I had to remove the php 7.2 completly
sudo apt-get purge php7.2-common
then I had uninstall the oci8 by running following command
sudo pecl uninstall oci8
and install again by running the following command
sudo pecl install oci8
To check the configuration loaded you do
php-config --extension-dir
And make sure that all extension are installed in the correct extension directory.
Make changes in the /etc/php/7.1/apache2/php.ini and /etc/php/7.1/cli/php.ini
Check by running phpinfo(); You must see this, ignore the cli if that stills gives you same error as your web shows the extension is getting loaded.
I solved adding the following to /etc/environment:
LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH
I followed this tutorial: https://gist.github.com/hewerthomn/81eea2935051eb2500941a9309bca703
What I did was completely remove any installations of PHP and reinstall the version that I need.
sudo apt-get purge 'php*'
Source: https://askubuntu.com/a/59889/226518
Or:
export LD_LIBRARY_PATH=/usr/local/instantclient_12_1/
I had the same problem, it works for me.
After wasting entire day for this small problem finally I came with this solution.
Sorry guys I am not champion is PHP but somehow I manage.
In my system I have CentOS 7 and PHP 7.4.XX.
I changed my LD_LIBRARY_PATH,
I have restarted my httpd service and checked phpinfo in browser (http://localhost/info.php),
Last I restared php-fpm service ........... and it's work for me.
Thanking you,
Anand

Homestead Laravel -- Mcrypt PHP extension required

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

Error when i tried to install composer with PHP 7 using xampp package

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)

Categories