0
How to fix the error below by using Composer.
Code of Composer.json already created in bin folder\ :
{
"require": {
"slim/slim": "2.*"
}
}
0
How to fix the error below by using Composer.
Code of Composer.json already created in bin folder\ :
{
"require": {
"slim/slim": "2.*"
}
}
1
Installation
Create a folder in your xampp with any name and then navigate cmd to it:
cd c:\xampp\htdocs\NomeDaPasta
Installation with Composer
Install Composer in your project
php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
then in cmd still:
echo @php "%~dp0composer.phar" %*>composer.bat
create Composer.json in the folder:
{
"require": {
"slim/slim": "2.*"
}
}
then use the command:
php composer.phar install
Create the index.php:
<?php
require 'vendor/autoload.php';
The same error: Composer could not find the config file: C: Programdata Composersetup bin To initialize a project, Please create a Composer.json file as described in the https://getcomposer.org/ "Getting Started" Section
Here it was normal: http://imgur.com/a/aFqgQ
myComposer.json in bin/ { "require": { "slim/slim": "2. *" } }
the proxy disrupts ???
Sometimes
if my json ...is not wrong.. it can only be the proxy or firewall
The commands you used the same as the ones I passed?
Right. All the same!!!
What version of your Composer?
Composer version 1.4.2 2017-05-17 08:17:52
Give a Composer update and see if you create the Composer.lock file
Composer update Composer could not find the config file: C: Programdata Composersetup bin To initialize a project, Please create a Composer.json file as described in the https://getcomposer.org/ "Getting Started" Section
Composer could not find the config file: C: Programdata Composersetup bin that you have a COMPOSER environment variable set and configured for C: Programdata Composersetup bin. You must deselect / delete this env var.
can correct...thank you
1
As discussed in this question in Soen and in this Issue in the official Composer repository, the error is generated due to an incompatibility generated in Windows when the environment variable COMPOSER
is defined. The practical solution is to access the environment variables and remove it, not forgetting to restart the computer after the process. Once this is done, the command should work normally.
Browser other questions tagged php commiserate slim slimframework
You are not signed in. Login or sign up in order to post.
According to this question, You may need to delete the environment variable for Composer.
– Woss
@Andersoncarloswoss did not resolve...Composer continues to display this message!
– alexjosesilva
Composer could not find the config file: C: Programdata Composersetup bin To initialize a project, Please create a Composer.json file as described in the https://getcomposer.org/ "Getting Started" Section
– alexjosesilva
Inside that briefcase
bin
you created this file?– Woss
Correto bin/Composer.json -> { "require": { "slim/slim": "2. *" } }
– alexjosesilva
I executed the command from the
composer
overall and worked perfectly. Nor did it need any filecomposer.json
, since it is using thecreate-project
. Try to rotate the command with thecomposer
globally installed or place the archivecomposer.json
at the root where you will create the project.– Woss
php Composer.phar installs this command ???
– alexjosesilva
But you are doing
install
orcreate-project
?– Woss
php Composer.phar install inside app1/ containing the Composer.json
– alexjosesilva
Let’s go continue this discussion in chat.
– Woss