Mysql php apache configuration

Source: Internet
Author: User

1. Prepare the environment
Vc ++ 2005
2008
2010 Runtime Library

2. wampserver 2.2 or 2.4

3. The web server port occupies 80

Running, enter services. msc, enter the service manager, and view the service
Wampapache Software Service name
Wampmysqld mysql service name


Enter regedit at run to open registry editor

HKEY_LOCAL_MACHINE/SYSTEM/ControlSet001/Services
HKEY_LOCAL_MACHINE/SYSTEM/ControlSet002/Services
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services


Find wampapache
If wampmysqld is deleted and then started, the service will not


Httpd. conf


LoadModule php5_module "c:/wamp/bin/php/php5.4.3/php5apache2_2.dll"
AddType application/x-httpd-php. php
AddType application/x-httpd-php. php3



LoadModule php5_module C:/PHP/php5apache2_2.dll

ScriptAlias/php/"C:/php /"
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
Action application-x-httpd-php "/php/php.exe"

SetEnv phprc c:/php
PHPIniDir "C:/php"

Alias/myphp/"C:/mysite /"
<Directory "C:/mysite/">
Options Indexes MultiViews
AllowOverride None
Order allow, deny
Allow from all
# DirectoryIndex php. php
</Directory>


========================================================== ========================
Install the SDK by yourself
1. Download The apachehttpd-2.2.22-win32-x86-no_ssl.msi installed in the c:/apache directory.
2.download php-5.4.17-win32-vc9-x86.zip and decompress it to the c:/php Directory.
3. Copy the c:/php. ini-development file and change it to php. ini.
4. Open php. ini row 730; extension_dir = "ext" to extension_dir = "C:/php/ext"
Remove the 872 line semicolon, extension = php_gd2.dll
879 881 882 887 891 line cancel semicolon

5. Add the following code to the end of the/apache/conf/httpd. conf file:

LoadModule php5_module C:/PHP/php5apache2_2.dll
/// Modify the phapche version number of php5apache2_2.dll based on your actual situation.

ScriptAlias/php/"C:/php /"
AddType application/x-httpd-php. php
AddType application/x-httpd-php-source. phps
Action application-x-httpd-php "/php/php.exe"

SetEnv phprc c:/php

/// // You must also add ://///////////
1. Choose run & gt; cmd & gt;
2. Click RUN cmd with administrator privileges
3. Enter the bin directory of apache24.
4. httpd-k install.

You also need to copy the dll files in the php Directory and files in the ext directory to the system32 directory in windows on the C drive.
Change php. ini-development to php. ini.
Copy the php. ini file to drive C. E.

////////////////////////////////

6. Restart the apache server software.
C: \ Apache \ bin> httpd-k stop
The Apache2.2 service is stopping.
The Apache2.2 service has stopped.

C: \ Apache \ bin> httpd-k start
Httpd: cocould not reliably determine the server's fully qualified domain name, us
Ing 192.168.1.164 for ServerName

C: \ Apache \ bin> httpd-k restart
Httpd: cocould not reliably determine the server's fully qualified domain name, us
Ing 192.168.1.164 for ServerName

C: \ Apache \ bin>

7. Write the following code for an abc. php file:
<? Php
Phpinfo ();

Save the file to the C: \ Apache \ htdocs directory and directly use http: // localhost/abc. php


PHPIniDir "C:/php"




This article is from the "mysql_php_apache" blog, please be sure to keep this http://johnzxw.blog.51cto.com/4510670/1282147

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.