Configure the latest PHP plus MySQL server

Source: Internet
Author: User
Keywords Configure the latest PHP plus MySQL server
Tags mysql functions

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 consulted a lot of official documents to solve a lot of weird problems.

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

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

MYSQL 5.0 for WINDOWS
PHP 5.0 for WINDOWS
PHPMYADMIN
WINDOWS SERVER 2003

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

Install MYSQL first. I thought the new version of the installation interface should be a bit loud.
But still only see old-fashioned dolphins. In addition to the installation time is longer than 4.0. Of course, because 5:4 is much larger.

It is recommended to install on a separate NTFS partition. For example, my server's F-drive. Server Software only.
Path is: F:\MYSQL\

Then enter F:\MYSQL\BIN\ Mouse two point Winmysqladmin.exe
The first run will prompt you for the superuser and password. Enter root password root
Watch out. If it is an external server please set Super complex. Like Wjwsfjn29szjwh~mysql.
My name is Weischufen. This year, 29-year-old unmarried.

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

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

The following installation of PHP 5.0 is actually nothing to install. Unzip the file. Recommended to put
Path is: F:\PHP\

This is where the key steps should go.
First copy the PHP directory php.ini-dist 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

If it is WINDOWS 2000, that is: C:\WINNT\
If it is win9x/2003 is: C:\Windows\

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

COPY F:\php\dlls\*.* C:\Windows\System32\

If it is WINDOWS 2000, that is: C:\WINNT\System32\
If it is win9x/2003 is: C:\Windows\System32\

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

COPY F:\PHP\php4ts.dll C:\Windows\System32\

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

Copy work is done here. Modify the C:\Windows\Php.ini file below.

Please note that revision of version 5.0 is not identical to 4.0. Note the following.

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

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

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 is 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 would what to load when PHP
Starts, noting that several extensions is already built
Into the Windows release, see the sections 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's 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 is 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 should is moved to
Drive:\usr\mibs (drive being, where PHP is installed.)

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 previous;

That

; 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 to change the location as above. Otherwise PHP 5.0 will not work. The following tips are available.

Security alert! The PHP CGI cannot be accessed directly.

Relevant official technical information:

! note!: Since 4.1.2, the php.ini setting cgi.force_redirect defaults to ' 1 '
Which effectively prevents the CGI from working within IIS. 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 that the php.ini file in the
Right place (%systemroot%\php.ini).

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

Find the content in the [MySQL] field. Modify the following.

Mysql.default_port = 3306
This is the port for MySQL.

Mysql.default_host = localhost
This is the local host.

Mysql.default_user = root
Here is the user

Mysql.default_password = Wjwsfjn29szjwh~mysql
Here's the code.

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

Find the Extension=php_mysql.dll string. Remove the front; No.

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 the PHPMYADMIN work properly. Prompt:

Cannot load MySQL extension, please check PHP Configuration
Unable to load MySQL extension, please 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 extension 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 a friend with a configuration base should be completely understandable.
I also encountered a lot of problems in the actual configuration. Finally, patience. The official documents were resolved.

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