0

Hello. Please I am new to the php slim framework. I have tried all day to download and install slim 3 through composer but haven't been successful.

Am using a windows pc. I used command prompt and downloaded composer and installed composer to the desired directory. However, when i try installing slim 3, I get an error : "installation failed, reverting ./composer.json to its original content"

[Command Prompt Error Message][Command prompt error message]

Pedestal
  • 21
  • 1
  • 4
  • 1
    According to the docs http://www.slimframework.com/docs/start/installation.html it's a simple one-liner `composer require slim/slim "^3.0"`. What can possibly go wrong? – Jens A. Koch Jul 25 '16 at 14:29
  • Have you read the Composer troubleshooting [guidelines](https://getcomposer.org/doc/articles/troubleshooting.md)? – WoMo Jul 25 '16 at 19:45

4 Answers4

1

you have to load the direction page of slim frame work using this link: https://www.slimframework.com/docs/start/installation.html and there will be a command like this - composer require slim/slim "^3.0" instead of using this one you have to use this...

  • php composer.phar require slim/slim "^3.0"

and you will get slim installed

Fansad PP
  • 459
  • 4
  • 11
1

Kick-start Slim 3 projects using a skeleton!

With Composer installed, use the cmd line to access the C:\xampp\htdocs folder, then write this command:

$ php create-project slim/slim-skeleton [my-app-name]

Command will produce composer.json and composer.lock files along with a public/ folder that can all be committed to VCS (do not commit any other folders/dependencies).

Mister Moody
  • 114
  • 1
  • 10
0

Make sure you have high enough version of PHP, and PHP is in your PATH. To check this - print "php -v " in command line (you can pretty sure run up to PHP7).
Make sure you are in the right directory for your project.
Provide complete command line output, there could be things you didn't know to be important for a good answer.
After all, you can delete composer.json and composer.lock from the directory, and try again.

mr4eshir
  • 11
  • 1
0

I use windows with XAMPP to run a virtual apache server. After many similar issues, I downloaded git-bash and used it instead of the windows cmd.

give it a try, and see if that can resolve your issues.

https://git-scm.com/