In-depth explanation of PHP runtime environment configuration _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Go deep into the PHP runtime environment configuration. Runtime Environment configuration: php54 + Apache2.2 + Mysql1. default port settings: # Listen12.34.56.78: 80Listen80802. load model: LoadModulephp5_moduleD: MyZILIAOPHPphp54php5apache2_2.dl Running environment configuration: php54 + Apache2.2 + Mysql

1. default port settings:

# Listen 12.34.56.78: 80

Listen 8080.

2. load the model:

LoadModule php5_module "D: \ MyZILIAO \ PHP \ php54 \ php5apache2_2.dll"

3. supported types:

AddType application/x-compress. Z
AddType application/x-gzip. gz. tgz
AddType application/x-httpd-php. php
PHPIniDir "D: \ MyZILIAO \ PHP \ php54 \"

4. Mysql configuration:

Modify the php. ini file and configure php

First, copy the php. ini-development or php. ini-production in the php directory to the C: \ WINDOWS directory and change it to php. ini.

Php. ini-development is suitable for development programs (for testing)

Php. ini-production has a high security setting, which is suitable for online product use.

Open php. ini and modify the following content.

Find the; extension_dir = "./" line and change it to extension_dir = "D: \ php \ ext" (remove the previous ";")

; Date. timezone = change to date. timezone = "asia/shanghai" (remove the previous ";")

Set short_open_tag to On

Extension = php_mbstring.dll (supported by wide characters. we recommend that you remove the preceding ";")

Extension = php_gd2.dll (php gd library support, you must remove the previous ";")

Extension = php_mysqli.dll (remove the previous ";")

Extension = php_mysql.dll (to enable PHP to support MySQL, you must remove the preceding ";")

Save and exit

Listen 1. default port settings: # Listen 12.34.56.78: 80 Listen 8080 2. load model: LoadModule php5_module "D: \ MyZILIAO \ PHP \ php54 \ php5apache2_2.dl...

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.