PHP configuration Experience contains MYSQL5 garbled solution _php Tutorial

Source: Internet
Author: User
Tags php programming
After a period of time the crazy PHP programming, the configuration of the PHP under the Windows platform is a deep feeling, at first I used a one-click installation of the Fool pack, but consider the Idiot pack installed version has lagged behind, in the real manual configuration of the PHP environment encountered many problems, after consulting a lot of information and attempts, Finally configured successfully. Now, I will share my configuration experience with you, I believe you can solve the confusion of configuring PHP environment.

First of all, let's talk about the software version I'm using.
PHP 5.1.6
Apache 2.0.59 (Note: PHP 5 is not supported for Apache 2.2.X version)
MYSQL 5.0.24a

OK, now start the installation, I first installed the PHP5, directly unzip the file to C:\php (installation to where there is no impact, with the personal Hi, all the paths in this article to my installation path, please install on their own machine when the attention to change to their own path), and then install Apache, I directly put it into the C packing directory, during the installation process, there will be 3 text boxes, the above two input your native IP, the bottom of the input of your email, OK. Installation is complete. Edit now: The httpd.conf file under \apache group\apache2\conf\. Open the file with Notepad and add these two lines of code at the end:
LoadModule php5_module "C:/php/php5apache2.dll"
AddType application/x-httpd-php. php

I set up a www directory in the C: \ directory to store My site files, in httpd.conf found such a sentence, documentroot "C:/apache2/htdocs" changed to DocumentRoot "C:/www". In this way, the home directory is set to C:\www. If you do not want to change the home directory location, you can do so without changing it.

Modify the default home page for the directory:
Find DirectoryIndex and write the name of the file you want to set as the home page, such as: index.html index.php.

Language priority, locate the following statement
Languagepriority zh-cn ZH-TW en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-br RU SV
Put the Chinese (zh-cn zh-tw) part of the cut to the front (that is, the original file in the corresponding
Partially changed to the above.

There's nothing else to change. The configuration of the Apach is here. Then I'll talk about the PHP configuration.

Copy the php.ini-dist to C:\windows and rename it to PHP.ini (have done PHP)
And then modified a few places:


Found under Data handling post_max_size = 8M
This is the maximum post data size that PHP will accept and can be changed to 20M.

Extension_dir= found under paths and directories
Here is the location of the PHP Search extension library, set its path to the location of the Extensions folder, which is changed to:
Extension_dir= "C:\php\ext"

Upload_max_filesize = 2M is found under File uploads, maximum file size allowed for uploading
Can be changed to 20M.

Dynamic Extensions
Here is the PHP extension Settings section, listing all the supported extensions of PHP, preceded by a semicolon note
The current PHP configuration does not support extensions, we can remove the semicolon to allow PHP to support the extension
Here are a few of the more common and useful PHP extensions
Remove the semicolon in front of the following sentence
; Extension=php_mbstring.dll
; Extension=php_dba.dll
; Extension=php_dbase.dll
; Extension=php_filepro.dll
; Extension=php_gd2.dll
; Extension=php_imap.dll
; Extension=php_mysql.dll

The php.ini here is the end of the configuration. Then the important point is
C:\php\libmysql.dll,c:\php\ext\php_mysql.dll,c:\php\ext\php_mysqli.dll
Copy to C:\Windows\system32, so that PHP5 can support MySQL.

Re-start Apache, create a new Notepad file in the home directory, test, enter it inside.
Phpinfo ();
?>
After saving, modify the suffix named PHP. In the browser input

http://www.bkjia.com/PHPjc/317106.html www.bkjia.com true http://www.bkjia.com/PHPjc/317106.html techarticle after a period of time the crazy PHP programming, the configuration of PHP under the Windows platform is very deep feeling, at first I used a one-click installation of the Fool pack, but consider the installation of the Idiot pack version ...

  • 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.