Running OSX 10.10.1. I installed homebrew, and then tried running the following command:
brew install mcrypt
After which, it went through a long process of downloading/installing files. It then gave me an error:
checking for mhash_keygen in -lmhash... no
configure: error: "You need at least libmhash 0.8.15 to compile this program.
http://mhash.sf.net/"
Running php -v in terminal:
PHP 5.6.2 (cli) (built: Nov 2 2014 09:34:41)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans
Any help is appreciated. Everything seems to be breaking in OSX Yosemite...
I was experiencing the same issue and uninstalling / reinstalling mhash resolved the issue:
brew uninstall mhash
brew install mhash
After I did this I was able to properly install mcrypt.
Related
Why am I getting the message "Warning: Skipping shivammathur/php/php: most recent version 8.2.0 not installed in Homebrew?
To remove this warning and install 8.2.0, run:
brew unlink php
brew tap shivammathur/php
brew install shivammathur/php/php#8.2
Then check your PHP version.
php -v
PHP 8.2.0 (cli) (built: Dec 8 2022 03:36:07) (NTS) Copyright (c) The
PHP Group Zend Engine v4.2.0, Copyright (c) Zend Technologies
with Zend OPcache v8.2.0, Copyright (c), by Zend Technologies
How to upgrade the php version from v7.4 to v8.1. This machine is created from aws ect2 wordpress/bitnami instance.
bitnami#ip-172-31-xx-xxx:~$ php -v
PHP 7.4.22 (cli) (built: Aug 2 2021 07:35:23) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.22, Copyright (c), by Zend Technologies
I had alraedy tried below approach but its not upgrading with below commands
sudo apt-add-repository ppa:ondrej/php
sudo apt update
Any alternate solution to upgrade the php version ?
I want to install gRPC for PHP 7.3. I followed Google Cloud documentation.
I use ubuntu 16.04, Nginx
I install:
sudo apt-get install autoconf zlib1g-dev php-dev php-pear
sudo pecl install grpc
But I am getting this error:
No releases available for package "pecl.php.net/grpc"
install failed
I don't know what is wrong.
It is php -v
PHP 7.3.22-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Sep 9 2020 06:46:12) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.22, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.3.22-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
Please, help me.
I'm getting an error:
Symfony\Component\Debug\Exception\FatalThrowableError: Class 'DOMDocument' not found in /var/www/html/vendor/embed/embed/src/Request.php:246
I found online that I have to install php-xml and php-dom. First, I checked my php version:
/var/www/html# php -v
PHP 7.1.33-17+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Aug 7 2020 14:46:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.33-17+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
Then, I installed php-xml and php-dom:
sudo apt-get install php7.1-dom
sudo apt-get install php7.1-xml
And restarted nginx:
sudo service nginx restart
But it's still showing the first error. I'm three hours into this and it's driving me insane.
php -v :
PHP 5.5.10-1+deb.sury.org~precise+1 (cli) (built: Mar 27 2014 16:18:01)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with XCache v3.1.0, Copyright (c) 2005-2013, by mOo
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
with XCache Optimizer v3.1.0, Copyright (c) 2005-2013, by mOo
with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo
with XCache Coverager v3.1.0, Copyright (c) 2005-2013, by mOo
dpkg -l | grep php5
result
rc php5-memcache 3.0.6-1 memcache extension module for PHP5
rc php5-memcached 1.0.2-2 memcached extension module for PHP5, uses libmemcached
ii php5-mysql 5.5.10+dfsg-1+deb.sury.org~precise+1 MySQL module for php5
php.ini setting .
;;;;;;;;;;;;;;;;;;;;;;;;;
;; memchached ;;
;;;;;;;;;;;;;;;;;;;;;;;;;
extension=/usr/lib/php5/20090626/memcache.so
extension=memcached.so
memcache.hash_strategy="consistent"
but phpinfo not showing memchache details.
and php script giving PHP Fatal error: Class 'Memcached' not found in
php5-memcache and php5-memcached aren't installed. the "rc" in the dpkg output means, that the packages have been uninstalled, and that the configuration has been kept.
dpkg -l | grep php5 indicate that module is not install
ii means 'It should be installed and it is installed' whereas
rc means 'It's removed/uninstalled but it's configuration files are still there'
Use the following to install 'Memcache'
sudo apt-get install php5-memcache
Fatal error: Class 'Memcached' not found
the library might be missing, you can manually include the missing php_memcache into the ext folder