Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable "detect_unicode" setting from php.ini? (trying to install Composer)

I've been trying to install Composer on my machine (OS X 10.6) with no success so far.

As per Composer docs, i executed this in Terminal:

curl -s http://getcomposer.org/installer | php#!/usr/bin/env php

And this is the output:

The detect_unicode setting must be disabled. Add the following to the end of your php.ini: detect_unicode = Off

Of course, this is in my php.ini: detect_unicode = Off, located at /etc/php.ini.default

php -info tells me that php.ini file is being loaded from /etc/ (output is: Configuration File (php.ini) Path => /etc)

But, also outputs: detect_unicode => On => On

Why php.ini.default is not loading my settings and how could i disable effecively detect_unicode?

like image 408
Nacho Avatar asked Jul 02 '12 23:07

Nacho


2 Answers

Just add "-d detect_unicode=Off" after the command

curl -s https://getcomposer.org/installer | php -d detect_unicode=Off 
like image 70
Ahmed Abu Eldahab Avatar answered Sep 28 '22 05:09

Ahmed Abu Eldahab


Most likely no ini file at all is being loaded, I don't know if /etc/php.ini.default is seen or not by php. Same as I said in Can't set/find detect_unicode to Off - you should run php -i | grep ini and check which file actually is loaded, then edit it. If none is loaded, then make sure you put a php.ini file into the Configuration File Path value, in your case /etc/php.ini it seems.

like image 38
Seldaek Avatar answered Sep 28 '22 05:09

Seldaek