Home >Backend Development >PHP Problem >How to install and configure php mysql in win7
How to install and configure php mysql in win7: first download php and extract the php compressed package to a directory; then add "PHP_HOME" to the PATH variable; then configure Apache and install mysql; finally restart httpd and Just test it.
Recommendation: "PHP Video Tutorial"
Description:
Author's The hardware environment is: Windows 7 64-bit
Select: VC15 x86 Thread Safe, the downloaded file name is: php-7.3.0-Win32-VC15 -x86.zip
For this installation, unzip it to: F:\ApatchInstallWorkspace\dev\servers\php Down.
Download address: https://www.apachelounge.com/download/ and select Apache 2.3.37 win32. (Needs to correspond to the version of php)
For this installation, extract it to the author's customized directory: F:\ApatchInstallWorkspace\dev\servers\httpd
2.4 Let apache be installed as a service under windowAs an administrator, run the command line and navigate to: Apache24\bin directory, as shown below:
Right-click the apache cursor, you will see a pop-up box, click start in the pop-up box You can start the service. Click stop to close the service.
If the service is started, enter: http://localhost/ in the navigation bar of the browser, and it will See the content below, otherwise you will not be able to access the page.
The author has installed it before, the version is as follows:
In F:\ApatchInstallWorkspace\dev\servers\httpd\Apache24\ conf directory, open the httpd.conf file, move to the end of the file (or anywhere in the file), and write the following content:
LoadModule php7_module "F:/ApatchInstallWorkspace/dev/servers/php/php7apache2_4.dll" AddHandler application/x-httpd-php .php PHPIniDir F:/ApatchInstallWorkspace/dev/servers/php
The version of the component must match the version of apache (here, the Version is 2_4)
Find DirectoryIndex in the file and configure the following content:
Copy the php.ini-development file and copy it Name it: php.ini
Find and modify the following parameters:
extension=F:/ApatchInstallWorkspace/dev/servers/php/ext/php_curl.dll extension=F:/ApatchInstallWorkspace/dev/servers/php/ext/php_gd2.dll extension=F:/ApatchInstallWorkspace/dev/servers/php/ext/php_intl.dll extension=F:/ApatchInstallWorkspace/dev/servers/php/ext/php_mbstring.dll extension=F:/ApatchInstallWorkspace/dev/servers/php/ext/php_mysqli.dll extension=F:/ApatchInstallWorkspace/dev/servers/php/ext/php_openssl.dll extension=F:/ApatchInstallWorkspace/dev/servers/php/ext/php_soap.dll extension=F:/ApatchInstallWorkspace/dev/servers/php/ext/php_xmlrpc.dll4.5 Restart httpdAn error occurred As follows:
<?php phpinfo();
The above is the detailed content of How to install and configure php mysql in win7. For more information, please follow other related articles on the PHP Chinese website!