user3698265
user3698265

Reputation: 137

Why Composer does not install Laravel 5.6 properly?

I am unable to install Laravel 5.6 on my wamp server. I have the following setup:

When I try to install the Laravel application through Composer, I receive the following error in cmd:

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

cmd returns these errors multiple times and at the end of the error, I get the following message:

Application ready! Build something amazing.

When I try running this command php artisan serve then cmd returns the following error:

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

Fatal error: require(): Failed 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 have searched about it and found a couple of articles. Most of them are saying this is about the PHP version or that I need to update Composer. Some say I need to stop proxy or any anti-virus software.

I have done all the above steps but am still facing the same problem. I still failed to install Laravel 5.6.

Edited

After following the instruction of this answer, I face 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 the cmd.

Upvotes: 5

Views: 4852

Answers (2)

FULL STACK DEV
FULL STACK DEV

Reputation: 15971

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

Run the following commands.

composer clearcache

Also specify the version while creating the project.

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

Make sure you have installed the open-ssl extension in your PHP or run this command:

composer config -g -- disable-tls true

For installing an extension in Windows, you can simply uncomment this line:

extension=php_openssl.dll

Restart your server and you are good to go.

Upvotes: 1

Gabriel
Gabriel

Reputation: 970

Laravel 5.6 requires PHP 7.1.3 or later.

Installing Laravel

You don't need 'php artisan serve' if you are running in WAMP or XAMPP. Just make a virtual host and point your vhost directory to your installation folder blog/public.

Upvotes: 4

Related Questions