7

I am unable to install Laravel 5.6 on my WAMP server. I have following setup

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

When I am trying to install the Laravel application through Composer, I am receiving the following error in cmd:

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

cmd is returning these errors multiple times and at the end, the error following message receiving

Application ready! Build something amazing.

When I am trying to run this command php artisan serve then cmd returns the following error.

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

Fatal error: require(): Failed opening required 'D:\wamp64\www\Laravel5.6\PR/vendor/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, but all of them are saying this is about PHP version and some are saying I need to update the Composer and some says I need to stop proxy or any anti-virus software.

I have done all the above steps as instructed in different articles, but I am still facing the same problem. I still failed to install Laravel 5.6.

How can I fix the issue?

After following the instructions of laravel levaral's answer, I am facing the following errors.

[Composer\Exception\NoSslException]
The openssl extension is required for SSL/TLS protection but is not available. 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] [--repository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vcs] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [] [] []

The above errors are also in the cmd.

I have tried all the methods in the answers, but I am still facing the errors.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user3698265
  • 137
  • 1
  • 6

3 Answers3

-1

Try to install the latest version of WAMP and check with the below command:

    composer update --no-scripts
    composer dump-autoload
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
munazzil
  • 109
  • 2
  • 9
-2

Try running

composer update

in your project folder and it should install the vendor package that you need in order to run your project.

Omar Ali
  • 8,467
  • 4
  • 33
  • 58
Manuel
  • 1
  • 2
  • I have found a post that might help you but can't do much more sorry https://stackoverflow.com/questions/35249620/the-openssl-extension-is-required-for-ssl-tls-protection – Manuel Mar 13 '18 at 07:58
  • "Try running" sounds fine. Can you explain that further? Why should updating packages solve an error thrown by Composer itself? – Nico Haase May 24 '20 at 09:56
-3

The failure to install Laravel 5.6 after updating PHP to 7.1.3 on Wamp is caused by the absence of the OpenSSL extension, which is necessary for SSL/TLS encryption. You can do the actions listed below to address this issue:

  1. Locate your PHP configuration file (php.ini) for the PHP version you updated (in this case, PHP 7.1.3). It is typically found in the Wamp installation directory under bin\php\php7.1.3.
  2. Use a text editor to access the "php.ini" file.
  3. Search for the following line: ;extension=openssl.
  4. To uncomment a line, remove the semicolon (;) at the beginning of the line. 'extension=openssl' ought to now be visible.
  5. Save the changes to the php.ini file and close the text editor.
  6. To implement the configuration changes, restart the Wamp server..

You should be able to use the 'create-project' command you supplied to continue installing Laravel 5.6 after enabling the OpenSSL extension. Verify that Composer is set up and available from the command line. Run the command line:

composer create-project --prefer-dist laravel/laravel <directory> "5.6.*"

Wherever you wish to install Laravel 5.6, replace "" with the relevant directory name. This command will use the 5.6 version to start a new Laravel project.

  • 2
    Looks like ChatGPT – DavidW Jun 08 '23 at 11:00
  • The steps are same everytime – Nitiz Sharma Jun 08 '23 at 13:32
  • [The comments](https://stackoverflow.com/questions/49250646/why-laravel-5-6-does-not-installing-after-updating-php-7-1-3-on-wamp/76422454#comment85504545_49250646) to the question contains *"Have you tried installing* ***open-ssl?"*** and *"Yes I had installed it"*. How does that jive with the leading statement *"The failure to install Laravel 5.6 after updating PHP to 7.1.3 on Wamp is caused by the* ***absence of the OpenSSL extension"***? (My emphasis) – Peter Mortensen Jun 08 '23 at 13:52
  • 1
    https://stackoverflow.com/help/gpt-policy – miken32 Jun 08 '23 at 15:15