Talk within walking distance of the development environment to build PHP-

PHP (English name: Hypertext Preprocessor, Chinese name: "Hypertext Preprocessor") is a versatile open source scripting language. Syntax absorbed the C language, Java, and Perl features conducive to learning, widely used, mainly for Web development. PHP syntax unique mix of C, Java, Perl and PHP own syntax.

php can be developed under linux, can also be developed under the windows, the development environment under article focuses on building windows.

Method One: Use appserver or wmap software installed directly (software packages)
Advantages: simple, easy, do not own configuration.
Disadvantages: not flexible enough, such as version upgrades.

1, AppServ
    AppServ is a PHP web Elevated Tool Combo Pack, author of some of Thailand on the Internet free of Elevated resources repackaged into a single installer, easy for beginners to quickly complete the elevated station, AppServ contains software: Apache , PHP, MySQL, phpMyAdmin and so on.
    Download the installation package: https://www.appserv.org/en/version-history/
    Testing the installation (default configuration), access address: HTTP: // localhost: 80 /
    the Apache Start:
        Method One, services. msc enter the service interface, start apache service
        method two, into the apache directory, run the script in the installation directory AppServ of apache_start.bat
2, WampServer
    Wamp is the integrated installation of Windows apache mysql PHP environment, namely in the window of apache, php and mysql server software. PHP extension, Apache modules, enable / disable mouse little bit to get, no longer have to go and modify the configuration files, WAMP will do it. No longer have to ask around in the php installation, WAMP get everything.

AppServ here for an example, the installation directory is as follows:
image

Method two: Manually mounting arrangement of each part of the software
to install their own respective part of the software, manual configuration (Apache (or iis) + php + mysql + phpadminThis may not])
advantages: flexibility, can select different versions of the software development needs.
Disadvantages: trouble, there is a certain degree of difficulty

1, the Apache
httpd under win32 obtain various versions of Address: http://archive.apache.org/dist/httpd/binaries/win32/
2, PHP
PHP release resources Address: http://windows.php.net/downloads / Releases / Archives /
3, MySQL
Download: http://www.mysql.org
4, phpMyAdmin
Download: https://www.phpmyadmin.net/

Installation steps:
1. Install Apache, php, MySQL
    Apache, php, MySQL is preferably mounted to the same directory (php in order to manage the environment), for example: C: / phpenv
2, Apache and php integration
    1) in the apahce httpd.conf conf directory follows configuration (add back the LoadModule)

LoadModule php5_module c:/phpenv/php-5.3.6/php5apache2_2.dll
PHPIniDir “c:/phpenv/php-5.3.6"
AddType application/x-httpd-php .php .phtml

    2) The installation php php.ini under the root directory - after ?? (where there are two files php-ini- ??, respectively php.ini-development and php.ini-production, the former is used for development and testing, who has a high security settings on the line when the product is suitable for use) into php.ini intended to enable development mode. (Apache otherwise would to use php.ini disk under c)
    3) extension path specified in php.ini

extension_dir = "E: /phpenv/php-5.3.6/ext" (recommended to use absolute paths here, do not use relative paths)

    4) Restart apache
    5) to test whether the successful integration Demo
    written into the apache htdocs directory test.php under

test.php:
<?php phpinfo(); ?>

3, php and mysql integration
    1) open support mysql (the original following in php.ini configuration items are commented out in the php.ini file, you can remove the comment)

extension=php_bz2.dll
extension=php_gd2.dll
extension=php_mysql.dll
extension=php_mysqli.dll

    2) Restart apache
    3) test whether the successful integration Demo
    written testmysql.php into the apache htdocs directory

testmysql.php:
<?php
    $test=mysql_connect("localhost","root","root");
    if($test){
        echo 'ok';
    }else{
        echo 'no ok';
    }
?>

4, install phpMyAdmin
    1) unpack phpMyAdmin
    2) after extracting the file folder are copied to the apache directory hdocs
    3) start the apache server
    4) login URL http: //localhost/phpmyadmin/setup/index.php the prompts to install that is gradually can

 

The FAQ:
1, if after the integration, the report can not be loaded, may be the lack of relevant documents vc
Solution: Install vc6 vc9 library file (for example: vcredist_x86-v6.zip and vcredist x86 2008-v9.zip)

Guess you like

Origin www.cnblogs.com/alfredinchange/p/7599564.html