Home > Backend Development > PHP Problem > What are the precautions for php installation?

What are the precautions for php installation?

hzc
Release: 2023-03-01 13:46:02
Original
2377 people have browsed it

What are the precautions for php installation?

php installation notes are:

1. Place php5ts.dll, libmysql.dll, and libmcrypt.dll in the php5 root directory. The three files are placed in the system32 directory of the system.

2. Rename the php.ini-dist file in the directory to php.ini, and cut the php.ini file and put it in the c:\windows directory (if it is a 2000 system, put it in c :\winnt directory)

3. Open the c:\windows\php.ini file:

找到:extension_dir = "./"                 
更改为:extension_dir = "d:\php5\ext
 
找到:

;extension=php_mbstring.dll

;extension=php_gd2.dll

;extension=php_mysql.dll

;extension=php_mcrypt.dll
去掉注释!
Copy after login

4. Configure IIS to support PHP

1) In the "Control Find and open "Internet Information Services (IIS) Manager" in "Panel" - "Administrative Tools"
2) Find "Website" - "Default Website", right-click "Default Website", and then click "Properties"
3) Click "ISAPI Filter", then click the "Add" button. In the pop-up "Filter Properties" dialog box, fill in the filter name "php" and the executable file "d:\php5\php5isapi. dll", (the path of php5isapi.dll can be selected by pressing the "Browse" button), then click "OK" to exit
4) Click the "Home Directory" tab, then click "Browse" and point the website directory to d :\wwwroot (or other website directory)
5) Click "Configuration" under the home directory label, the "Application Configuration" dialog box will appear, then click the "Add" button, and in the pop-up "Add/Edit Application Extension" Name Mapping" dialog box,
Enter d:\php5\php5iaspi.dll in the executable file location, enter php in the extension, and then confirm
6) Click the "Document" tab, and then click "Add " button, in the pop-up "Add Default Document" dialog box, fill in: index.php, and then confirm
7) Click "Web Service Extension", then click "Add a new Web Service Extension", and then In the pop-up "New Web Service Extension" dialog box, enter php for "Extension name", then click "Add", enter d:\php5\php5isapi.dll under "File Path", confirm, and then click "Set extension status to allow" "Tick the hook before final confirmation to exit.
8) In order to verify whether the environment we just configured can run php normally, first we create a new text and enter the following content

<?php
phpinfo();
?>
Copy after login

Save it as phpinfo.php and put it in the root directory of the website (My here is d:\wwwroot), enter http://localhost/phpinfo.php in the IE browser, and the php information appears after pressing Enter, which proves that the system already supports PHP

Recommended tutorial: "php tutorial

The above is the detailed content of What are the precautions for php installation?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template