Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Mcrypt module is installed, but missing in phpinfo#762

Discussion options

Hi, currently trying to setup a project using PHP 7.4 on macOS Big Sur. The project requiresmcrypt library.
So I followed all the instructions and set up PHP 7.4.27:

brew install shivammathur/php/php@7.4echo 'export PATH="/usr/local/opt/php@7.4/bin:$PATH"' >> /Users/test/.bash_profileecho 'export PATH="/usr/local/opt/php@7.4/sbin:$PATH"' >> /Users/test/.bash_profileexport LDFLAGS="-L/usr/local/opt/php@7.4/lib"export CPPFLAGS="-I/usr/local/opt/php@7.4/include"brew link --overwrite --force shivammathur/php/php@7.4

Thereafter installed mcrypt:

brew install mcrypt/usr/local/opt/php\@7.4/bin/pecl install mcrypt-1.0.4pecl config-get ext_dir | pbcopymkdir -p /usr/local/lib/php/pecl/20190902/usr/local/opt/php\@7.4/bin/pecl install mcrypt-1.0.4

Createdconf.d/mcrypt.ini:

[mcrypt]extension="/usr/local/opt/php@7.4/lib/php/20190902/mcrypt.so"

Restarted Apache, howeverphpinfo() shows all info fromphp.ini correctly except missingmcrypt module.
At the same time, CLI shows different result:

$ php -i | grep mcrypt/usr/local/etc/php/7.4/conf.d/mcrypt.iniRegistered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*mcryptmcrypt support => enabledmcrypt_filter support => enabledmcrypt.algorithms_dir => no value => no valuemcrypt.modes_dir => no value => no value
$ php -m | grep mcryptmcrypt

Checked CLI ini:

$ php --iniConfiguration File (php.ini) Path: /usr/local/etc/php/7.4Loaded Configuration File:         /usr/local/etc/php/7.4/php.iniScan for additional .ini files in: /usr/local/etc/php/7.4/conf.dAdditional .ini files parsed:      /usr/local/etc/php/7.4/conf.d/ext-opcache.ini,/usr/local/etc/php/7.4/conf.d/mcrypt.ini

It is the same as inphpinfo():
image

I'm stuck 😢 Any help would be appreciated.
Could there be any issue due to built-in extensions and use pkg config?

UPD:extension_dir = "/usr/local/Cellar/php@7.4/7.4.27/pecl/20190902" Changing the extension_dir didn't help as well.

You must be logged in to vote

Unfortunately, I don't.

Also, I've checked CLI with explicit INI file set:

$ php -c /usr/local/etc/php/7.4/php.ini -i | grep mcryptRegistered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*mcryptmcrypt support => enabledmcrypt_filter support => enabledmcrypt.algorithms_dir => no value => no valuemcrypt.modes_dir => no value => no value

But it still doesn't appear onphpinfo() webpage.

Replies: 2 comments 8 replies

Comment options

As per your output ofphp -i | grep mcrypt, It seems to be installed correctly. Inphpinfo() you should have amcrypt heading.

image

You must be logged in to vote
4 replies
@ikurnosov
Comment options

Btw, which version of PHP do you use?

@shivammathur
Comment options

I used the sameshivammathur/php/php@7.4, but could not reproduce the issue.

@ikurnosov
Comment options

Is there any reasons forphpinfo() to ignore modules? Like apache caching modules set or whatever..
Do you use Apache or anything else?
How did you install mcrypt module?

@shivammathur
Comment options

I usedApache using brew packagehttpd.

Comment options

Unfortunately, I don't.
image

Also, I've checked CLI with explicit INI file set:

$ php -c /usr/local/etc/php/7.4/php.ini -i | grep mcryptRegistered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*mcryptmcrypt support => enabledmcrypt_filter support => enabledmcrypt.algorithms_dir => no value => no valuemcrypt.modes_dir => no value => no value

But it still doesn't appear onphpinfo() webpage.

You must be logged in to vote
4 replies
@shivammathur
Comment options

Did you restartphp-fpm andhttpd after installingmcrypt usingpecl.
If not, please do this and checkphpinfo() again

brew services restart php@7.4brew services restart httpd
@ikurnosov
Comment options

Yes, many times. I'm using built-in apache, so I did it withsudo apachectl -k restart, also triedsudo apachectl -k graceful.
Even rebooted my machine several times.

@shivammathur
Comment options

Try using the brewhttpd instead of system one.

@ikurnosov
Comment options

Thanks a lot! Brew'shttpd fixed the issue, now I can use mcrypt.
image

So, my guess is there is kind of caching modules within built-in apache.

Answer selected byikurnosov
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
None yet
2 participants
@ikurnosov@shivammathur

[8]ページ先頭

©2009-2025 Movatter.jp