Michael
Michael

Reputation: 43

Homebrew: Install php mcrypt

I have, possibly like 1000k+ others, problems with homebrew after their move to a different structure.

I have installed homebrew and after that php with: $ brew install php Here I got php 7.2 version. In this version I'm missing some modules, like xdebug, mcrypt and some others. Question: how can I get them installed via homebrew?????????????????

There is no right documentation for that. Not at homebrew php-package site, not anywhere.

I need this all for my project and there is no time for switching back to native packages.

Thanks guys for your support!!!

Upvotes: 4

Views: 4921

Answers (2)

caspertm
caspertm

Reputation: 455

It appears that as of 31rst March 2018, the homebrew-php is deprecated and all php libraries will be part of homebrew/core.

This also means that:

Forgive my stupid question, I'm not sure I understand: there won't be a php71-mcrypt, but there may be a php-mcrypt, as long as it accepts any installed php package?

There won't be either but we'd accept the php or [email protected] formula installing mcrypt by default.

In the announcement, you also mentioned the CI workload as a reason for deprecating the tap. Until the tap is officially archived, would it make sense to limit formula updates to supported PHP versions (at this time, 5.6, 7.0, 7.1 and 7.2) in order to reduce CI workload and bottle builds?

I don't want to dictate how this tap is run pre-deprecation. That might not be a bad idea but given the tap is going away in a few months I think it's fine as-is until then.

In other words, mcrypt is now installed by default. See Zaph's comment on the other answer for a more detailed explanation.

I'm not sure about xdebug, but you might want to check there.

https://github.com/Homebrew/homebrew-php/issues/4721

p.s. You can check which modules are installed with php -m

Upvotes: 2

Janet
Janet

Reputation: 363

@caspertm I just did a clean reinstall of Homebrew PHP and mcrypt isn't included at all.

~ ᐅ php --version
PHP 7.2.4 (cli) (built: Apr 19 2018 16:42:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.4, Copyright (c) 1999-2018, by Zend Technologies
~ ᐅ php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
exif
fileinfo
filter
ftp
gd
gettext
gmp
hash
iconv
intl
json
ldap
libxml
mbstring
mysqli
mysqlnd
odbc
openssl
pcntl
pcre
PDO
pdo_dblib
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
Phar
phpdbg_webhelper
posix
pspell
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

~ ᐅ which php
/usr/local/bin/php

Did I miss something? It seems like, to make things easier on their end, the Homebrew folks have screwed over the PHP developers who rely on this...

PECL works, sorta, (mcrypt doesn't install with PHP 7.2.x because nothing's marked as "stable" in that case, but xdebug installs. I haven't tested anything else,) and that might be enough for some, but it sounds like OP can't/doesn't want to use that for some reason?

Upvotes: 1

Related Questions