2

I am a beginner, and I am actually trying to install php because I have to run a file in .php

I installed the ZIP file avalaible here :https://windows.php.net/download#php-7.4 I installed the version 8.0.9, on Windows 10

Then when I run the file, there is an error which is :

Environment check

[*] The "json" PHP extension is installed.   

[*] The "phar" PHP extension is installed.

[*] Git is installed.

[X] The openssl PHP extension is required.

The extension already exists at: C:\Users\fabie\Downloads\php-8.0.9-nts-Win32-vs16-x64\ext\php_openssl.dll

To enable it, edit your php.ini configuration file and add the line: extension=C:\Users\fabie\Downloads\php-8.0.9-nts-Win32-vs16-x64\ext\php_openssl.dll

So i checked if there is any 'php.ini' in the repertory of php (which is C:\Users\fabie\Downloads\php-8.0.09-nts-Win32-vs16-x64)

There is only php.ini-developement and php-ini.production.

My question is : How to resolve this ? Do I have to install php on a diferent way ? Do I have to create a php.ini file ? Do I have to write on the -developement and -production files ?

Thanks

3V's
  • 67
  • 1
  • 1
  • 6
  • Does this answer your question? [How to locate the php.ini file (xampp)](https://stackoverflow.com/questions/6185319/how-to-locate-the-php-ini-file-xampp) – Nico Haase Aug 17 '21 at 09:25
  • The readme file explains this, but PHP comes shipped with two sample `.ini` files. You'll have to manually copy one (in the same directory) and rename it as `php.ini`. For local development and testing, you might want to pick the `php.ini-developement`variant. See [this tutorial](https://www.sitepoint.com/how-to-install-php-on-windows/) for instance. – kuroi neko Aug 20 '21 at 11:28

1 Answers1

3

Make a copy of php.ini-development and rename it to php.ini (or choose php.ini-production if that suits your needs). These are sample configuration files you can base your own configuration on. Edit it to your liking afterwards.

Alexander van Oostenrijk
  • 4,644
  • 3
  • 23
  • 37
  • 1
    Just to note, if you change values in `php.ini-production`, when you update your software, there is a change this file will be automatically overwritten, thus losing your updated config. – Jez Emery Aug 17 '21 at 11:44