How to install and configure php mysql in win7
Aug 12, 2020 am 09:17 AMHow 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
1. Download php
Select: VC15 x86 Thread Safe, the downloaded file name is: php-7.3.0-Win32-VC15 -x86.zip
1.1 Unzip the compressed package to a directory
For this installation, unzip it to: F:\ApatchInstallWorkspace\dev\servers\php Down.
1.2 Configure environment variables
1.3 Add PHP_HOME to the PATH variable
1.4 Development dos command line, enter: php -version, monitor whether the configuration is successful
2. Running PHP requires a server, here Use Apache web server
Download address: https://www.apachelounge.com/download/ and select Apache 2.3.37 win32. (Needs to correspond to the version of php)
2. Configure Apache
2.1 Unzip httpd-2.4.37-win32-VC15.zip
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:
2.5 Double-click ApacheMonitor.exe, or add it to the startup directory
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.
3. Install a mysql
The author has installed it before, the version is as follows:
4. Configure Apache and PHP
4.1 You need to configure apache’s httpd.conf file:
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)
4.2 Continue to configure DirectoryIndex in the httpd.conf file
Find DirectoryIndex in the file and configure the following content:
4.3 Navigate to the F:\ApatchInstallWorkspace\dev\servers\php directory and configure php.ini
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.dll
<?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!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

deepseek web version entrance deepseek official website entrance

How to update the latest version of Bybit Exchange? Will there be any impact if it is not updated?

Pi Node Teaching: What is a Pi Node? How to install and set up Pi Node?

How To Set Up Visual Studio Code (VS Code) for PHP Development

Coinsuper exchange software channel official website entrance

PHP Program to Count Vowels in a String
