Why doesn't composer install laravel 5.6 propoerly?

I cannot install Laravel 5.6 on my wamp server. I have the following setting

  • PHP Version 7.1.3
  • Composer Version 1.6.3 2018-01-31

When I try to install the laravel application through composer, I get the following error in cmd

Warning: count (): The parameter must be an array or object that implements Counta in C: \ Users \ MyName \ AppData \ Roaming \ Composer \ vendor \ symfony \ process \ Pipes \ Windo wsPipes.php on line 221

cmd returning these errors several times, and at the end an error message appears, accepting

The application is ready! Build something awesome.

When I try to run this php artisan serve command then cmd returns the following error

Warning: require (D: \ wamp64 \ www \ Laravel5.6 \ PR / vendor / autoload.php): failed to execute n stream: there is no such file or directory in D: \ wamp64 \ www \ Laravel5.6 \ PR \ artisan on li ne 18

Fatal error: require (): Unsuccessful opening required: D: \ wamp64 \ www \ Laravel5.6 \ PR / ven dor / autoload.php '(include_path ='; C: \ php \ pear ') in D: \ wamp64 \ www \ Laravel5.6 \ PR \ artisan on line 18

I searched about this and found several articles, but all of them say that this is a version of PHP, and some say that I need to update the composer, and some say that I need to stop the proxy or any antivirus software.

I have done all of the above steps as described in different articles, but still facing the same problem. I still could not install Laravel 5.6 .

I would like to appreciate if someone tells me how I can fix the problem.

Edited

After following the @laravel levaral instruction , I encountered the following errors.

 [Composer\Exception\NoSslException] The openssl extension is required for SSL/TLS protection but is not availab le. If you can not enable the openssl extension, you can disable this error , at your own risk, by setting the 'disable-tls' option to true. create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--r epository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no -custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vc s] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<dir ectory>] [<version>] 

The above errors are also in cmd

+4
source share
2 answers

Laravel 5.6 requires PHP> = 7.1.3

https://laravel.com/docs/5.6#installing-laravel

You do not need "php artisan serve" if you work in wamp / xamp. Just make a virtual host and specify your vhost directory in the installation / blog folder.

+2
source

It is not installed because it exists in the cache of your system.

Run the following commands.

 composer clearcache 

Also indicate the version when creating the project.

 composer create-project --prefer-dist laravel/laravel blog "5.6.*" 

make sure you install open-ssl extension in your php or run this command

 composer config -g -- disable-tls true 

to install the extension on Windows, you can just uncomment this line

 extension=php_openssl.dll 

restart the server and you will be fine.

Hope this helps

0
source

Source: https://habr.com/ru/post/1275859/


All Articles