无法将detect

编程入门 行业动态 更新时间:2024-10-24 19:20:18
本文介绍了无法将detect_unicode设置/查找为Off的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想开始使用phpDocumentor,并且手动安装会在我没有在终端的php.ini中设置 detect_unicode = Off 时引发错误.

I'm want to start using phpDocumentor and the manual installation keeps throwing an error about me not having set detect_unicode = Off in my php.ini in Terminal.

当我将其添加到php.ini中时,它没有用,并且在运行安装程序时遇到相同的问题.似乎没有人遇到这个问题,对于我的一生,我无法弄清楚.

When I add it to my php.ini it doesn't take and I get the same issue when running the install. Nobody seems to have this problem, and for the life of me I can't figure it out.

github/phpDocumentor/phpDocumentor2/blob /develop/README.md#installation

我想念什么? (我确实在php.ini编辑后重新启动了MAMP服务器)

What am I missing? (I did restart the MAMP server after the php.ini edit)

终端错误的屏幕截图...

Screenshot of the error in terminal...

推荐答案

如果您已安装MAMP/MAMP Pro,则问题在于,终端可用的PHP版本很可能是位于以下位置的系统版本:

If you have MAMP/MAMP Pro installed then the problem is that the PHP version available to your terminal will most probably be the system version located in:

/private/etc/

我遇到了同样的问题,但就我而言,该目录中没有php.ini文件,因此解决该问题的最佳方法是仅创建指向您的MAMP/中当前使用的PHP版本的符号链接. MAMP Pro安装:

I had the same problem but in my case I didn't have a php.ini file in that directory so the best way to resolve it is to just create a symbolic link to the PHP version currently in use in your MAMP/MAMP Pro installation:

php.ini -> /Applications/MAMP/bin/php/php5.3.14/conf/php.ini

这解决了问题.只需将php版本php5.3.14更改为您选择在MAMP中使用的任何PHP版本.

That solves the issue. Just change the php version php5.3.14 to whatever version of PHP you've selected to use in MAMP.

如上文@moderndegree所述,您可以在以后通过在bash/zsh/etc中编辑path变量来有选择地将其提供给终端使用:

As @moderndegree mentions above, you can then optionally make this available to the terminal in the future by editing your path variable in your bash/zsh/etc:

export PATH="/Applications/MAMP/bin/php/php5.3.14/bin:$PATH"

更多推荐

无法将detect

本文发布于:2023-10-22 08:29:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1516986.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:detect

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!