5

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

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

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.

joeljpa
  • 317
  • 2
  • 13
user3698265
  • 137
  • 1
  • 6
  • Are you trying to run `artisan serve` within the laravel dir? From your question is looks like you're building the project and then running artisan serve right after – Option Mar 07 '18 at 07:55
  • Did you just upgrade your PHP version? Or the PHP version comes with WAMP installation? – Adlan Arif Zakaria Mar 07 '18 at 09:03
  • I update the php version on wamp. Old version was 5.6 – user3698265 Mar 07 '18 at 09:25
  • Similar question by the same user (a reposting?): *[Why does Laravel 5.6 not install after updating PHP 7.1.3 on WAMP?](https://stackoverflow.com/questions/49250646/why-does-laravel-5-6-not-install-after-updating-php-7-1-3-on-wamp)* – Peter Mortensen Aug 08 '23 at 01:16

2 Answers2

4

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Gabriel
  • 970
  • 7
  • 20
1

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
FULL STACK DEV
  • 15,207
  • 5
  • 46
  • 66