Install and configure PhP5 mysql5 zendoptimizer phpMyAdmin in iis php Environment

Source: Internet
Author: User
Tags php and mysql

In this example, under wiondws XP
Iis5.1
Php5.2.1 (ZIP)
Mysql5.0.37
Phpmyadmin2.10.0.2
ZendOptimizer-3.2.6
Installation and configuration
IIS Installation

1. Add the Windows XP SP2 system installation disc to the optical drive.

2. Choose Control Panel> add and delete> Add/delete Windows Components> Windows component wizard, and select Internet Information Service (IIS)

3. Click Next to copy the file until the installation is complete.

4. Complete IIS Installation

5. Open the browser and enter http: // localhost. If the following interface appears, the installation is successful.

MySQL Installation

1. Click MySQL installation package

2. The default value is typical. If you want to modify the installation path, you can also select Custom.
Note: The Path for installing MySQL cannot contain Chinese characters!

3. Click intall to start installation.

4. Skip Registration

5. Do you want to configure MySQL now? You can also configure MySql in the Configuration Wizard in the Start Menu.
Configuration now

6. Select detailed configuration (detailed settings) and click Next to continue.

7. The following option selects the type that MySQL applies to. The first option is development.Server,
We will only use as little memory as possible, and the second is a normal Web server, which will use a moderate amount of memory,
The last one is that only MySQL databases are running on this server, which will occupy all the memory.
You can select an option based on your needs. Only the development server is selected here, and click Next to continue.

8. The following describes how to use the database. The first option is multi-function usage,
Optimize the database to a good InnoDB (transaction) storage type and an efficient MyISAM (non-transaction) storage type,
The second type is only used for transaction processing. InnoDB is the best optimized, but MyISAM is also supported. Only MyISAM supports full-text indexing.
The last is simple network development, which is suitable for simple applications. Only the MyISAM type that does not support transactions is supported.
Generally, select the first multi-function.

9 The following figure shows the data storage location of innoddb, which is usually good by default and does not need to be changed.
(If You Want To modify the data storage path, you can also modify the datadir value of my. ini after installation)

10. Select the maximum number of connections allowed by MySQL. The first is the maximum number of concurrent connections,
The second option is a maximum of 500 concurrent connections, and the last option is custom. You can choose one based on your needs.
Select the first one.

11 The following figure shows whether to run the network link. Select the check box here. The database listening port. The default value is 3306,
If it is changed to another port, remember the modified port when connecting to the database. Otherwise, you cannot connect to the MySQL database,
It is troublesome. Do not modify it here. Use the default port of mysq: 3306.

12 In this step, set the default MySQL encoding. The default encoding is Latin1, which is also the standard encoding. The second encoding is utf8, and the third encoding is manual.
Encoding is introduced in Versions later than 4.1. If you want to use the data of the original database, you 'd better determine the encoding used by the original database. If the encoding is set here
The encoding is inconsistent with that of the original database data. garbled characters may occur during use. We recommend that you use Latin1 standard encoding.

Of course, we can modify its encoding if necessary (not recommended ).

13. Whether to set MySQL to a Windows service in this step is generally set to a service,
In this way, you can enable and disable the MySQL database through the service. We recommend that you select the check box below,
In cmd mode, you do not have to execute commands in the bin directory of MySQL. You can run the command in command line mode to obtain the executable files.

14 this step sets the MySQL Super User Password, which is very important to the Super User,
You have all permissions for MySQL. Please set and remember the superuser password,
The check box below indicates creating an anonymous account, which will make the database system insecure.
If you have this requirement, check it.

15. Click execute to install

16. Click Finish to complete installation.

17. You can start using MySQL.ProgramMySQL command line client, enter the password
This interface indicates that MySQL has been installed.

Possible problems:

If you are prompted in step 1

Because you have installed MySQL before. Some configuration files are retained during uninstallation.

Click Retry to see if it works. Otherwise, click Cancel to exit. Then click MySQL server instance config wizard in the Start Menu.
Reconfigure MySQL

Repeat the previous operation. Step 1 will show the interface as shown below

There are three places to enter the password. You have installed MySQL.
Enter the original root password in the first text box, and enter the new root password in the next two text boxes.

If the problem persists, reinstall MySQL.
Note: It is best to delete all the original files. If necessary, clear the registry,
If there are no other mysql-related programs on your machine, do not keep the original my. ini file.
Delete the files in the original installation path and the ibdata1 files in the data directory.

MoreArticlePHP fans station http://www.phpfans.net

PHP installation

PHP is a zip file (non-Install Version), which is relatively simple to install.
Unzip it. Rename the extracted php-5.2.1-Win32 to php5. and copy it to the C directory. That is, the installation path is c: \ PhP5.

1. Find 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 (take c: \ windows as an example ).

2. Copy php5ts. dll and libmysql. DLL under the PHP Directory to the c: \ windows \ system32 directory.

3. Copy the php_gd2.dll, php_mysql.dll, and php_mbstring.dll files in the PhP5 \ ext directory to the C: \ windows \ system32 directory.
PHP cannot process images if php_gd2.dll is not loaded. If php_mysql.dll is not loaded, PHP does not support MySQL function libraries.
Php_mbstring.dll supports wide characters when phpMyAdmin is followed.
More articles PHP enthusiast station http://www.phpfans.net

Install zendoptimizer

Zend optimizer OptimizationCodeTo improve the execution speed of PHP applications. The execution of the PHP program using Zend optimizer is 40% to 100% faster than that without Zend optimizer. In addition, Zend optimizer must be installed to run some files encrypted with Zend safeguard.
Note: The installation of Zend optimizer does not affect the normal operation of PHP. If you are in trouble, skip this step.

1. Click to install Zend optimizer.

2. Accept the protocol and click Next.

3. Select the installation path

4. We use iis5.1, so here we select IIS

5. Select the location of PHP. ini. In c: \ windows \,

6. Select the default IIS installation path. Our options are c: \ Inetpub \

7. Click Install to install

8. Click Yes. The installer automatically completes configuration and server restart.

9. Click Finish to complete the installation.

After everything is installed, We can configure it again.

Configure PHP and associate MySQL
Open the c: \ windows \ PHP. ini file

The following content must be replied before you can see

1. Set the extension path
Find the row in extension_dir
Extension_dir = "./"
Change this row
Extension_dir = "C: \ PhP5 \ Ext"
C: \ PhP5 is the path for installing PHP. dll cannot be loaded if the path is incorrect.
(Note: Some PHP versions are; extension_dir = "./" Remove the semicolon from the previous version)
2. Search
; Extension = php_mbstring.dll
; Extension = php_gd2.dll
; Extension = php_mysql.dl
Remove the semicolon before the preceding three items so that these DLL files can be loaded when IIS is started.
Of course, we copied these DLL files to system32. (We noticed how to load some DLL files during the installation process.
Some DLL files, such as php_mysqli.dll, will be loaded later)
3. Set the session storage path.
Find the row in session. save_path.
; Session. save_path = "N;/path"
Add a row after this line (note that adding a row is not followed)
Session. save_path = "C: \ WINDOWS \ Temp"
Save it to your temporary directory, which can be saved to the Windows temporary directory temp.
4. Note the short_open_tag. Some PHP versions are off by default.
That is to say, PHP cannot use short tags.
Short tags are easy to use, and many programs use short tags for writing, such as discuz.
If you do not change short_open_tag to on, it will be difficult to determine the cause. We recommend that you modify it here.
Search
Short_open_tag = off
Change
Short_open_tag = on
5. Whether the error display_errors is displayed
For security reasons, some display_errors versions are also off by default.
That is to say, during debugging, if the PHP code is incorrect, only one blank page is displayed, and the error cause and number of lines are not displayed.
Therefore, debugging is inconvenient. You are advised to modify it as needed.
Search
Display_errors = off (note not;-display_errors = off [security])
Change
Display_errors = on

6. display the notice prompt
Although the error prompt is displayed in step 5, the error report is also controlled by error_reporting.
By default, notice is disabled in PhP5. If debugging is performed locally, you are advised to enable the notice prompt.
Search
Error_reporting = e_all &~ E_notice
Change
Error_reporting = e_all
In addition, you can use error_reporting () to control the output of error reports. For details, refer to the following manual.
7 register_globals
It is also off by default for security reasons.
When register_globals = OFF, $ _ post ['user _ name'] and $ _ post ['user _ pass'] should be used for receiving the next program.
When register_globals = on, the next program can directly use $ user_name and $ user_pass to accept the value.
For more details, see
Http://www.phpfans.net/bbs/archiver? Tid-234.htm
We recommend that you modify the settings as needed.
8 PhP5 Time Difference
Time Difference: eight hours
Why? The Time Zone settings are added for the PhP5 series. The default value is Greenwich Mean Time, which is 8 hours different from the East 8 zone in China.
Find the row in date. timezone
; Date. timezone =
Replace;
Date. timezone = PRC
PRC: People's Republic of China,
For more detailed solutions, refer to
Http://www.phpfans.net/bbs/archiver? Tid-60.html
For more information about File Upload configurations, see
Http://www.phpfans.net/bbs/viewthread.php? Tid = 1663 & extra = Page % 3d1
More articles PHP enthusiast station http://www.phpfans.net

IIS integration PHP

1. Open Control Panel> management tools

2. Open Internet Information Service in the management tool

3. Right-click the default website click attribute.

4. Click ISAPI filter and then add. In the Filter Properties dialog box that appears, enter
Filter Name: PHP
Executable File: Click Browse to select c: \ PhP5 \ php5isapi. dll

5. Click OK to exit the configuration.

6. Right-click the default website and click Properties again. The ISAPI filter is displayed. A green up arrow is displayed in the preceding status, indicating that the filter has taken effect.
If there is a down red arrow or no arrow, it indicates that there is a problem with the previous configuration. Please make sure that step 1 is done. If not, please re-check the settings.

7. Click the Home Directory label, and then click Configure.

8. For example, click Add.

9. In the Add/edit application extension ing dialog box that appears.
Executable File: Click Browse to select c: \ PhP5 \ php5isapi. dll
Extension:. php (do not miss the previous .)

10. Click the document tab and click Add. In the Add default Document dialog box that appears, enter index. php.

Test the configuration.
Create a phpinfo. php file under the root directory of the website.

<? PHP
Phpinfo ();
?>

Open in a browser
Http: // localhost/phpinfo. php
If the following information appears, it indicates that PHP has been configured.

Next, we will test the association between PHP and MySQL databases.
Create a test. php file in the root directory of the website. The content is

Code: <? PHP
$ Host = "Localhost" ;
$ User = "Root" ;
$ Password = "12345" ; // Change 12345 to your MySQL password
$ Link = Mysql_connect ( $ Host , $ User , $ Password );
If (! $ Link ) Echo "<H1> failed! </H1>" ;
Else echo "<H1> successful! </H1>" ;
Mysql_close ();
?>

Open http: // localhost/test. php In the browser
If the output is successful, it means the result is complete.

More articles PHP enthusiast station http://www.phpfans.net

Install phpMyAdmin

Download the phpMyAdmin-2.10.0.2-all-languages.zip, decompress it to the root directory of your website, and rename it phpMyAdmin,
Find and open libraries/config. Default. php (some versions are config. Inc. php or config. defaut. php in the current directory)
Make the following changes:

1. There are two rows for searching for the password:
$ Cfg ['servers'] [$ I] ['user'] = 'root ';
$ Cfg ['servers'] [$ I] ['Password'] = '';
Enter your MySQL password in $ cfg ['servers'] [$ I] ['Password'] = ''.

2. Search for $ cfg ['pmaabsoluteuri '] and set the value in the single quotation marks to the phpMyAdmin directory path, for example, http: // localhost/PHPmyAdmin /;

3 search $ cfg ['defaultlang '] and set the value in the single quotation marks to zh-gb2312;

The following code is modified based on your own needs (if you are not familiar with the database code, do not modify it)
4. Search for $ cfg ['defaultcharset'] and set it to the encoding you want.

Open the browser and enter http: // localhost/PHPmyAdmin/. IIS and MySQL are started,
If the following page appears, phpMyAdmin is installed and can be used.

Please familiarize yourself with the specific functions of phpMyAdmin.

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.