Configure the latest PHP plus MySQL server

Source: Internet
Author: User
Tags install php iis ini mysql mysql functions net version phpmyadmin
mysql| server through one hours of research and setup. Implemented the latest PHP 5.0 + MYSQL 5.0 + WIN2003.
Personally think it is necessary to write a tutorial out. Because many aspects and the old version of the different.
To be honest, I've also consulted a lot of official documents to solve a lot of weird problems.

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

Related software can be downloaded in WWW.SKYCN.NET.

MYSQL 5.0 for WINDOWS
PHP 5.0 for WINDOWS
phpMyAdmin
WINDOWS SERVER 2003

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

First install MYSQL. Originally thought that the new version of the installation interface should be a bit fancy.
But only old-fashioned dolphins are still seen. In addition to the installation time than 4.0 long. Of course, because 5:4 is much larger.

It is recommended to install on separate NTFS partitions. For example, my server's F disk. Only put server software.
The path is: F:mysql

Then enter the F:mysqlbin mouse double point Winmysqladmin.exe
The first run prompts for Superuser and password. Enter root password root
Pay attention. If it is an external server please set Super complex. Like Wjwsfjn29szjwh~mysql.
My name is Weischufen. I'm 29 years old and still unmarried this year.

Come here. MySQL is installed. If you do not understand, please refer to the relevant articles of the Deep space students.

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

Install PHP 5.0 below in fact, there is no installation does not install. extract files. Recommended to
The path is: f:php

This is where the key steps should go.
First copy the php.ini-dist to c:windows in the PHP directory and modify the file name to PHP.ini

COPY f:phpphp.ini-dist c:windows
Ren php.ini-dist php.ini

If WINDOWS 2000 is: C:winnt
If it's win9x/2003, it's: c:windows.

Then copy all the files in the DLLS directory in the PHP directory to the SYSTEM32 directory.

COPY F:phpdlls*.* C:windowssystem32

If WINDOWS 2000 is: C:winntsystem32
If it's win9x/2003, it's: C:windowssystem32.

Go ahead. Copy the Php4ts.dll file in the PHP directory into the System32 directory.

COPY F:phpphp4ts.dll C:windowssystem32

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

The copy work here is complete. Modify the C:windowsphp.ini file below.

Please note that the revision of. 5.0 is not exactly the same as 4.0. The following should be noted.

Find Extension_dir strings. Modify the path to the extensions in your PHP directory.

; Directory in which the loadable Extensions (modules) reside.
Extension_dir = F:phpextensions

Relevant official technical information:

Edit your php.ini file:

You'll need to change the ' extension_dir ' setting to
Point to your php-install-dir, or where you have placed
Your ' php_*.dll ' files. ex:c:php

If you are are using OMNIHTTPD, do is follow the next step.
Set the ' doc_root ' to point to your webservers
Document_root. Ex:c:apachehtdocs or C:webroot

Choose which extensions you would like to load when PHP
Starts, noting that several extensions are already built
Into the Windows release, and 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 This on a new installation it are advisable to a
PHP working and tested without any extensions before
them in php.ini.

On PWS and IIS, the can set the Browscap.ini
To "to": ' C:windowssysteminetsrvrowscap.ini ' on
Windows 9x/me and ' C:winntsystem32inetsrvrowscap.ini '
On Nt/2000/xp Server.

More information on the capabilities of Browscap can is found here:

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

The MIBs directory supplied with the Windows distribution
Contains support files for SNMP. This directory should is moved to
Drive:usrmibs (DRIVE being the DRIVE where PHP is installed.)

And then, unlike PHP 4.0, you need to modify the following in the php.ini file:
Find the Cgi.force_redirect string. The default value is 1. Modify it to 0. and cancel the preceding number.

That

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

Keep in mind that the changes are in place. Otherwise, PHP 5.0 will not run. The following prompts are available.

Security alert! The PHP CGI cannot be accessed directly.

Relevant official technical information:

! note!: Since 4.1.2 php.ini setting Cgi.force_redirect to ' 1 '
Which effectively prevents the CGI from working within IIS. Need to set
Up in least a minimal php.ini file with the following directive:

Cgi.force_redirect = 0

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

Next, modify the php.ini file's settings for MYSQL 5.0.

Find the contents of the [MySQL] field.

Mysql.default_port = 3306
Here is the MySQL port.

Mysql.default_host = localhost
This is the local host.

Mysql.default_user = root
This is the user

Mysql.default_password = Wjwsfjn29szjwh~mysql
This is the code.

You can make Php associated with MYSQL by modifying it here.
Finally start PHP support for MYSQL module.

Find Extension=php_mysql.dll strings. Remove the front; Resolution

Extension=php_mysql.dll

Please note that if you do not start PHP support for the MYSQL module. You will not be able to make phpmyadmin work properly. Will prompt:

Cannot load MySQL extension, please check PHP Configuration
Unable to load MySQL extensions, check the configuration of PHP.

Relevant official technical information:

To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension".
This is extension may is part of the PHP distribution (compiled-in) and 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 big problem here. If you have a base of configuration, friends should be completely understandable.
I also encountered a lot of problems in the actual configuration. Finally, the patient inquires the official document has been solved.



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.