How to configure Apache+mysql+php+phpmyadmin under Windows _php Tutorial

Source: Internet
Author: User
Tags mysql tutorial sha1 vc9
Apache server There is no place to say, try to download the latest on the official website.

There is a place to note: The PHP tutorial is loaded as a module into the Apache container, which is when you configure Apache to load the PHP module, pay attention to the problem of that path. Specific configuration statements

LoadModule php5_module d:/php/php5apache2.dll means loading PHP in module mode

Phpinidir "d:/php" is the location that indicates the PHP configuration file php.ini

Try not to include spaces in this path, such as my path is LoadModule php5_module D:/peogram Files/php/php5apache2.dll This will lead to errors, you need to change the relative path, such as ". /php/php5apache2.dll ", but the relative path must be correct, this depends on how you install each module, it is recommended to install in the Unified directory, easy to manage.

PHP has to pay attention to this problem is very tangled. Here is the download of PHP

PHP 5.3 (5.3.5) window platform package download

VC9 x86 non thread safe (2011-jan-05 21:37:35)

    • Zip [14.96MB]
      Sha1:2fdd7b2b17d359725d9f297b6a59f17b71a913a6
    • Installer [26.9MB]
      sha1:d7cfd584231e68dc9e87cdff45a6d11fa3b03689
    • Debug Pack [7.94MB]
      sha1:414c30a12a402d3af30b46de4b2e0ca391872982

VC9 x86 thread safe (2011-jan-05 21:31:04)

    • Zip [15.1MB]
      Sha1:7593b0ebba4b43418fd2f3c18eac83d698da46d6
    • Installer [27.02MB]
      sha1:db510126e3f9b580c38fb6dd8895e5a67403a223
    • Debug Pack [8.29MB]
      sha1:339f6092e4c4fee9c5a6a0f6d0f8359fbfbda60b

VC6 x86 non thread safe (2011-jan-06 19:06:20)

    • Zip [13.13MB]
      sha1:b11a6a1597219d7ce10bc315cde411f37346383e
    • Installer [23.84MB]
      Sha1:4249683e8b88ceed32bf12c0b883a51bb10e43d9
    • Debug Pack [4.86MB]
      Sha1:9fb328a8c798bfe797e1a7f683571dc3812f3aa8

VC6 x86 thread safe (2011-jan-06 18:56:08)

  • Zip [13.26MB]
    sha1:8658b5c58a9893d46290beb70aa2335226e2c523
  • Installer [23.95MB]
    sha1:05fe4fb8f03a2f9fa71d47aad60e8c9becd6bb7d
  • Debug Pack [5.03MB]
    SHA1:9D96D42B14F516EE5935404161836EC28B572BBF
  • There are four kinds for you to choose. But be sure to choose the right.
  • What is VC6?
    VC6 is legacy Visual Studio 6 compiler, which is compiled with this compiler.
    What is VC9?
    VC9 is the Visual Studio compiler, which is compiled with Microsoft's vs Editor.

    So how do we choose which version of PHP to download?
    If you are using apache+php under Windows, please select the VC6 version;
    If you are using iis+php under Windows, please select the VC9 version;

    What is the non thread safe?
    Non thread safe is non-threaded;
    What is thread safe?
    Non thread safe;
    The official does not recommend that you apply the non thread safe to the production environment, so we chose the thread safe version of PHP to use

    I chose VC6 x86 thread safe (2011-jan-06 18:56:08) because I was the Apache server built under Windows.

    PHP Direct Decompression Even if it is installed. Follow the tutorial step-by-step to go.

    The problems that often arise are:

    Unable to load dynamic library ' D:/server/php/ext/php_exif.dll '
    Unable to load dynamic library ' D:/server/php/ext/php_fdf.dll '
    Unable to load dynamic library ' D:/server/php/ext/php_ifx.dll '

    ......

    A similar error, the solution is

    1. Modify the Extension_dir configuration of the php.ini file to your correct php/ext/, as this folder contains all your expansion modules, including the MySQL tutorial.

    2. Copy the DLL files under your PHP installation directory, the DLL files under the Php/ext file to Widows/0system32, or you modify the system environment variable path, plus; d:/www/php;d:/www/php/ext; This is my installation directory. This implementation of the effect with the copy to System32 below is the same, the specific reason I do not know why, I only know the program to run the first to System32 below to find the appropriate library file to load, if found to stop, if not found on the path below to find, if not found, Go to the configuration file Extesion_dir below to find, and then can not find the error, so if you have previously installed on the computer PHP4, please first system32 the following corresponding DLL file removed.

    3. These loaded modules, whether loaded or deleted, are configured in the php.ini

    similar to Extension=php_bz2.dll

    Extension=php_curl.dll

    Extension=php_fileinfo.dll

    Extension=php_gd2.dll

    Extension=php_gettext.dll

    ; Extension=php_gmp.dll

    Extension=php_intl.dll

    Must pay attention please do not put all the modules are started, although the system resource waste is not much, but the default PHP5 installation package does not necessarily exist in the corresponding DLL of this module, so you should follow the system error prompts to disable the corresponding module, the deactivation method, and how you open the module is the opposite.

    4. There is a dependency between the modules, such as I want to open extension=php_exif.dll This module, then you must first open the Extension=php_mbstring.dll module, which may be the reason you add the module is not successful.


    Installation of MySQL is simple, just follow the prompts to install the line, do not need to be configured with the server between the various modules

    As the latest version of phpMyAdmin has been updated to 2.11.5.1, many of the online distribution methods are old versions of the previous version, has not adapted to the new version of the configuration requirements; so Flymorn also phpmyadmin2.11.5.1 configuration steps are listed below; In order to switch and debug PHP Convenient, I use the Windows system, local debugging.

    1. Download the phpMyAdmin installation package first:
    To the foreign official website http://www.phpmyadmin.net, click the "Downloads" link on the navigation bar to enter the download page, select "All-languages.zip" version to download to the local, unzip To place the extracted files in the phpMyAdmin folder (customizable folder name) under the system-specified virtual root directory, such as Flymorn's local storage location is d:wwwphpmyadmin.

    2. Locate the/libraries/config.default.php file in the phpMyAdmin folder (the old version is the config.inc.php file under the root directory) and open it for editing with a support utf-8 encoded WordPad.

    3. Find $cfg [' Pmaabsoluteuri ']
    Modify the URL of the phpmyadmin that you will upload to the space
    such as: $cfg [' pmaabsoluteuri '] = ' http://www.piaoyi.org/phpmyadmin/';
    Here because I was debugging locally, I changed to $cfg[' pmaabsoluteuri '] = ' http://localhost/phpmyadmin/';
    Note: Do not miss the last backslash/and the beginning of HTTP.

    4. Find $cfg [' Servers '] [$i] [' host '] = ' localhost '; (usually with default, with exception, without modification)

    5, find $cfg [' Servers '] [$i] [' auth_type '] = ' config ';
    Debug in your own machine with config; if the space on the network with cookies, here we have already added the URL in the previous, the change into a cookie.
    My personal advice: whether it is local or on the network, it is recommended to set cookies, security first.
    Also, when the value of Auth_type is set to a cookie, there is another place to make the appropriate changes:
    $cfg [' blowfish_secret '] = ';
    Change to: $cfg [' blowfish_secret '] = ' www.piaoyi.org ';
    The www.piaoyi.org here itself is freely defined, not exceeding 46 characters. If this place is left blank, the 2nd error mentioned above will appear: "The configuration file now requires a top secret phrase password (blowfish_secret)".

    6. Find $cfg [' Servers '] [$i] [' user '] = ' root '; MySQL User (username, your own machine with root; in the Internet generally for your FTP user name, virtual host provider to tell you; do not modify)

    7, find $cfg [' Servers '] [$i] [' password '] = ' 123456 '; MySQL password (123456 modified to connect your MySQL database tutorial user password)

    8, find $cfg [' defaultlang '] = ' zh '; (Here is the choice of language, en for Simplified Chinese meaning) and $cfg [' defaultcharset '] = ' gb2312 '; (Modify the default encoding to GB)

    Here, phpMyAdmin has been configured to complete OK; You can turn on http://localhost/phpmyadmin/to access the easy and fast graphical management software phpMyAdmin. For the other options in the configuration file that are not mentioned in this article, you can take care of it and do not need to change it. about how to operate phpMyAdmin is not in the scope of this article, but the graphical interface, is easy to understand, a little look will be used (reference).

    Let's talk about some of the problems that Flymorn encountered during the installation of configuration phpMyAdmin.

    first question: "Unable to load the mcrypt extension, check your PHP configuration."

    1, the MySQL database is not installed correctly, in the system service MySQL related services did not start.
    2, in the system system32 (C:WINDOWSSYSTEM32) directory is missing Libmcrypt.dll file, the solution is to find the PHP directory Libmcrypt.dll, and copy Libmcrypt.dll to C: Windowssystem32 directory, and then restart the Web service.
    3, in the PHP directory of the php.ini file, there is no "; Extension=php_mcrypt.dll" in the previous ";" Remove, so can not use the corresponding function, the solution is to open the php.ini file, find; Extension=php_mcrypt.dll change to Extension=php_mcrypt.dll//Remove the front; make it effective
    4, the MySQL directory does not have read permissions, the correct directory permissions are as follows:
    Administrator Full Control
    System Full Control
    User Read plus Run
    All other user rights are removed (also retained, but not highly secure, recommended for deletion), and then restart the MySQL service and Web service (it is recommended to restart the server after modifying this item).
    5, the above methods are not, then use this method: Desktop > My Computer > Right-click Properties > Advanced > Environment Variables > System Variables > New
    Name: Phpdir
    Value: c:php (what directory is your PHP in?)
    (Reference Source: Address)

    second question: "Unable to load MySQL extension, please check PHP configuration"

    Copy the Libmysql.dll in the PHP directory to: c:windowssystem32, and then restart Apache.

    The third question: "The configuration file now requires a top secret phrase password (blowfish_secret)"

    Make sure the correct settings are in the config.default.php file:
    $cfg [' Servers '] [$i] [' Auth_type ']= ' cookies ';
    While
    $cfg [' blowfish_secret '] = ' www.piaoyi.org '; (This value is written casually, just can't leave blank)

    In fact, I met the problem is really depressed, if according to the configuration method I mentioned above, should not prompt this error. After 2 hours of continuous modification of the config.default.php configuration file, I always prompt this error, almost reached the edge of the crash.

    Then there is an epiphany, suddenly found: I changed the Auth_type Authentication mode to HTTP, changed to config, the open page always appears this error, that is, changed the authentication mode, and did not work for phpMyAdmin, Is it the other configuration file that determines the phpMyAdmin in effect?

    Immediately came to phpMyAdmin root directory, impressively found that the root directory has a config.sample.inc.php file exists at the same time, there is a file config.inc.php also exist!! And this is the previous old version of the configuration file, the original is this file pounded ghosts. Delete config.inc.php immediately, then go to debug page, the error disappears! Problem solving.

    It appears that the config.inc.php configuration file under the phpMyAdmin root directory has a higher priority than/libraries/ config.default.php configuration file is high, the system is to call the root directory in the configuration file, and then the Libraries folder in the configuration file, Ai, this problem, tossing so long, alas. It's all settled, sigh.

    question Fourth: "#2003-the server is not responding."

    This problem is mostly the MySQL database does not start, it is recommended to directly in: Control Panel-management tools-service inside the MySQL boot. You can see if there is a process such as "Mysqld-nt.exe" in the Task Manager, and if so, it means that MySQL is already started.

    question fifth: "No PHP extension settings mbstring found."

    Modify the php.ini file under C:windows, find it, Extension=php_mbstring.dll, save php.ini, restart Apache.

http://www.bkjia.com/PHPjc/629850.html www.bkjia.com true http://www.bkjia.com/PHPjc/629850.html techarticle Apache Server There is no place to say, try to download the latest on the official website. There is a place to note: The PHP tutorial is loaded in the form of a module into the Apache container, that is ...

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