Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/253.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 将OS X更新到El Capitan后的Mcrypt问题_Php_Macos_Laravel_Mcrypt_Osx Elcapitan - Fatal编程技术网

Php 将OS X更新到El Capitan后的Mcrypt问题

Php 将OS X更新到El Capitan后的Mcrypt问题,php,macos,laravel,mcrypt,osx-elcapitan,Php,Macos,Laravel,Mcrypt,Osx Elcapitan,在将优胜美地升级到El Capitan之后,我对mcrypt(和Laravel)有一个问题。当我运行本地站点(Laravel Framework版本4.2.17)时,我会 需要Mcrypt PHP扩展 以下是我的设置: 1) 哪个php /usr/local/bin/php 2) php——版本 3) php--ini 4) cat/usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini | grep--color-imcrypt [mcrypt] extens

在将优胜美地升级到El Capitan之后,我对mcrypt(和Laravel)有一个问题。当我运行本地站点(Laravel Framework版本4.2.17)时,我会

需要Mcrypt PHP扩展

以下是我的设置:

1) 哪个php

/usr/local/bin/php
2) php——版本

3) php--ini

4) cat/usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini | grep--color-imcrypt

[mcrypt]
extension="/usr/local/opt/php56-mcrypt/mcrypt.so"
Additional .ini files parsed => /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini,
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*
PHP Warning:  Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
mcrypt
5) ll/usr/local/opt/php56 mcrypt/

total 112
drwxr-xr-x  5 olga  admin    170 Oct 29 07:31 .
drwxr-xr-x  5 olga  admin    170 Oct 29 07:31 ..
-rw-r--r--  1 olga  admin    373 Oct 29 07:31 INSTALL_RECEIPT.json
-rw-r--r--  1 olga  admin    107 Sep 30 01:35 TODO
-rwxr-xr-x  1 olga  admin  45284 Oct 29 07:31 mcrypt.so
6) php-i | grep--color-i mcrypt

[mcrypt]
extension="/usr/local/opt/php56-mcrypt/mcrypt.so"
Additional .ini files parsed => /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini,
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*
PHP Warning:  Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
mcrypt
7) php-m | grep--color-imcrypt

[mcrypt]
extension="/usr/local/opt/php56-mcrypt/mcrypt.so"
Additional .ini files parsed => /usr/local/etc/php/5.6/conf.d/ext-mcrypt.ini,
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*
PHP Warning:  Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0
mcrypt
mcrypt support => enabled
mcrypt_filter support => enabled
mcrypt.algorithms_dir => no value => no value
mcrypt.modes_dir => no value => no value
mcrypt
8) echo$PATH

/Volumes/project1/code/scripts/:/usr/local/mysql:/Applications/Adobe Flash Builder 4.6/sdks/4.5.0/bin:/Volumes/project1/code/tools/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/olga/.rvm/bin:~/Applications/arcanist/bin/:/usr/local/Cellar/php56/5.6.14/bin:~/.composer/vendor/phpunit/phpunit:/usr/local/bin:/usr/local/mysql/bin:/Users/olga/.composer/vendor/bin:/opt/apache-maven-3.3.3/bin
9) (php来自$PATH)/usr/local/ceral/php56/5.6.14/bin/php--ini

我错过了什么


提前谢谢

终于修好了!仍然不知道原因,但是。。。下面是我如何解决它的

1) 将自制php放入路径

export PATH="/usr/local/opt/php56/bin":other_paths
2) 更改apache中的php模块(httpd.conf)

3) 卸载所有版本的mcrypt和phpXX_mcrypt

4) 删除phpXX_mcrypt ini文件

5) 重新启动apache。确保mcrypt不在php中(例如,php-i | grep--color-i mcrypt)

6) 使用brew安装mcrypt和phpXX_mcrypt

brew search mcrypt
brew install mcrypt
brew install phpXX_mcrypt
7) 重新启动apache


希望能有所帮助:)

你看到这个了吗question@Mihai是的。我已将路径更改为
export PATH=“/usr/local/opt/php56/bin”:$PATH
但它没有帮助!这么多次!经过一整天的搜索,找出为什么通过自制设置的带有PHP/etc的新MBP不会运行mcrypt函数(尽管显示模块已加载)-关键是上面的LoadModule更改!我不使用Apache,只使用内置的PHP服务器,但也有同样的问题。安装El Capitan后,我的PHP版本指向系统PHP,而不是Homebrew的PHP。通过将my
.zshrc
(或
.bashrc
)中的路径更新为
导出路径=“$(brew--前缀homebrew/php/php55)/bin:$path”
,可以解决此问题。