Win7 Configuring the php.ini file in IIS

Source: Internet
Author: User

Rename the php.ini-development configuration file to the PHP.ini profile. Then do the following configuration operations:

1. Open the PHP.ini configuration file to find

1
2

; On Windows:
; Extension_dir = "ext"

Revision changed to

1
2

; On Windows:
Extension_dir = "C:/php/ext"

Represents the specific directory for the specified PHP expansion pack in order to invoke the appropriate DLL file.

2, because the default PHP does not support automatic connection to MySQL, you need to open the corresponding expansion library functions, such as Php_mysql.dll, will be

1
2
3
4
5
6
7

Extension=php_curl.dll
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dll
Extension=php_pdo_mysql.dll
Extension=php_pdo_odbc.dll
Extension=php_xmlrpc.dll

These extension before the semicolon (;) removed.

3. Configure the session function of PHP

When using the session function, we must configure the session file on the server to save the directory, otherwise we can not use the session, we need to create a new read-write directory folder on Windows 7, this directory is best independent of the Web main program directory, Here I established the Phpsessiontmp directory on the D-Packing directory and found it in the php.ini configuration file.

1

; Session.save_path = "/tmp"

Revision changed to

1

Session.save_path = "D:/phpsessiontmp"

4, configure the PHP file upload function

As with the session, when using PHP file Upload function, we must specify a temporary folder to complete the file upload function, or the file upload function will fail, we still need to create a read-write directory folder on Windows 7, Here I established the Phpfileuploadtmp directory on the D-Packing directory and found it in the php.ini configuration file.

1

; Upload_tmp_dir =

Revision changed to

1

Upload_tmp_dir = "D:/phpfileuploadtmp"

Upload size: upload_max_filesize = 2M

Number of single uploads: Max_file_uploads = 20

5. Modify Date.timezone, otherwise the date part will be error when executing phpinfo:

Warning:phpinfo () [Function.phpinfo] ...

We need to

1

;d Ate.timezone =

Revision changed to

1

Date.timezone = Asia/shanghai

Win7 Configuring the php.ini file in IIS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.