Apache + PHP + MySQL Configuration

Source: Internet
Author: User

Even two versions of appserv have such problems. For example, PHP does not configure MySQL. In other words, an installation package is much smaller than a separate PHP + MySQL + Apache package, which is truly unreliable.

I can only unload his manual configuration.

PHP: http://windows.php.net/download/

MySQL: http://dev.mysql.com/downloads/

Apache: http://httpd.apache.org/download.cgi/

Several of my versions below are: PHP: php-5.2.14-Win32.zip; MYSQL: mysql-5.5.8-win32.msi; Apache: httpd-2.2.17-win32-x86-openssl-0.9.8o.msi;

For PHP, Zip is actually more reliable than MSI. Check whether php5apache2_2.dll, libmysql. dll, and ext contain php_mysql.dll. There are also a lot of packages missing on the Internet.

 

Install Apache first, and then decompress PHP.

Modify the php. ini file and remove the semicolon:

Extension_dir = "C:/PHP/EXT" Pay attention to the slash direction.

Extension = php_curl.dll
Extension = php_gd2.dll
Extension = php_mbstring.dll
Extension = php_mysql.dll
Extension = php_pdo_mysql.dll
Extension = php_pdo_odbc.dll
Extension = php_xmlrpc.dll

 

Session Configuration

Session. save_path = "D:/phpsessiontmp"

Time Configuration

Date. timezone = Asia/Shanghai

 

Check other configurations online.

Configure Apache to support PHP and modify the httpd. conf file.

Under # loadmodule vhost_alias_module modules/mod_vhost_alias.so, add

Loadmodule php5_module "C:/PHP/php5apache2_2.dll"
Phpinidir "C:/PHP"
Addtype application/X-httpd-PHP. php. html. htm

Modify

DocumentRoot "D:/phpweb"

<Directory "D:/phpweb">

Directoryindex index.
PHP index.
HTML index.htm (index. php helps PHP run in front)

 

Finally install MySQL

I installed it in win7, and it always jumps the Administrator permission. After the settings, the start service always fails. In this case, select Custom during installation and do not install it on the system disk.

Select developer | Server machine-> multifunctional DB-> demo-support-> select all-> manually select utf8 as the character set-> Add it to startup (it is best to do this) during installation ).

 

The new webroot takes effect after the restart.

Create a file

<? PHP

Phpinfo ();

?>

Test.

(If yes, <? ?> In the short mode, you also need to set the corresponding entries in PHP. INI)

Check whether there are special MySQL projects.

Unfortunately, according to this setting, I have not.

So I copied the set PHP. ini to C:/windows, and put libmysql. dll and php_mysql.dll (EXT) under C:/Windows/system32. Restart the machine, and MySQL items finally appeared. This setting is complete.

 

In addition, you need to install Zend software. Note that version 3.3.3 only supports PHP 5.2. I'm referring to http://www.leapsoul.cn /? P = 786.

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.