Php5.4 and apache2.2 environment Configuration

Source: Internet
Author: User
Tags vc9
1: Download php5.4.2forwindows.to download the php-5.4.2-win32-vc9-x86.zip version of threadsafethread Security Edition 2: php after decompression. ini-development is the configuration of the development version. php. ini-production is the configuration for website publishing. use php for development. ini-development to php. ini. 3: Modify p below

1: Download php5.4.2 for windows. to download the Thread Safe Thread security edition php-5.4.2-Win32-VC9-x86.zip 2: unzip php. ini-development is the configuration of the development version. php. ini-production is the configuration for website publishing. use php for development. ini-development to php. ini. 3: Modify p below

1: Download php5.4.2 for windows.

To download the Thread Safe Thread security Edition

Php-5.4.2-Win32-VC9-x86.zip

2: Decompress the package.

Php. ini-development is the configuration of the development version.

Php. ini-production is the configuration when the website is released.

Use php. ini-development for development to change to php. ini.

3: Modify the php. ini configuration below my php5.4.2 is placed in the E: \ apache2.2 \ php-5.4.2 folder, modify the following content

Xml Code

  1. Short_open_tag = On Enable
  2. Asp_tags = On <**> Enabled
  3. Register_globals = off super global variable. We recommend that you disable it to cause security vulnerabilities.
  4. Post_max_size = 8 m post maximum data submission volume
  5. Magic_quotes_gpc = off php built-in security verification. We recommend that you enable
  6. File_uploads = On php supports File Upload
  7. Upload_max_filesize = 2 M File Upload maximum 2 M
  8. Max_file_uploads = 20 maximum number of concurrently uploaded files

Find extension_dir and the following extension = *****. dll here

Add this section before extension = *****. dll to configure the dynamic link library address of php.

Xml Code

  1. Extension_dir = "E: \ apache2.2 \ php-5.4.2 \ ext"

Remove the semicolon before the following extension to enable it.

Php code

  1. Extension = php_bz2.dll
  2. Extension = php_curl.dll
  3. Extension = php_gd2.dll
  4. Extension = php_gettext.dll
  5. Extension = php_mbstring.dll
  6. Extension = php_mysql.dll
  7. Extension = php_mysqli.dll
  8. Extension = php_openssl.dll
  9. Extension = php_pdo_mysql.dll
  10. Extension = php_sockets.dll
  11. Extension = php_xmlrpc.dll

Locate date. timezone

Set the time zone to China

Java code

  1. Date. timezone = prc

4: Let Apahce support php.

Open. \ apache2.2 \ conf \ httpd. conf

Add at around 60 rows

Java code

  1. PHPIniDir "E:/apache2.2/php-5.4.2"

Note that you must add it before the LoadModule to load the file in advance. Otherwise, phpMyAdmin may be prone to errors later.

After LoadModule, add

Java code

  1. LoadModule php5_module "E:/apache2.2/php-5.4.2/php5apache2_2.dll"

Add to Addtype in approximately 380 rows

Java code

  1. AddType application/x-httpd-php. php. php5. php4. php3. phtml. phpt
  2. AddType application/x-httpd-php-source. phps

5. Restart Apache

Create a phpinfo. php test in E: \ apache2.2 \ htdocs

Php code

  1. Phpinfo ();
  2. ?>

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.