PHP5.3 Installation

Source: Internet
Author: User
First step: Download the installed files
1. MySQL: Download address mysql-5.1.49-win32.msi;
2. Apache: Download address httpd-2.2.16-win32-x86-openssl-0.9.8o.msi;
3. PHP5.3.3 Download Address php-5.3.3-win32-vc6-x86 Note: Be sure to download the php-5.3.3-win32-vc6-x86 version
, do not download the php-5.3.3-nts-win32-vc6-x86 version, and do not download the VC9 version, as he is the IIS Server installation version.
Step Two: Install files
1. Build a folder on the disk you want to install (the author does this by creating a PHP folder in the root of the D drive D:\php).
2. Install the Apache server, after the completion of the directory results are: D:\php\Apache.
3. The downloaded php-5.3.3-win32-vc6-x86 extracted from the D:\php directory, you can change the name of the folder to short, the results D:\php\php5
4. Install the MySQL database, which is installed as usual. The author installs him in the same directory as (D:\php\MySQL) and PHP.
Step Three: Configure PHP5.3.3
1. Configure PHP5.3.3, open the PHP installation directory (the author is D:\php\php5) can see the directory there are two such files php.ini- Development and Php.ini-production, the first is the configuration file used for development, and the second is the configuration of a standard production environment.
2. Select Php.ini-development Copy to the same directory and rename to php.ini using the Text tool to open, find Extension_dir, can
See two, select on Windows: Below that and go to the front of the semicolon modified to Extension_dir = "D:/php/php5/ext", the reader root
According to its own directory structure configuration, the purpose is to find and php.ini the same directory in the Ext folder extension library.
3. Find Extension=php_, remove Extension=php_curl.dll, Extension=php_gd2.dll, Extension=php_mbstring.dll,
Extension=php_mysql.dll, Extension=php_mysqli.dll, Extension=php_pdo_mysql.dll, Extension=php_xmlrpc.dll front
The semicolon. Find Short_open_tag = off to modify it to Short_open_tag = on to allow it to support short tags.
4. Copy the Php5ts.dll file to the Windows/system32 directory, only the php-5.3.3-win32-vc6-x86 version is Php5ts.dll
The php-5.3.3-nts-win32-vc6-x86 version is not available.
Fourth Step: Configure Apache
1. Open the httpd.conf file in the Conf directory under the Apache directory to find #loadmodule, at the end of which is approximately 128 rows
Add to:
LoadModule php5_module "D:/php/php5/php5apache2_2.dll"
Phpinidir "D:/PHP/PHP5"
AddType application/x-httpd-php. php
AddType application/x-httpd-php. htm
AddType application/x-httpd-php. html
The directory structure is configured according to the user's own directory.
2. Find DirectoryIndex index.html to modify it to DirectoryIndex index.php default.php index.html index.htm default.html
Default.htm
3. Find DocumentRoot to point to the folder where you want to place the Web file (the author created a d:/php directory in the
www folder) So documentroot is DocumentRoot "d:/php/www", readers can be modified according to their own configuration.
4. Find Fifth step: Test Php+apache+mysql for configuration Success
1. Open MySQL to create a new database and table in MySQL. (the author is the UserInfo database and the users table have ID and name two fields)
test? Simple is good, hehe!!
2. Create a index.php file in the WWW folder created above using EditPlus or another text tool to open it.
3. Write:
!--?
$DB _host = "localhost";
$DB _user = "root";
$DB _pass = "root";
$DB _name = "UserInfo";

mysql_connect ($DB _host, $DB _user, $DB _pass);
mysql_select_db ($DB _name);

mysql_query ("Set NAMES gb2312");
$sql = "SELECT * from users";
$result = mysql_query ($sql);
while ($data =mysql_fetch_array ($result)) {
echo "------------------------";
Echo $data [' ID '].
";
Ech
  • 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.