0

I am trying to set up laravel 4 for the first time locally, and I get this error in the browser when I type in http://localhost/testLaravel/public/.

OpenSSL extension is required. 
Open: C:\xampp\htdocs\testLaravel\bootstrap\compiled.php 

       throw new DecryptException('MAC is invalid.');
   }
   return $payload;
}
protected function validMac(array $payload)
{
   if (!function_exists('openssl_random_pseudo_bytes')) {
       throw new \RuntimeException('OpenSSL extension is required.');
   }
   $bytes = (new SecureRandom())->nextBytes(16);

I think I am supposed to see "You have arrived" with Laravel logo.

My specifications are:

  • testLaravel is my project name which is located C:\xampp\htdocs\testLaravel
  • Laravel 4.2
  • PHP/5.5.15
  • Windows 8.1 x64
  • Apache/2.4.4 (Win32)

I cross checked the OpenSSL to be enabled for PHP in C:\xampp\php\php.ini:

extension=php_openssl.dll

And for Apache in C:\xampp\apache\conf\httpd.conf:

LoadModule ssl_module modules/mod_ssl.so

I am sure I do not have any other installation of PHP or Apache, but still I get the mentioned error.

Update: I remember once I updated my PHP version, by downloading newest PHP and copied all its files into XAMPP PHP's directory to update my PHP and it worked well so far. I doubt this is the problem, since I copied the the laravel project to a PC with original XAMPP installation and it worked. Also in phpinfo() I do not see OpenSSL section.

Musa Haidari
  • 2,109
  • 5
  • 30
  • 53
  • Possible duplicate of [You must enable the openssl extension to download files via https](http://stackoverflow.com/questions/14291151/you-must-enable-the-openssl-extension-to-download-files-via-https) – seeARMS Oct 31 '14 at 15:05
  • @seeARMS I do not think it is duplicate of that, since they are talking about WAMP and possibility of wrong php.ini, that I have made clear is not my case. – Musa Haidari Oct 31 '14 at 15:48

1 Answers1

0

As I mentioned in the comment, the problem was in my PHP installation. I followed s-sharma's instructions in this answer and installed a new version of XAMPP to revert the changes, and the same installation of Laravel is working.

Community
  • 1
  • 1
Musa Haidari
  • 2,109
  • 5
  • 30
  • 53