PHP Environment Configuration iis5.0+php5.23+mysql5+phpmyadmin_php Tutorial

Source: Internet
Author: User
Tags php website blank page

One. Installing PHP5

1. Get PHP

Open the download page for the official PHP website: http://www.php.net/downloads.php

Select "PHP 5.2.3 Installer [21,966kb]-June 2007" link to download

Download PHP 5.2.3 Zip Package at the same time

2.PHP5 installation Process

PHP 5.2.3 Installer decompression to d:php installation

PHP 5.2.3 Zip package extracted to d:emp, the inside of the Ext folder and Php_mysql.dll Copy to the PHP installation root directory d:php

3. Configure PHP

PHP files cannot be interpreted by IIS after installing PHP and need to be configured

Open IIS, right-select the properties of the default site, and select Configure in the home directory category

Click the Add button to map the application extension, browse for the executable as "Php5isapi.dll" in the installed PHP directory, and "extension" to ". php".

4. Debug PHP

Create a folder in the local disk directory for debugging PHP, and quickly set the folder virtual path PHP

Open Dreamweaver Input Code

Phpinfo ();
?>

Save the file in a defined folder and enter the save file name index.php

Open IIS to debug a php file http://localhost/php/index.php

5. Configure PHP.ini

PHP5 default does not support mSQL, so we need to configure under Php.inc

(1) Setting the extension path
Find Extension_dir have this line
; extension_dir = "./"
Add a line after this line (note that it is added to a row, not added to the back)
Extension_dir = "D:phpext"

Where d:php is your path to install PHP. The path is incorrect and the DLL cannot be loaded

(2) Find extension

Extension=php_mbstring.dll
Extension=php_gd2.dll
Extension=php_mysql.dl

Remove the semicolon from the preceding 3 items so that IIS can load the DLLs when it is started.

Two install MySQL

MySQL installation is basically a "NEXT" and the following is OK

Three-mount configuration phpMyAdmin

PhpMyAdmin (PMA) is a PHP program that can control and operate MySQL online via the internet. He is the preferred Database maintenance tool for many MySQL administrators and webmasters, and the MySQL database can be fully manipulated by phpMyAdmin.

One, phpMyAdmin's download

Open the official site of phpMyAdmin: http://www.phpmyadmin.net/, select "Download" on the page, currently the latest version is phpMyAdmin 2.11.0-rc2, select "All-languages.zip The file download

Download the zip file through the decompression software to unzip the local disk after the download zip file through the decompression software to decompress the local disk d:phpmyadmin and quickly set the folder virtual path phpMyAdmin

Second, the installation of phpMyAdmin

Of course, whether you are testing locally or on a remote server, you need to configure the following files to use phpMyAdmin properly.

First, in the download of the extracted files there is a file "config.sample.inc.php", which is a sample file of the phpMyAdmin configuration file, we need to copy all the code in the file, create a new file "config.inc.php ", and paste the code. The file config.inc.php is a phpmyadmin configuration file that must be uploaded when the server is uploaded.

Note: you need to add the Blowfish_secret content definition cookie to find the line of code:

$cfg [Blowfish_secret] =;

Set content to Cookie


$cfg [Blowfish_secret] = webjxcom;

Test Address http://localhost/phpmyadmin/

FAQ phpMyAdmin "Unable to load MySQL extension, please check PHP configuration"

Workaround:

1 open http://www.php.net/downloads.php Select "PHP 5.2.3 Zip Package" file, the Ext folder is all extracted to the PHP installation directory, so only the Extension_dir = "D:phpext"(Note: If your PHP is installed on D-drive)

2 The PHP 5.2.3 Zip package inside the php_mysql.dll copy to the PHP installation root directory, it is recommended to restart IIS, and then debug phpMyAdmin

3. Configure PHP.ini

PHP5 default does not support mSQL, so we need to configure under Php.inc

(1) Setting the extension path
Find Extension_dir have this line
; extension_dir = "./"
Add a line after this line (note that it is added to a row, not added to the back)
Extension_dir = "D:phpext"

Where d:php is your path to install PHP. The path is incorrect and the DLL cannot be loaded

(2) Find extension

Extension=php_mbstring.dll
Extension=php_gd2.dll
Extension=php_mysql.dl

Remove the semicolon from the preceding 3 items so that IIS can load the DLLs when it is started.


(3) Set session save path
Find Session.save_path have this line
; Session.save_path = "N;/path"
Add a row after this line
Session.save_path = "C:windowstemp"

Saved to your temp directory, it can be saved to the Windows Temp directory Temp

(4) It is also worth noting that Short_open_tag is off by default.
This means that PHP cannot use short tags such as Must use
Because the short mark is easy to use, and many programs are written with just a few marks, such as discuz, etc.
If you do not change the Short_open_tag to on will appear the symptoms will be difficult to judge is the above reasons, it is recommended to modify

Find
Short_open_tag = Off
Switch
Short_open_tag = On

(5) Whether to display error display_errors
For security reasons, Display_errors also defaults to OFF
That is, when debugging, if the PHP code is wrong, only a blank page appears. It does not show the cause of the error and the number of rows that were faulted.
This will be very inconvenient to debug, it is recommended to modify according to your needs
Find
Register_globals = Off
Change into
Register_globals = On

(6) Register_globals
It is also off by default for security reasons
When Register_globals=off, the next program should use $_post[user_name] and $_post[user_pass])
When Register_globals=on, the next program can accept values directly using $user_name and $user_pass.

Suggestions to modify according to your needs

(7) PHP5 time difference problem
Time difference Eight hours
Why is it? The PHP5 series has a new time zone setting, which defaults to GMT, which is 8 hours from the East 8 district in China.
Find Date.timezone have this line
;d Ate.timezone =
To remove, change, or convert to
Date.timezone = PRC

of which prc:peoples Republic of China

FAQ Two Access denied for user root@dbhost (using password:no)

Workaround:

Save the phpMyAdmin root directory without the modified config.sample.inc.php as config.inc.php, and restart IIS

For config.inc.php files, the most important thing is to modify the username and password to join the phpMyAdmin connection to MySQL. Find the line of code:

$cfg [servers][$i][controluser] = PMA;
$cfg [servers][$i][controlpass] = Pmapass;

Delete the "//" comment number and enter the username and password configured in MySQL (please contact your space service provider for the remote server), for example:


$cfg [servers][$i][controluser] = webjxcom;
$cfg [servers][$i][controlpass] = *********;

Note: you need to add the Blowfish_secret content definition cookie to find the line of code:

$cfg [Blowfish_secret] =;

Set content to Cookie

$cfg [Blowfish_secret] = webjxcom;

http://www.bkjia.com/PHPjc/531685.html www.bkjia.com true http://www.bkjia.com/PHPjc/531685.html techarticle A. Install PHP5 1. Get PHP open PHP official website download page: http://www.php.net/downloads.php Select "php 5.2.3 Installer [21,966kb]-2007" link to download simultaneously ...

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