IIS can support both php and asp. I believe it is favored by many people.
The following configuration documents hope to help you build a php environment successfully. Please correct your mistake.
Please refer to apache's php environment.
* blogger: patch (or php.ini-dist) file and rename it as php.ini.
And copy it to the windows directory of the system disk (taking c:\windows as an example).
Then copy the php 5ts.dll and libmysql.dll in the PHP directory to the c:\windows\system32 directory.
3 Copy the files PHP _ gd2.dll, PHP _ MySQL.dll and PHP _ mbstring.dll in the php5\ext directory to c:\windows\system32.
If PHP _ gd2.dll is not loaded, PHP will not be able to process images. If php_mysql.dll php is not loaded, php will not support mysql libraries.
When using phpmyadmin in the future, Php_mbstring.dll supports wide characters.
More articles php fan station
Installation of ZendOptimizer
Zend Optimizer improves the execution speed of PHP application by optimizing code. Using Zend Optimizer to execute PHP programs is 40% to 100% faster than not using it. Moreover, some files encrypted with Zend SafeGuard must be installed with Zend Optimizer to run.
Note: The installation of Zend Optimizer will not affect the normal operation of php. This step can be omitted if it is troublesome.
1 Click to install Zend Optimizer.
2 Accept the agreement and click Next.
3 Selected installation path
We use IIS5. 1, so we choose IIS here.
5. Choose the location of php.ini, ours is in C:\WINDOWS\
6 Select the default installation path of IIS. Ours is C:\Inetpub\
7 Click Install to install.
Click Yes. Setup automatically completes the configuration and restarts the server.
9 Click Finish to complete the installation.
We will configure everything after installation.
Configure php and associate MySQL.
Open the c:\windows\php.ini file.
The following contents need to be answered before you can see them.
1 Set the extension path
There is such a line in the search extension_dir.
extension_dir = "。 /"
Replace this line with the following
extension_dir = "C:\php5\ext "
Where C:\php5 is the installation path of php. If the path is incorrect, you will not be able to load the dll.
(Note: Some php versions are; Extension_dir = "。 /"Remove the semicolon)
2 search
; extension=php_mbstring.dll
; extension=php_gd2.dll
; extension=php_mysql.dl
Remove the semicolon before the above three items, so that these dlls can be loaded when IIS starts.
Of course, we also copied these DLLs to system32. (Everyone noticed how to load some DLLs during installation.
I will load some DLLs in the future, such as php_mysqli.dll, and I will know how to load them. )
3 Set the session save path
Search session.save_path has such a line.
; session . save _ path = " N; /path "
Add a line after this line (note that a line is added, not after it).
session . save _ path = " C:\ WINDOWS \ Temp "
Save to your temporary directory, which can be completely saved to the temporary directory temp of windows.
Also worth noting is short_open_tag. Some php versions are turned off by default.
In other words, php cannot use short tags, for example, it must use.
Because short tags are easy to use, and many programs are written with short tags, such as discuz.
If you don't change the short_open_tag to on, it will be difficult to judge the above causes of symptoms, so it is suggested to modify it here.
seek
short_open_tag = Off
replace
short_open_tag = On
5 is the error display_errors displayed?
For security reasons, some versions of display_errors also default to Off.
In other words, when debugging, if the php code is wrong, only a blank page will appear, and the reason for the error and the number of lines will not be displayed.
This will be very inconvenient to debug, so it is recommended to modify it according to your own needs.
seek
Display_errors = Off (note that it is not; - display_errors = Off [Security])
change into
display_errors = On
6 display notification warning prompt
Although the error prompt is turned on in the fifth step, error reporting is also controlled by error_reporting.
Php5 turns off notification notifications by default. If it is local debugging, it is recommended to turn on the notification notification prompt.
seek
Error report = E _ ALL & amp~ electronic notification
change into
Error report = E_ALL
By the way, you can also control the output of error reports through error_reporting () in the program. Please refer to the manual for details.
7 Registration _ Global
For security reasons, it is also turned off by default.
When register_globals=Off, the next program should use $_POST['user_name'] and $_POST['user_pass'].
When register_globals=On, the next program can directly use $user_name and $user_pass to accept values.
For more details, please refer to.
/bbs/archiver/? tid-234.htm
It is suggested to modify it according to your own needs.
8 php5 time difference problem
The time difference is eight hours.
Why? The PHP5 series version adds the time zone setting, and the default time is Greenwich Mean Time, which is just 8 hours away from East Zone 8 where China is located.
There is such a line in the search date.timezone.
; Date. Time Zone =
Yes; Remove, change
Date.timezone = China
Available values in Chinese mainland are: Asia/Chongqing, Asia/Shanghai and Asia/Urumqi (Chongqing, Shanghai and Urumqi in turn).
Hong Kong and Taiwan Province provide: Asia/Macau, Asia/Hong Kong and Asia/Taipei (Macau, Hong Kong and Taipei in turn).
And Singapore: Asia/Singapore.
After modification, IIS or Apache must be restarted to use the correct time.
Among them, PRC: People's Republic of China (PRC), People's Republic of China (PRC),
For a more detailed solution, please refer to.
/bbs/archiver/? tid-60.html
Please refer to this forum for the configuration of file upload.
/bbs/viewthread.php? tid= 1663。 extra=page%3D 1
More articles php fan station
IIS integrated PHP
1 open control panel > administrative tools.
2. Open the Internet information service in the management tool.
3 As shown in the figure below, right-click the default website and click Properties.
4 Click the ISAPI filter and then click the Add button to fill in the filter properties dialog box that pops up.
Filter name: php
Executable file: click browse to select c: \ php5 \ php5isapi.dll.
5 click ok to exit the configuration
6. Right-click the properties of the default website again. Enter ISAPI filter. As shown in the figure, the previous state has a green upward arrow, indicating that the filtering has worked.
If there is a downward red arrow or no arrow, there is a problem with the previous configuration. Please make sure to complete step 5. If not, please check the settings again.
Click the Home Directory tab. Then click Configure.
8 As shown in the figure below, click the Add button.
In the pop-up Add/Edit Application Extension Mapping dialog box.
Executable file: click browse to select c: \ php5 \ php5isapi.dll.
Extensible:. Php (don't leave out the previous. )
10 Click the document tab, and then click the Add button. In the pop-up dialog box for adding default documents, fill in index.php.
Let's do a test after the configuration is completed.
Create a phpinfo.php file in the root directory of the website.
& lt? Server-side programming language (abbreviation of professional hypertext preprocessor)
phpinfo();
& gt
Open in a browser
[/url]
$ host = " localhost
$ user = " root
$ password = " 12345 "; // 12345 change your mysql password.
$link=mysql_connect($host,$user,$ password);
If (! $ link)echo " & lt; h 1 & gt; Defeat & lt/h1>;
else echo " & lth 1 & gt; Success! & lt/h 1 >;
MySQL _ close();
& gt
Open in a browser
Install phpMyAdmin
Download phpMyAdmin-2.10.0.2-all-languages.zip, extract it to the root directory of your website and rename it phpmyadmin.
Locate and open libraries/config.default.php (some versions are from config.default.php or config.default.php in the current directory).
Make the following changes:
1 The search password has the following two lines.
$ CFG[' Servers '][$ I][' user ']= ' root ';
$ CFG[' Servers '][$ I][' password ']= ' ';
Fill in your mysql password in $ CFG ['servers'] [$ i] ['password'] =''; Within single quotation marks
2 Search for $ $ $cfg['PmaAbsoluteUri']']']'] and set the value in single quotation marks after it as the directory path of phpMyAdmin, such as: http:/http://localhost/phpMyAdmin/;/;
3 Search for $cfg['DefaultLang'] and set the value in the single quotation marks behind it to ZH-GB 2312;
Modify the following items according to your own needs (if you are not familiar with database coding, it is recommended not to modify them).
Search for $cfg['DefaultCharset'] and set it to the encoding you want.
Open a browser and enter: http://localhost/phpmyadmin/, IIS and MySQL to start.
If the following page appears, phpmyadmin is installed and can be used.
Please be familiar with the specific functions of phpMyAdmin, so I won't go into details here.