This example is under Wiondws XP
IIS5.1
php5.2.1 (Zip)
MySQL5.0.37
phpmyadmin2.10.0.2
ZendOptimizer-3.2.6
Installation and configuration of
installation of IIS
1 Install the Windows XP SP2 system installation CD in the optical drive
2 in Control Panel > Add/Remove > Add/Remove Windows Components > Windows Components Wizard Select Internet Information Services (IIS)
3 Click Next to File replication until the installation is complete
4 Complete the IIS installation
5 Open the browser, enter http://localhost The following interface indicates that the installation was successful
installation of MySQL
1-click MySQL installation package
2 The default is typical, if you want to modify the installation path can also choose Custom.
Note: Install MySQL in the path, can not contain Chinese!
3 Click Intall Start Installation
4 Skip Registration
5 Do you want to configure MySQL now? You can also configure it later in the Configuration Wizard of the Start menu.
Here is the configuration now
6 Select detailed Configuration (Details set), click Next to continue
7 The option below is to choose what type of MySQL is applied to, the first is to develop Server,
will only use as little memory as possible, the second is a normal Web server, will use a medium amount of memory,
The last one is that this server only runs the MySQL database, will occupy all the memory.
Users can choose the options according to their own needs. Only the development server is selected here, click Next to continue
8 The following is the choice of database uses, the first is multi-purpose use,
The database is optimized to be a good InnoDB (transaction) storage type and an efficient MyISAM (non transactional) storage type.
The second is for transaction type only, the best optimization innodb, but also support MyISAM, only MyISAM support Full-text indexing
The last one is a simple network development, suitable for simple applications, only myisam types that do not support transactions are supported.
Generally choose the first multi-functional.
9 Below is the choice of INNODDB data storage location, generally default well, do not need to change
(If you want to modify the data save path, you can also modify the value of the My.ini datadir after installation)
10 The following is the choice of MySQL allowed maximum number of connections, the first is the maximum number of 20 connections concurrency,
The second is the maximum of 500 concurrent connections, the last is a custom, you can choose according to your own needs.
Here Select the first
11 below is whether to run the network link. Select the check box here. The port on which the database listens, the default is 3306,
If you change to another port, you must remember the modified port when you connect to the database, otherwise you cannot connect to the MySQL database.
More trouble, here do not make changes, with mysq default port: 3306
12 This step sets the default encoding for MySQL, which defaults to latin1 and standard encoding. The second is UTF8, and the third is manual setting.
The encoding is introduced in version 4.1. If you want to use the original database data, it is best to determine what the original database is encoded, if the code set here
and the original database data encoding inconsistent, in the use of the time may appear garbled. Latin1 Standard encoding is recommended
Of course, if we need to, we can also modify its encoding (not recommended).
13 This step is whether to set MySQL as Windows Services, the general choice to set up a service,
This allows you to start and close the MySQL database in the service. Recommended: The following check box is also checked,
In this way, in cmd mode, you do not have to execute commands under the MySQL Bin directory. Consulting at the command line can execute file
14 This step is to set MySQL's superuser password, this super user is very important,
With all the permissions on MySQL, set and keep in mind the superuser password,
A check box below indicates the creation of an anonymous account, which makes the database system unsafe.
If there is such a demand, please tick.
15 Click Execute to install
16 Click Finish finishes installation
17 We can start using MySQL, open the Start menu All Programs MySQL Command line Client, enter the password
This interface appears to indicate that MySQL is installed.
problems that may arise:
If you appear in step 15th, the following figure prompts
It's because you've been in MySQL before. Some of the configuration files were also retained while uninstalling.
Click Retry to see if you can pass. Otherwise click Cancel to exit. Then click on the Start menu of MySQL Server Instance Config Wizard
Re-configuring MySQL
Repeat the previous action. The 14th step will appear as follows
There are three places to enter the password, you originally installed MySQL.
You enter the original root password in the first text box, and then enter the new password for root in the two text boxes below.
If it's still not working, then reload MySQL once.
Reload Note: It is best to delete all the original files, if necessary, you can clear the registry,
If you don't have other MySQL-related programs on your machine, you must remember not to keep the original My.ini files.
Also, delete the file under the original installation path and delete the Ibdata1 file under the data directory.
More Articles PHP enthusiasts stationhttp://www.phpfans.net
installation of PHP
Because PHP is a zip file (not install version), the installation is simpler
Unzip the line. Rename the extracted Php-5.2.1-win32 to PHP5. and copy it to the C disk directory. That is, the installation path is C:\PHP5
1 Locate the php.ini.recommended (or php.ini-dist) file in the PHP directory and rename it to PHP.ini
and copy it to the Windows directory of the system disk (for example, C:\Windows).
2 then copy the Php5ts.dll,libmysql.dll in the PHP directory to the directory C:\Windows\System32.
3 Copy the Php_gd2.dll,php_mysql.dll,php_mbstring.dll file under the Php5\ext directory to C:\Windows\System32
If you do not load Php_gd2.dll PHP will not be able to process the image. Php_mysql.dll PHP will not support MySQL function library without loading
Php_mbstring.dll supports wide characters when using phpMyAdmin later
More Articles PHP enthusiasts stationhttp://www.phpfans.net
installation of Zendoptimizer
Zend Optimizer uses optimized code to improve the execution speed of PHP applications. Executing PHP programs that use Zend Optimizer is 40% to 100% faster than you would not use. And some files that have been encrypted with Zend safeguard must be installed Zend Optimizer to run.
Note: Zend Optimizer installation does not affect the normal operation of PHP, if you feel trouble, this step can be omitted.
1-click Installation Zend Optimizer
2 Accept the agreement, click Next
3 Selected Installation path
4 we're using IIS5.1, so choose IIS here.
5 designates the position of the php.ini. We're under C:\WINDOWS\.
6 Select the IIS default installation path. Ours is C:\Inetpub\.
7-click Install for installation
8 Click Yes. Setup automates configuration and server restart.
9 Click Finish finishes installation
We'll configure everything after the installation is complete.
Configure PHP and associate MySQL
Open C:\windows\php.ini File
The following items need to be answered to see
1 Setting the extension path
Find Extension_dir there's a line
Extension_dir = "./"
Change this row to
Extension_dir = "C:\php5\ext"
Where C:\PHP5 is the path where you install PHP. Incorrect path will not load DLL
(Note: some PHP versions are; extension_dir = "./" To remove the preceding semicolon)
2 Find
; Extension=php_mbstring.dll
; Extension=php_gd2.dll
; extension=php_mysql.dl
Remove the semicolon before the top 3 items so that IIS can load these DLLs when it starts
Of course, we've also copied these DLLs into the system32 before. (Everyone notices how to load some DLLs into the installation process.)
Later to load some DLLs, such as Php_mysqli.dll, also know how to load the
3 Set Session Save path
Find Session.save_path there's a line
; Session.save_path = "N;/path"
After this row, add a line (Note that you are joining a line, not adding to the back)
Session.save_path = "C:\WINDOWS\Temp"
Save to your temp directory, this can be saved to the Windows Temp directory under Temp
4 There are more noteworthy is short_open_tag. Some PHP versions are off by default.
This means that PHP cannot use short tags if you must use
Because the short mark is easy to use, and many programs also use a short mark to write, such as Discuz
If you do not change the Short_open_tag to on will appear the symptom will be difficult to judge is the above reason, here proposes modifies
Find
Short_open_tag = Off
To
Short_open_tag = On
5 whether to display errors Display_errors
For security reasons, some versions of display_errors also default to OFF.
That is, when debugging, if the PHP code is wrong, only a blank page appears. The cause of the error and the number of rows are not displayed.
This will be very inconvenient to debug, the proposal according to their own needs to modify
Find
Display_errors = off (note not;-display_errors = off [security])
Change into
Display_errors = On
6 Show notice Warning tips
The fifth step opens the error prompt, but the error report is also controlled by error_reporting.
PHP5 The default shutdown notice warning prompt, if it is in the local debugging, it is recommended to open notice warning prompt.
Find
error_reporting = E_all & ~e_notice
Change into
error_reporting = E_all
Another hint, in the program can also through the error_reporting () control error report output, specific how to use everyone to refer to the manual.
7 register_globals
It defaults to off for security reasons
When Register_globals=off, the next program should be received with $_post[' user_name ' and $_post[' User_pass ')
When Register_globals=on, the next program can accept values directly using $user_name and $user_pass.
For more detailed instructions please refer to
http://www.phpfans.net/bbs/archiver/?tid-234.htm
Recommend to modify according to your own needs
8 PHP5 jet lag problem
Time difference Eight hours
Why, then? The PHP5 series has new time zone settings, the default is GMT, and China's East 8 area is exactly 8 hours
Find Date.timezone there's a line
;d Ate.timezone =
Remove, change
Date.timezone = PRC
of which Prc:people ' s Republic of China,
For more detailed solutions please refer to this forum's
http://www.phpfans.net/bbs/archiver/?tid-60.html
About the file upload to note the configuration please refer to this forum
http://www.phpfans.net/bbs/viewthread.php?tid=1663&extra=page%3D1
More Articles PHP enthusiasts stationhttp://www.phpfans.net
IIS consolidates PHP
1 Open Control Panel > Management Tools
2 Open Internet Information Services in Administrative Tools
3 The following figure, right-click the Default Web site click Properties
4 Click the ISAPI filter and then tap the Add button, and in the Pop-up Filter Properties dialog box, fill in the
Filter Name: PHP
Executable file: Click to browse to select C:\php5\php5isapi.dll
5 Click OK exit configuration
6 again right click on the default Web site properties. Go to the ISAPI filter. As shown in the diagram, the front state has a green up arrow indicating that the filter is working.
If the red arrow is down or there is no arrow, that indicates a problem with the previous configuration, please confirm the 5th step. No more. Please check the settings again.
7 Click the Home Directory tab. Click Configure again.
8 as shown below, click the Add button
9 in the pop-up Add/Edit Application Extension Mapping dialog box.
Executable file: Click to browse to select C:\php5\php5isapi.dll
Extensible name:. PHP (Don't miss the front.)
10 Click the Document label, click Add button, and in the pop-up Add Default Document dialog box, fill in the index.php
We'll do the test after the configuration is complete.
Create a phpinfo.php file under the site root
<?php
Phpinfo ();
?>
Open in Browser
http://localhost/phpinfo.php
If the following information appears, PHP is already configured
Next Test the PHP and MySQL database association
Create a test.php file in the root directory of the Web site that contains
<?php
$host = "localhost";
$user = "root";
$password = "12345";//12345改成你的mysql密码
$link=mysql_connect($host,$user,$password);
if(!$link) echo ";
else echo ";
mysql_close();
?>
Open http://localhost/test.php in Browser
If the output succeeds, it is done.
More Articles PHP enthusiasts stationhttp://www.phpfans.net
Install phpMyAdmin
Download get phpmyadmin-2.10.0.2-all-languages.zip, unzip it to your site root directory and rename it to phpMyAdmin,
Locate and open the libraries/config.default.php (some versions are config.inc.php or config.defaut.php in the current directory)
Make the following modifications:
1 Find password like the next two lines
$cfg [' Servers '] [$i] [' user '] = ' root ';
$cfg [' Servers '] [$i] [' password '] = ';
Fill in your MySQL password to $cfg[' Servers ' [$i] [' password '] = '; Single quotes Inside
2 Search $cfg [' Pmaabsoluteuri '], set the value in the following single quotation mark to the phpMyAdmin directory path, such as:http://localhost/phpMyAdmin/;
3 Search $cfg [' Defaultlang '], set the value in the following single quotation mark to zh-gb2312;
This is modified according to the code you want (if the database code is not very familiar with the recommendations do not modify)
4 Search $cfg [' Defaultcharset '] and set it to the encoding you want.
Open the browser and enter:http://localhost/phpMyAdmin/, IIS and MySQL are all started,
If the following page appears, the phpMyAdmin installation is complete and you can use the
phpMyAdmin the specific function, please slowly familiar, here no longer repeat.