PHP development environment configuration in Windows

Source: Internet
Author: User
Tags change settings php development environment dedicated server
Preparation of PHP development environment configuration in Windows
  • Apache: http://www.apachelounge.com/download/
  • PHP: http://windows.php.net/download#php-5.6 (Select the thread safe version)
  • MySQL: http://dev.mysql.com/downloads/windows/installer/
  • Procedure

    All the downloaded tools are free of installation, and you can extract them to the corresponding directory. I will place them in the C root directory.

    Apache configuration

    Open the Apache24/conf/httpd. conf file and modify the port (because there may be port conflicts) and server name.

    Listen 88ServerName www.example.com:88

    Create a service:

    httpd.exe -k install

    Start the service: run the Apache24 \ bin \ ApacheMonitor.exe file.

    Apache connection to PHP

    Add the following lines to Apache24/conf/httpd. conf:

    LoadModule php5_module "C:/php/php5apache2_4.dll"PHPIniDir "C:/php"AddType application/x-httpd-php .php .html .htm

    Rename php. ini-development in php to php. ini as the PHP configuration file.
    Modify

    ; extension_dir = "ext"

    Is

    extension_dir = "ext"

    Enable the function library and remove the semicolon before the row.

    ;extension=php_bz2.dllextension=php_curl.dll;extension=php_fileinfo.dllextension=php_gd2.dll;extension=php_gettext.dll;extension=php_gmp.dll;extension=php_intl.dll;extension=php_imap.dll;extension=php_interbase.dll;extension=php_ldap.dllextension=php_mbstring.dll;extension=php_exif.dll      ; Must be after mbstring as it depends on itextension=php_mysql.dllextension=php_mysqli.dll;extension=php_oci8_12c.dll  ; Use with Oracle Database 12c Instant Client;extension=php_openssl.dll;extension=php_pdo_firebird.dll;extension=php_pdo_mysql.dll;extension=php_pdo_oci.dll;extension=php_pdo_odbc.dll;extension=php_pdo_pgsql.dll;extension=php_pdo_sqlite.dll;extension=php_pgsql.dll;extension=php_pspell.dll;extension=php_shmop.dll

    After the configuration is complete, restart Apache and check whether the configuration is successful. Add the following content to index.html:

     

    Open the browser and enter http: // localhost: 88 to check whether the PHP version information is displayed.

    MySQL configuration

    Back up the my-default.ini, rename it my. ini, and change the content:

    # For advice on how to change settings please see# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the# *** default location during install, and will be replaced if you# *** upgrade to a newer version of MySQL.[client] port = 3306 [mysqld] port = 3306 #basedir= "C:/mysql" #datadir= "C:/mysql/data" #default-character-set = gbk #default-storage-engine = INNODB max_connections = 100 max_allowed_packet = 16M# Remove leading # and set to the amount of RAM for the most important data# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.# innodb_buffer_pool_size = 128M# Remove leading # to turn on a very important data integrity option: logging# changes to the binary log between backups.# log_bin# These are commonly set, remove the # and set as required.# basedir = .....# datadir = .....# port = .....# server_id = .....# Remove leading # to set options mainly useful for reporting servers.# The server defaults are faster for transactions and fast SELECTs.# Adjust sizes as needed, experiment to find the optimal values.# join_buffer_size = 128M# sort_buffer_size = 2M# read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

    Create a service:

    mysqld -install

    Start the service:

    net  start mysql 

    Delete service: mysqld-remove, stop service mysqld stop mysql

    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.