Install and configure PHP5MySQL5ZendOptimizerphpmyadmin in the IISphp environment

Source: Internet
Author: User
IIS supports php and asp. I believe it is favored by many people. the following configuration documents hope to help you build the php environment smoothly. if it is incorrect, please correct your criticism. 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. open the mysql Command line Client of all programs in the Start menu and 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.

More articles php enthusiast 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 improves the execution speed of PHP applications by optimizing code. 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.

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"Failed! ";
Else echo"Successful! ";
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.
Related Article

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.