Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to run composer.phar

Composer is a tool for dependency management in PHP projects. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. Composer is not a package manager.

I told this to declare my meaning from Composer. Recently I have tried to run my first Google API project. There is a quickStart witch tells I need to use Composer. So I tried to run composer using php composer.phar install, but the only output I got was some question marks ???????, and no dependencies where fetched. I haven't noticed anything special about composer itself, it seems that there must be something with .phar files that I don't know. Is there anything special in the architecture of phar files? What should I do?

I googled a lot, but there was nobody having the same problem as mine.

like image 289
Mostafa Shahverdy Avatar asked Mar 05 '13 05:03

Mostafa Shahverdy


2 Answers

The issue you describe sounds like you have detect_unicode enabled in your php.ini. You should disable it because it really is of no use and creates problems with phars.

By the way using the composer installer would do a check of settings and warn you about such problems.

like image 151
Seldaek Avatar answered Oct 06 '22 18:10

Seldaek


php -d detect_unicode=Off composer.phar install

fixed it on MacOS X, it seems to reset my php.ini every now and then

like image 27
Zout Avatar answered Oct 06 '22 20:10

Zout