PHP Server Environment configuration (Apache and IIS two methods)

Source: Internet
Author: User
Tags php server php and mysql
    1. Default_charset= "gb2312", modify the default character set, here, if preceded by a semicolon ";", remove the semicolon;
    2. The Register_globals=off is changed to Register_globals=on, making the transitive global variable valid;
    3. Extension=php_dba.dll If there is a semicolon in front, remove the semicolon to the same;
    4. Extension=php_dbase.dll
    5. Extension=php_gd2.dll GD library do diagram, generally used for graphic verification code;
    6. Extension=php_mysql.dll is used to connect MySQL database;
    7. Short_open_tag=on support and , off for support only
Copy Code

Copy the Php5ts.dll and Libmysql.dll (for MySQL) files in the d:\php\php directory to the Windows system folder, namely: C:\Windows\System32.

≡apache 2.2.8 installation ≡ 1, to its official site download Apache_2.2.8-win32-x86-no_ssl.msi and execute. Press the Next button 3 times, the installation program requires you to enter your network domain (Web domains), server domain (server domains) and webmaster e-mail, some words are filled out truthfully, this note describes the local self-built test environment, so casually, the first two fill localhost, mail write your own can. After entering next, the default installation path is "C:\Program Files\apache software Foundation\apache2.2\", modify the path and change to the "d:\php\apache2.2" you want. Then go all the way down to the end of the installation; At this point, open the PHP folder under D, and you will see a folder named apache2.2.

2, open IE, and then enter in the Address bar://localhost "or" "can see the success of the Apache installation page;

3, the configuration of the conf/file 1) find "DocumentRoot", here is the directory to specify the home page. The default is: "D:\php\apache2.2\htdocs", you can use the default directory, you can also define one, such as: "d:/php". Note: Do not add "/" at the end of the directory. 2) Find "DirectoryIndex", here is the default home page file name, can be added after L index.php and so on. Multiple filenames are separated by a space. 3) Find

    1. Options FollowSymLinks
    2. allowoverride None
    3. Order Deny,allow
    4. Deny from all
    5. Modified to:
    6. Options FollowSymLinks
    7. allowoverride None
    8. Order Deny,allow
    9. Allow from all
Copy Code

If you do not change this here, you may appear that you do not have permission to access/on the this server. This error message, especially after changing the path of the default home page.

4) Create a virtual directory

    1. LoadModule php5_module "D:\php\php\php5apache2_2.dll"
    2. AddType application/x-. PhP3. Inc
Copy Code

Note: Changes to the file are required to restart apache2.2 to take effect.

Ii. using IIS to parse PHP files and build a PHP server environment

1, ibid., first install PHP 5.2.5. 2. Open IIS Manager, select "Default Web Site", "Properties", Pop-up dialog box select "Home Directory" tab, execute permissions to "scripts and executables", click "Configuration", add application extension mapping, executable file Selection "D:\php\php\ Php5isapi.dll ", extension". php "and select all actions, Script engine, confirm file exists. For the Win2003 system, you also need to add a Web service extension that requires a file of "D:\php\php\php5isapi.dll" with the extension "PHP" and the condition changed to allow. PHP and MySQL server configuration instructions PHP detection server Status Implementation code PHP Get server time method PHP gets server-side information in an alternative way PHP gets a piece of code for server information

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