MAMP Pro software is a good web site integrated environment software running under the Mac, powerful, simple configuration, very convenient for local debugging, which is composed of apache+mysql+php+ Dynamic DNS configuration, PHP version can dynamically switch to the latest version. No need to change the hosts file through the software configuration interface to complete the Hosts file modification, Mysql,apache port and run configuration, very simple, save the user need their own configuration and build an integrated environment of trouble, as a Web user for the local debugging site of the tool, really recommend installation. The main advantages are full-featured, simple configuration, no learning costs, and Xdebug debugging tools to help users debug the program in real time. Here's how I configure the Mamp Pro software.
First download down Mamp Pro software, online has cracked version download. After the download is installed, after installation, the normal icon has the following 3:
Where the MACGDBP software is installed separately behind. After installing the Mamp Pro software, click the button in the red box below in the PHP panel to download it.
Open the software and configure it. Since the use of Apache as a server, so PHP is to run according to the module, that is, the above image of mode or the first option identical PHP version for the all Hosts (module) on the line. Of course, you can choose the CGI mode to run this is also possible, but generally for Apache we still recommend PHP as an Apache module to run, so that the site more stable. The way PHP works and how mod_php works is not here to say. Have time to own Baidu a bit, have a lot of information. Click the Run button in the top right corner and the software starts running. Then we usually in the local environment is often run as a virtual host, so we need to modify the Hosts file, before we need to the system directory to modify the Hosts file, here can be directly through the following software configuration interface to modify:
Take the example below to set up a virtual host domain name www.demo.cn (as well as the specific directory DocumentRoot settings under the site installation directory):
So easy! no longer have to worry about me being a virtual host!
Let's take a look at how this mamp Pro software installs PHP extensions, which is the point. As the software is installed with only the most basic PHP extension, so like the Memcache,redis,mongo extension is basically not preinstalled, this time we need to install these necessary extensions. The installation extension is installed using the homebrew method that comes with your Mac, because it's the easiest. Of course, if you feel this kind of trouble, you can directly from the Internet to download the corresponding PHP version of the extension, such as the memcache.so file, and then placed in the Mamp Pro software in the appropriate PHP extension of the installation directory, and then in the php.ini file to indicate extension= " Extended Save Directory ", remember, modify the php.ini file can only be modified through the interface of the software, so the most insurance, because the software's php.ini file is generated by a template configuration file. So it's no use if you go directly to modify the php.ini file. As soon as the software runs, it overwrites your modified php.ini file with the template configuration file. The place to modify the php.ini template profile is to modify the INI file of a running PHP version, such as PHP, file, edit Template, in the menu bar.
This reference link is: http://www.111cn.net/phper/linux-php/103735.htm. It's very clear in there. I just refer to this link, below I will directly copy the paste.
Install Php-redis extension, this can download the source code to compile, or to find the corresponding PHP version of the redis.so.
Because the mamp inside the integrated PHP version does not contain the header files, the compilation of their own download will certainly be wrong, the specific solution to find the information on their own. Of course, I'm lazy, so:
Brew Install Homebrew/php/php56-redis
Because I use PHP5.6, so is Php56-redis, this method is very convenient, simple, but the problem is that brew will automatically install a PHP5.6.19 to the/usr/local/cellar directory. And the installed Redis extension is put into the/usr/local/cellar/php56-redis/2.2.7_1/redis.so
The next step is to fix the PHP configuration file. In front of the mamp inside each PHP version of the corresponding directory has a Conf/php.ini file, which is naturally the PHP configuration file, so modify this file, add the following code in the extended section
extension=/usr/local/cellar/php56-redis/2.2.7_1/redis.so
After testing, the browser runs to indicate that the Redis extension has been loaded
The same is true of the same memcache extension. Then be aware of Apache running user, recommended to choose www. Then the user of the virtual host also chooses www. Default is Mac User:
Under the General menu:
Under the Hosts menu:
Modify MySQL Password:
M AMP Pro also has a better place to use Xdebug debugging. With the IDE software, very perfect.
Reference Link: http://www.cnblogs.com/kinglau/p/3919289.html
The prerequisites for the following steps are that the Xdebug extension must be installed and configured correctly. Xdebug extension installation is the same as Redis. After installation is also indicated in the php.ini directory xdebug.so, this installation Zend studio or Phpstorm and other PHP editing software. My IDE software is Zend Studio software, so it is configured as Zendstudio. Of course you can also configure it in your own way. In php.ini [Xdebug], add the following line:
xdebug.idekey= "Zendstudio"
The configuration of the final modification is:
Xdebug.remote_enable=1
Xdebug.remote_host=localhost
xdebug.remote_port=9000
Xdebug.remote_autostart=1
xdebug.idekey= "/applications/mamp/tmp"
; xdebug.profiler_enable=0
; xdebug.profiler_output_dir= "/applications/mamp/tmp"
extension= "/applications/mamp/bin/php/php5.5.26/lib/php/extensions/no-debug-non-zts-20121212/xdebug.so"
ZEND Studio software also needs to be configured: The configuration image is as follows:
Then download the Xdebug helper plugin in Google Chrome and configure the options after the installation is complete:
The following starts the debug program:
Debugging first not very clear, I check the information and then to add, not to be continued ...
Installation and use of Mamp software