无法将 detect_unicode 设置/查找为 Off

Can#39;t set/find detect_unicode to Off(无法将 detect_unicode 设置/查找为 Off)
本文介绍了无法将 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.

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.

https://github.com/phpDocumentor/phpDocumentor2/blob/develop/README.md#installation

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

Screenshot of the error in terminal...

解决方案

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/

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

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

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_unicode 设置/查找为 Off的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)