Configure the latest PHP and MYSQL Server

Source: Internet
Author: User
Tags mysql functions

The latest PHP 5.0 + MYSQL 5.0 + WIN2003.
I personally think it is necessary to write a tutorial because many aspects are different from those of the old version.
To be honest, I also read many official documents to solve many strange problems.

======================================

You can download related software from WWW. SKYCN. NET.

MYSQL 5.0 FOR WINDOWS
PHP 5.0 FOR WINDOWS
PHPMYADMIN
Windows server 2003

======================================

First install MYSQL. I thought the installation interface of the new version should be fancy.
But I still only see the old Earth dolphins. Apart from the installation time being longer than 4.0. Of course, because 5.0 is much larger than 4.0.

We recommend that you install it on an independent NTFS partition. For example, you can only store the software on the F disk of my server.
Path: F: \ MYSQL \

Then enter F: \ MYSQL \ BIN \ double-click winmysqladmin.exe
The first running will prompt you to enter the superuser and password. Then enter the root password.
NOTE: If it is an external server, set it to super complex. For example, Wjwsfjn29szjwh ~ Mysql
My name is Wei Shufen. I am 29 years old and unmarried.

Here, MYSQL installation is complete. If you do not understand it, please refer to the articles of deep space students.

======================================

In the following example, PHP 5.0 is installed without installation. Unzip the file. It is recommended
Path: F: \ PHP \

The key steps should be taken here.
First, copy the PHP. ini-dist in the Php Directory to C: \ Windows \ and change the file name to Php. ini.

Copy f: \ PHP \ Php. ini-dist C: \ Windows
Ren Php. ini-dist Php. ini

For WINDOWS 2000, C: \ WINNT \
If it is WIN9X/2003, it is C: \ Windows \

Copy all the files in the DLLS directory under the PHP Directory to the SYSTEM32 directory.

Copy f: \ PHP \ dlls \ *. * C: \ Windows \ System32 \

For WINDOWS 2000, C: \ WINNT \ System32 \
If it is WIN9X/2003, C: \ Windows \ System32 \

Continue. Copy the php4ts. dll file in the PHP Directory to the System32 directory.

Copy f: \ PHP \ php4ts. dll C: \ Windows \ System32 \

======================================

The copy operation is complete here. Modify the C: \ Windows \ Php. ini file below.

Note: Version 5.0 and Version 4.0 are not exactly the same. Note the following.

Search for the extension_dir string. modify it to the extensions path in your PHP Directory.

; Directory in which the loadable extensions (modules) reside.
Extension_dir = F: \ PHP \ extensions

Official Technical materials:

Edit your php. ini file:

You will need to change the 'extension _ dir' setting
Point to your php-install-dir, or where you have placed
Your 'php _ *. dll 'files. ex: c: \ php

If you are using OmniHTTPd, do not follow the next step.
Set the 'doc _ root' to point to your webservers
Document_root. ex: c: \ apache \ htdocs or c: \ webroot

Choose which extensions you wowould like to load when PHP
Starts, noting that several extensions are already built
Into the Windows release, see the section about
Windows extensions for details of the built-in extensions.
You can uncomment the: 'extension = php _ *. dll 'lines
In php. ini to load these extensions.

Note that on a new installation it is advisable to first get
PHP working and tested without any extensions before enabling
Them in php. ini.

On PWS and IIS, you can set the browscap. ini
To point to: 'C: \ windows \ system \ inetsrv \ browscap. ini 'on
Windows 9x/Me and 'C: \ winnt \ system32 \ inetsrv \ browscap. ini'
On NT/2000/XP Server.

More information on the capabilities of browscap can be found here:

Www.php.net/manual/en/function.get-browser.php

Note that the mibs directory supplied with the Windows distribution
Contains support files for SNMP. This directory shocould be moved
DRIVE: \ usr \ mibs (DRIVE being the drive where PHP is installed .)

What is different from PHP 4.0 is that you need to modify the following content in the Php. ini file:
Search for the cgi. force_redirect string. The default value is 1. Change it to 0. and cancel the previous; number.

That is:

; Cgi. force_redirect is necessary to provide security running PHP as a CGI under
; Most web servers. Left undefined, PHP turns this on by default. You can
; Turn it off here AT YOUR OWN RISK
; ** You CAN safely turn this off for IIS, in fact, you MUST .**
Cgi. force_redirect = 0

Remember the above modification. Otherwise, PHP 5.0 cannot run. The following prompt will be displayed.

Security Alert! The php cgi cannot be accessed directly.

Official Technical materials:

! NOTE! : Since 4.1.2, the php. ini setting cgi. force_redirect defaults to '1'
Which extends tively prevents the cgi from working within IIS. You need to set
Up at least a minimal php. ini file with the following directive:

Cgi. force_redirect = 0

If it doesn't work immidiately, make sure you have the php. ini file in
Right place (% SYSTEMROOT % \ php. ini ).

Next, modify the settings of MYSQL 5.0 in the Php. ini file.

Find the content in the [MySQL] field. Modify as follows.

Mysql. default_port = 3306
// Here is the MYSQL port.

Mysql. default_host = localhost
// Here is the local host.

Mysql. default_user = root
// Here is the user

Mysql. default_password = Wjwsfjn29szjwh ~ Mysql
// Here is the password

After modification, You can associate Php with MYSQL.
Finally, start PHP to support the MYSQL module.

Search for the extension = php_mysql.dll string. Delete the previous string; No.

Extension = php_mysql.dll

Please note. If you do not start PHP to support the MYSQL module, PHPMYADMIN will not work properly. The following prompt will be displayed:

Cannot load MySQL extension, please check PHP Configuration
Unable to mount MySQL extension. Please check the PHP configuration.

Official Technical materials:

To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension ".
This extension may be part of the PHP distribution (compiled-in), otherwise it needs to be loaded dynamically.
Its name is probably mysql. so or php_mysql.dll. phpMyAdmin tried to load the extension but failed.

======================================

There should be no major problems here. If you have a basic configuration, you can fully understand it.
I also encountered many problems during actual configuration. Finally, I patiently found the official documents and solved them.

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.