Custom PHP Development environment Setup and two forms of comparison summary

Source: Internet
Author: User
Tags php and mysql php development environment zend framework
Custom PHP Development Environment Setup and comparison summary of two ways

PHP development environment is built in two, one is a custom way, the other is the way to integrate the installation package, the latter is more difficult than the first construction of a lot less difficult, is the direct installation of the way, the specific configuration information has been handled by others, but the second way of using integration has a great deal of criticism:

1: The first is that the version can not be fully updated, leading to environmental aging, previously felt that the version of the new and old and development did not have much of a relationship, but later found that the old version of the popularity of new technology support is far from enough, If PHP is less than 5.2 version of the Zend Framework support will be very weak, this is a fatal thing, it means the framework is not learning .... So, if it's a custom installation, you don't have to think about the complex connectivity you know that you don't know.

2: Second, the integrated development environment itself can not be perfect for you, many places still have reservations, such as when you installed is Wampserver, will let you encounter Chinese garbled situation, as if I have tried, this is in MySQL only support Latin, Latin ah,,, you will???? Not only this integration environment is so, finally found a support Chinese appserver, but the problem came, it unexpectedly does not support the mechanism of things, no it also play what security ... From the storage engine problem, let you Baidu Test all the program is useless.

3: Another problem arises, when you open the GB2 Gallery, the introduction of Gpgraph is not supported.

4: Also when we configure the virtual host, the entire configuration file make that call a not general chaos, let you find not clear east, the most deadly is, when you worked hard to configure, Apache unexpectedly strike, how to fight he can not get up, the problem is you can no longer thousands of lines of code to find out the problem is, that is, All the environments you've configured before are wasted ... It's just not going to make people live!

The above is the integration package to install the PHP environment problem, but, if the installation in a custom way, just install the configuration to get through the Apache,mysql and PHP connectivity is enough for you, to tell the truth, I have been using the integration package way, but found that the more backward learning, integrated installation problems more and more, Simply re-install the environment, this time using a custom installation configuration method. Not much to say, just talk about the custom installation configuration specific steps, in order to reduce the variety of differences in the version of the problem, I picked the latest version on the other hand there is mutual support, especially PHP, I deliberately put Apacehe selected 2.2, for a lot of reasons, no longer say, the specific version of the situation is: Apache2.2 mysql5.6 php5.4

This is what I have to use the software: apace+mysql+php, the specific configuration is also subject to this:


Here we go!

1: First to prepare yourself the installation directory, such as in the E-disk set up a myphp folder, and then in the inside of the separate apache,mysql,php folder, which is in the following specific installation is very reasonable.

2: First install Apache, about the installation of filling localhost,80 port what is not more said, the installation process is very simple, do not forget to install in the Apache directory just built.

3: What to do when we are finished installing the next? , no, is testing the Apache you just installed is not a successful startup service, the procedure is simple, open the browser, enter localhost, when we see the classic

It works! the time, stating that I know that Apache has been installed successfully, do not be happy too early, you also need to restart Apache, to see if it can still start normally, sometimes after installation can be started, but close

There are problems when you start again, and this is a common problem, so be very careful.

4: Is the installation of PHP, said installation is not installed, in fact, is to extract PHP compressed files, PHP here is a core explanation of things, no it does not play PHP, the concrete I want to do is to extract the PHP compressed files to my e:/myphp/ PHP folder inside, so from a certain meaning is completed the installation of PHP work, the process is more simple, do not rush, dizzy things in the back ...

5: You think we have the Apache installed, the following should be configured their direct relationship, where the configuration let them connect to each other is to configure the e:/myphpapache//conf/httpd.conf this configuration file, remember , httpd.conf This file is very, very important!!! , the first thing to do is: in the LoadModule module that place itself to add to the Php5apache2_2.dll. To connect php5, in doing this behavior is the premise of the PHP folder first to see if there is no this file, This has no very important, not you also connect what, because my hair of resources are test pass, so inevitably there will be this file, then you should be in httpd.conf This file configuration write LoadModule php5_module e:/myphp/ Php/php5apache2_2.dll (Note that the path is your installation path, to be clear). That way, your Apache has a relationship with PHP.

6: When the completion of the previous step, it should be one go, you let them connect is not used, the following is to do is, you have to let Apache know what to do if you encounter PHP files, but also how to do , of course, sent to PHP parsing, so, Such a statement must be written in httpd.conf:


SetHandler application/x-httpd-php

The meaning of this configuration statement is what I said above, the configuration to complete this is only a phase, because you just connect PHP, but PHP still cannot load its corresponding module.

7: Said loading will have to let Apache to find php.ini, but you may be surprised, PHP does not have this file Ah, certainly will have, when you see a php.ini-devrlopment file, in fact, this is the PHP distribution file, What we're going to do is copy this file, rename it to PHP.ini, so do is to php.ini the path to copy down, and then go to httpd.conf file, remember the above add PHP parsing that paragraph , All we have to do is to add a section of the phrase that allows PHP to invoke its associated module, that is: Phpinidir "e:/myphp/php" (again, your path is your own).

8: Next, Victory, restart Apache, you can write a PHP file here to detect the success of the PHP module, that is , when you open this file through Apache, will show a lot of things (of course, may not show or error, That is you failed to configure the configuration, note that you look at the front of a loaded configuration file path is not your php.ini path, if it is, stating that you have successfully configured here, and vice versa here configuration failed.

9: Is in php.ini inside add extension path, extension path is what, when you open the PHP ext folder to know, inside is PHP support all the library, including Mysql,mysqli,gd2,pdo and so many use we need

Used, here I want to get through it, the same, very simple, in the php.ini, search Extension_dir This string, will definitely see extension_dir = "e:/myphp/php/ext/", remove the split good on the open, really did not have

Words to add themselves, the same. There is also the configuration time zone plus Date.timezone = PRC.

10: Complete the above work I personally recommend restarting Apache again, see there is no above error, if not, the following MySQL once the error is difficult to find, here if there is no problem, proceed to the next step , start to install MySQL.

11: Because I downloaded MySQL is the latest version, at the beginning of the installation at the time unexpectedly overwhelmed, simply say, double-click installation, a typical installation, custom installation, etc., if the installation in the definition can choose to install

Directory, choose Custom installation, not the typical installation can also, and then choose the type of operating system is 32-bit or 64-bit, he will give you to choose what you need, the installation of things to grasp can not less, in fact, a lot of things in the back of the study is more useful, and secondly, Select the development mode to support the session mechanism, previously I did not choose this time, so that things can not be rolled back, so choose him, then the character encoding, account type (must be the root user!) Port and so on the default is, the password you set yourself, is your login database password. The installation directory is the same in the E:/myphp/mysql folder.

12: This time you can look at your client will be able to use, cmd------input mysql-u root-p------------Enter your password-----------------is not welcome things, as long as not error on the right.

13: This is the same we have to think about what it is to be able to operate PHP, PHP files, so we have to build PHP and MySQL connection, we did not see many libraries in the Ext folder, PHP is connected to it,

Inside the php.ini, search extension, about 850 lines, you need to open two library files Extension=php_mysql.dll and Extension=php_mysqli.dll, the same, remove the front quotation marks on the open,

To say, we can not only use these two libraries, there are other libraries are more important, in the course of learning later, will be related to the use of the proposed time to open again.

14: Then restart Apache, check if our MySQL can be used, the simple way is to open our own established info.php this file, to see if there is no load MySQL and mysqli two modules, these two

In fact, is the MySQL two interface, of course, PDO, it is not more said, if said, saw two modules, to here, our basic PHP environment is built.


In addition, we have a lot of time to use the establishment of virtual host, about the configuration of virtual host, see my other Blog: Virtual Host Configuration

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