How to configure apache2.2.16+php5.3.3+mysql5.1.49

Source: Internet
Author: User

First step: Download the installed files
1. Mysql:mysql-5.1.49-win32.msi;
2. Apache:httpd-2.2.16-win32-x86-openssl-0.9.8o.msi;
3. PHP5.3.3 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. Put the downloadedPhp-5.3.3-win32-vc6-x86 unzip the D:\php directory, you can change the name of the folder to short, the result 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 filesPhp.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. SelectPhp.ini-development copies a copy to the same directory and renamedPHP.ini using the Text tool to open, findExtension_dir, you can
See two, selectOn Windows: The next one and go to the front of the semi-colon modified toExtension_dir = "D:/php/php5/ext", 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_, removeExtension=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. FindDirectoryIndex index.html 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 <directory to modify it to the path of your own configured DocumentRoot (author is <directory "d:/php/www" >)
Fifth step: Test whether the PHP+APACHE+MYSQL is configured successfully
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 it? Simple is good, hehe!!
2. Create a index.php file in the WWW folder created above using EditPlus or another text tool.
3. Write:

Copy the Code code as follows:
<?
$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 ']. " <br/> ";
echo $data [' name ']. " <br/> ";
}
Mysql_close ();
?>


4. Launch the Apache server and enter http://localhost/in the browser.
If you see: That means we're done! Congratulations, congratulations!

How to configure apache2.2.16+php5.3.3+mysql5.1.49

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.