I am aware that there are a lot of questions regarding this already, but I've looked through each of them and have found nothing.
I am running php 7.0.6, and Apache2.4. I downloaded PHP from windows.php.net/download (I got the second one down, the x86 threadsafe one). After download I extracted it straight to the C:\
drive under C:\php
.
I am trying to install the Magento e-commerce platform but am required to install a few PHP extensions before I can proceed (namely curl, xsl, intl, mbstring, openssl and gd)
I had a read around and found that to enable them I have to remove the semicolon before them in the php.ini
file, so I have navigated to C:\php
and looked for it, but can only find php.ini-development
and php.ini-production
, which having looked at another thread, neither is what I want.
I also read that it is sometimes just a file called php, but cannot find that either in the C:\php
folder
I then performed a phpinfo();
command in a php file and ran it, getting this result:
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File (none)
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
I have then looked in the C:\Windows
folder to no avail, and I don't know how I am supposed to find the php.ini
file so I can remove the semicolon and load the php extensions.
Any help would be appreciated.
This can be tricky—the location of the php.ini file vastly varies by the environment you’re running PHP with. If you’re running Windows, you'll likely find the php.ini file within the directory of your PHP installation in the system drive.
Your PHP.ini file is usually located in one of the following sections: As mentioned, the Configuration file path is the default one of the PHP.ini files. The Loaded Configuration File section applies when your PHP installation is used as a module. In GoDaddy servers, the PHP.ini file is usually located in /web/config/php.ini.
For locating the php.ini configuration file, you can run the code below in Linux: So, from the example mentioned above, we found out that the PHP install is placed inside /etc/php/7.2. But, there is an essential thing to consider: there exist three distinct configuration files.
You can run phpinfo () by creating a .php file and calling that function. Go ahead and create the phpinfo.php file with the following contents and place it in your document root: Load this file in your browser, and you should see the output of phpinfo ().
Where PHP is installed C:\php
there is a php.ini-development
and php.ini-production
. You can copy or rename one of these to php.ini
. These are templates and have all of the default settings that are needed. The main difference is that the development one will have error reporting turned on and the production one will not:
It should be loaded from either the PHP directory C:\php
or C:\windows
. I use the PHP directory as PHP I believe, will always look in the directory from which PHP is run:
copy c:\php\php.ini-development c:\php\php.ini
Or:
copy c:\php\php.ini-development c:\windows\php.ini
My system:
Configuration File (php.ini) Path C:\Windows
Loaded Configuration File C:\app\php\php.ini
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With