Easy Fix Php5+apach2+mysql

Source: Internet
Author: User
Tags apache download php download win32

An American customer wants to change a small website and ask me for help. Can only pick up the wasted days of PHP, look again.

The first is the configuration. Configuring this break is as difficult as the Java environment. Why is it so hard to flaunt something that is free???

is a contradiction. The next part of the thing is plagiarism other people's things, do not blame me. Typing too tired.


Mysql-4.1.22-win32

Apache_2.0.55-win32-x86-no_ssl

Php-5.2.0-win32

Phpmyadmin-2.6.2-rc1

Zend (Customer request 2.6, today is too late, I did not install it.) Tomorrow to fill up)

The above software can be downloaded to each major download website. or directly to the official website download. And the configuration tutorial is a lot of, I will not do detailed technical literature.

PHP's official website http://www.php.net/? There are Chinese language services, you can even find the latest Chinese PHP manual
PHP download page http://www.php.net/downloads.php

The official website of Apache http://www.apache.org/
Apache download page http://archive.apache.org/dist/httpd/


MySQL as a database software The biggest feature is free, of course, he is also very efficient, and PHP similar features
MySQL official website http://www.mysql.com/

After all the programs have been installed, start configuring.:

First Configure Apache2
Open the httpd.conf configuration file under the Apache2conf folder
To the last join
LoadFile c:/php/php5ts.dll//load Php5ts.dll, either Apache or IIS must have been the link library
LoadModule php5_module c:/php/php5apache2.dll//load PHP5 Apache module
AddType application/x-httpd-php. php
"' Www.111cn.net
Find DocumentRoot, followed by "C:/apache2/htdocs" may vary depending on the installation path,
is the Web page directory location, can be changed to their own needs, note that the slash "/" is not a backslash "", after all, this is under Linux transplanted
Look for DirectoryIndex, followed by index.html Index.html.var
This is the default first name, to add index.php index.htm

Then configure the PHP
Rename the php.ini-recommended under the C:php folder and change it to php.ini
PHP.ini: For safety and efficiency reasons, it is recommended to use php.ini-recommended as the blueprint for php.ini instead of using Php.ini-dist. At the same time, the php.ini lookup path is no longer limited to the%systemroot% of the PHP4 era, PHP5 the following path to find php.ini:

     * Phpinidir (Apache 2 module only)
     * Registry key value: Hkey_local_ Machinesoftwarephpinifilepath
     * environment variable:%phprc%
     * PHP5 directory (for CLI), or the Web server directory (for
       SAPI modules)
     * Windows directory ( C:windows or C:winnt)
in these five scenarios, it is best to use Phpinidir when cooperating with Apache2, followed by the use of%phprc% environment variables, and on NTFS, remember to open php.ini Read permissions to the server.
Open php.ini, look for Extension_dir later to "C:/php/ext", look at that folder and see what it is.
Find Windows Extensions, there's a row below; extension=php_* **.dll
start to semicolon, remove is support component
at least
         Extension=php_gd2.dll
         Extension=php_mbstring.dll
          Extension=php_mysql.dll
Before the semicolon removed
PHP5 started by default does not support MySQL, so we have to add support for him, in addition to EXTENSION=PHP_ Mysql.dll away from the semicolon
There is a libmysql.dll file in the PHP directory, copy it to the System32 folder of the system, copy php.ini to the Windows directory

Reboot the machine. OK, it's written in a world that everyone knows. Hello Word



? PHP
Echo   '' Hello world! '' ;
?>

Did you see that? See the OK, do not see. There's no way, check each step again.

.. No way, lazy ah.



Related Article

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.