Windows Apache + MySQL configuration PHP environment note

Source: Internet
Author: User

This note corresponds to the information is too old, after all, PHP is 5.6, and I mentioned here is the 5.3.10 version. Information is also found on the internet, because do not understand PHP, so this old information is still left, will use similar in the future is not necessarily?

Talk less, take notes:

PHP Environment Configuration NoteDate: 2014.8.31
This note is also a reference to the Netizen's blog to do: http://www.cnblogs.com/pharen/archive/2012/02/06/2340628.html
at present, I am not familiar with PHP, the environment configuration is also not understand, so the use of the tutorial provided by users to do. first download the necessary things, the Netizen provides is Apache + PHP + MySQL, so first of these three have to download good. Some of the necessary resources are stored on the network to be used in the future:Link: Point me password: 9iukIt contains:Mysql-5.5.20-winx64.msiPhp-5.3.10-win32-vc9-x86.zip (already compiled, VC, I refer to the blog provided by the link has a site such as: http://windows.php.net, as if it is also compiled, but also the corresponding latest version of PHP)Httpd-2.2.22-win32-x86-openssl-0.9.8t.msi (Installation package, as if directly on the official website to download, you also need to compile it, this is really not understand, this is Apache)Dreamweaver_12_ls3.exe + adobe-cs6-amtlib.zip
Once you have downloaded the above resources, you are ready to install:The first step is to install Apache: Install Apache, there is no special requirements on the installation. Here's a question for you to borrow from the author's diagram:It's the author of the blog I'm referring to. Three information filled in here (networkdomain/servername/administrators ...) Specifically, what do you do with it? do not understand. The author says it's okay. after installing Apache, in browser detection, enter: http://localhost, if it works, then the software installation is successful.
Second step to install PHP: The author directly said decompression Xx.zip can be. I now visit the author provided URL links are not open, so did not download to the author said the Phpxxx.zip package, but directly in the PHP official website to download the latest package, but the source code is not compiled, so there is no author said after some things, and then I downloaded the Internet users to provide resources.
The third step to install MySQL: This is also downloaded on the Internet installation package, the installation process is not much of a requirement, basically is next-next go down. to borrow several pictures of the author:The author specifically mentioned here, the character format to choose UTF8, this can only follow the author mentioned walk, because I do not know why. and then here to mention a little bit of my installation process encountered a problem: the first installation, I directly next-next installation, installed in the C drive, and then a think of c disk space is not much, you have to change a place to be good. Uninstall and reinstall, encountered some problems:
However, after uninstalling the installation is experiencing problems:1, there is no, roughly means that the MySQL service is not turned off, so you need to stop the MySQL service in the task manager before the next step of installation;2. After solving the previous problem, borrow the author's diagram againfill in the password here should be entered into the Execute, this time again error, a string of English, the general meaning is: You uninstall a MySQL, uninstall MySQL did not remove the password information in the (meaning that no uninstall clean it), need to skip first, And then reconfigure MySQL once again. At that time I did not seriously read this string of English, has been retry, the result is not dead or alive. Then follow the instructions in English to skip, and then find the MySQL installation directory-bin directory-Find MySQLInstanceConfig.exe, run this, follow the prompts to enter the password information again, you can. install software that's the way it is, mostly MySQL here I got a bit of a card.
the next step is to do some configuration information:This information, there is no special attention, anyway, I have the cheek to write it down. first Configure Apache related information:find the Apache installation directory, the httpd.conf file in the Conf directory is the configuration file, you need to make some changes here to support PHP:1, let Apache can parse PHP files, modify/add:found #LoadModule vhost_alias_module modules/mod_vhost_alias.so (ctrl+f)after this is added:LoadModule php5_module "xx/php (directory where PHP is located)/php5apache2_2.dll"Phpinidir "Here is the directory where PHP is located"addtype application/x-httpd-php. php. html. htm (this should be supported by adding file formats)in the official website to download the PHP source code is not our first line to add the. dll file, need to compile the only can (this version corresponds to need VC6, but I mentioned in the site:http://windows.php.netdownload to the latest, there is no similar. dll file, do not know why. 2. Find:DirectoryIndex index.htmlmodified to:directoryindex index.php index.html3, modify the Apache Site directory (that is, the meaning of the working directory?) Throw PHP files into this directory, then Balabala)Find:documentroot "xxx (there will be a default directory)"modified to:documentroot "xxx (define yourself, the PHP file will be thrown here)"Find again:<directory "xxx (here is the default)"instead:<directory "xxx (that is the working directory changed above)"
and then you change the configuration information for PHP .in the directory where PHP is located, there is a php.ini-development file that needs to be done on this file, so copy the backup copies first, and then modify the original file to: PHP.inistart the foot:1. Set the expansion package specific directory:Find:; On Windows:; extension_dir = "ext"modified to:; On Windows:Extension_dir = "xx/php (in the same directory)/ext" (Semicolon in PHP; Is it a comment?) The semicolon is removed when the change is made here)2, open the corresponding library support:; Extension=php_curl.dll; Extension=php_gd2.dll; Extension=php_mbstring.dll; Extension=php_mysql.dll; Extension=php_xmlrpc.dllThe modification is to remove the preceding semicolon:Extension=php_curl.dllExtension=php_gd2.dllExtension=php_mbstring.dllExtension=php_mysql.dllExtension=php_xmlrpc.dll3. Set the time zone:Find:;d Ata.timezone =modified to:Data.timezone = Asia/shanghai (to remove the semicolon)
at this point, the configuration is tested. The author said restart Apache, OK, I said I did not find where to start Apache, so I do not know how to restart, online check is to restart the service. After doing so, did not reach the author mentioned the effect, did not show the PHP information, and then when I changed a browser but succeeded. This may be the time I am in the configuration, is looking at the data, the browser is not turned off, and when I close the current browser and try again when it is valid, so encountered similar problems can be considered to restart the browser.

Windows Apache + MySQL configuration PHP environment note

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.