PHP Development Environment Configuration: Wampserver+zendstudio+xdebug

Source: Internet
Author: User
Tags install php php development environment phpmyadmin what is phpmyadmin zend

Objective

In the beginning I wrote in another blog is wampserver+nodepad++, when the consideration is that the IDE occupies too much space, and may be more complex configuration, so the choice is nodepad++. But now because the task is getting longer and the amount of code is much more, it needs debugging. So choose an IDE.

Configuring the Environment Win7

Wampserver 2.5 Why are we installing wampserver?

Because if we want to develop a PHP project, first we have to install the PHP interpreter itself , but also to install a server Apache, but also to install PHP corresponding database MySQL. The environment configuration of the three software itself is cumbersome, and any poor configuration may cause the project to fail to run successfully.

This time we think, if there is a software itself integrated apache+mysql+php, we only need to pay attention to the configuration of the software itself, that is how good.

And because we're doing code development under Windows. So Wampserver was born.

Wampserver is a French-developed Apache web server, PHP interpreter to
and the MySQL database integration package.

Frees up developers to spend their time in a cumbersome configuration environment, freeing up more energy for development.

The APACHE+PHP+MYSQL integrated environment under Windows has a simple graphical and menu installation and configuration environment. PHP extension, Apache module, open/Close the mouse point is done, no longer need to personally modify the configuration file, Wamp it will do.

Http://www.xiazaiba.com/html/27954.html

Installation steps

Start installation

Click Next

Click Next

Click Next. Recommend that you install in the default location, or you can choose a different location, but note that the installation path please do not have Chinese, otherwise errors may occur!

The first delegate is to create a Quick Launch icon, the second is to create a desktop icon, and continue to click Next

Click Install

Waiting for installation ~

The installation process pops up a window that lets us choose the default browser. The default browser is explorer. then click Open.

This is what happens when the installation is almost over. Prompt for a window to enter the administrator mailbox and mailbox SMTP server, this if you are willing to fill in, you can fill it, but under normal circumstances directly click on the next can be, will not affect the installation.

At this point, we have successfully installed.

The desktop appears

Test if Wampserver can run successfully

Click the desktop icon

The lower right corner appears.

Right click on it, select the language, and the culture

This time it is orange and is offline (some services on our behalf have not been started.) All services are started, the icon is green, and we need to start the service first to be online.

Left click Icon, select Start all services

Then left-click the icon and click Switch to online status.

Pop-up warning

It means that my service did not start successfully.

Right click on My Computer, click Manage

Click Services and apps, then click Services

Find Wampapache,wampmysqld in the service (these two services represent the Apche service, one representing the MySQL database). It is obvious from my computer that the Wampapache service has not been opened.

Click to open Wampapache service

Pop-up warning

Then open "Event Viewer" in "Administrative Tools" in Control Panel and find the error message "Make_sock:could not bind to address 0.0.0.0:80
No listening sockets available,shutting down
Unable to open logs ". It means that port 80 is occupied.

Here's how to fix it:

1. Right-click My Computer: "Computer" –> "Local Disk (D:)" –> "Wamp" –> "Bin" –> "apache2.2.21" –> "conf" and "httpd.conf";

2. Find "httpd.conf" file and open it with Notepad, find "Listen 80" to "Listen 8080", then find "ServerName localhost:80" and Change to "ServerName localhost:8080" ; (This httpd.conf is)

3, save the file, and then enter the "Control Panel" –> "management tool" –> "service", find the Wampapache service and start;

4, finally restart the Wampserver program, the lower right corner of the icon from red to orange and then green, in the Internet Explorer address bar input: http://localhost:8080/, OK, now PHP development environment can be normal use!

Example

Write a code to save it as a hello.php. Save in WWW directory

At this point in the browser, tapping http://localhost:8080/hello.php can be accessed (if your configuration environment, 80 port is not occupied.) http://localhost:8080/hello.php can be accessed by knocking at this time)

If you are a project file, create a new folder and place it in the WWW directory

This time you will be able to see your project folder on the home page of your projects

Click your folder, found an error, carefully observe the URL address problem, that is, index.php configuration problems

Open the WWW directory index.php, search if (is_dir($file) && !in_array($file,$projectsListIgnore)) , judgment logic inside the A tag is the directory, in http://After the addition of localhost:8080/(my port is 8080). After you change the file, restart the next wampserver.

Then click on the Test folder, you can enter the directory

Click hello.php. You can see the results


( this time on behalf of our Apache server and PHP interpreter can run smoothly )

Then there may be classmates ask, how does MySQL use it?

MySQL command-line manipulation database in Wampserver

Left-click the icon and select Mysql->mysql Console. You can access the command line to manipulate the database at this

Because we have not set the MySQL password, so we can enter the database at this time, to do a variety of processing

Graphical interface manipulation of the database

Left click on the icon, select phpMyAdmin (ie URL localhost:8080/phpmyadmin/). You can access the command line to manipulate the database at this

At this point, we can manipulate the database graphically.

Actually, this interface is phpMyAdmin.

What is phpMyAdmin?

PhpMyAdmin is a PHP-based, web-base-style MySQL database management tool that is architected on a Web site host, allowing administrators to manage the MySQL database using a Web interface.

One of the bigger advantages is that because phpMyAdmin is executed on the Web server like any other PHP program, you can use the HTML pages generated by these programs anywhere, that is, to manage the MySQL database remotely , and to easily build, Modify, delete database and data table. It is also possible to build common PHP syntax by phpMyAdmin, which is convenient for writing web pages with the correct SQL syntax.

Wampserver to modify the MySQL password
    1. Through phpMyAdmin into MySQL, click on the "User" menu above, in the user "root" host "localhost" click Edit permissions, there is an option "Change Password", enter the password you want, such as: 123456.

    2. Now the MySQL password has been modified successfully. But phpMyAdmin is still unable to communicate with MySQL. So below we modify the phpMyAdmin configuration file

    3. Enter the Wampserver installation directory, such as c:/wamp/apps/phpmyadmin3.5.1

    4. Open the config.inc.php file. Modify approximately 16 lines $cfg[‘Servers‘][$i][‘password‘] of code = ' Your modified password ', such as: 123456

    5. And then go into the directory and open
      c:/wamp/apps/phpmyadmin3.5.1/libraries/config.default.php file, modify about 215 lines $cfg[‘Servers‘][$i][‘password‘] of code = ' Your modified password ', such as 123456

    6. Restart Wampserver. The password has been modified successfully

Zendstudio 12.5.1

Zendstudio 12.5.1:http://www.xiazaiba.com/html/30414.html

Hack tool:
HTTP://DWTEDX.COM/DOWNLOAD.HTML?BDKEY=S/1JGSYPCQ (password: 9bw7)

Installation steps

Click Zend [Email protected]_1_30414, it will automatically start downloading

Then double-click zendstudio-12.5.1-win32.win32.x86_64 to install

Follow the prompts and click "Next" until "Finish".

When the installation is complete, the desktop will automatically generate a shortcut to "Zend Studio 12.0.1", so don't open it quickly.

Click Zend Studio 12.5.1 x86 x64 universal hack Patch registration code 20150519 for decompression

Overwrite the Com.zend.verifier_12.5.1.v20150514-2003.jar in the Plugins folder under the Installer directory (the default program directory is C:Program Files (x86) \zend\zend Studio 12.0.1\plugins folder)

At this point, you can click on the icon on the desktop to develop

Example

Entering the Zend Studio software, the first requirement to select a workspace (the WWW directory in Wampserver is highly recommended!) Otherwise, an unknown error may occur later)

Click File->new->project

Fill in the Project name and click Finish

This is a popup box, click Yes. Represents open Project View ~

Right-click phptest->nest->php File

Fill in the PHP file name and click Finish

Write Hello World

Click the small triangle next to run (like the Player's button green), you can select Run mode, the first one is to output the results in the console, and the second is to open in a Web page

Select the first one, and the result is below.

Choose the second, in the case of Wamp open, we need to fill in the URL

In the circled place. Fill in your own Wamp address.

Click OK, and it will open successfully.

Xdebug

Because the wampserver contains xdebug, there is no need to install

Configuration steps Wamp End XDebug configuration

Locate the Bin->php->php.ini in the Wamp installation directory

Open it with Notepad and find "; XDEBUG Extension "Location

The original text is as follows:

; XDEBUG Extension

Zend_extension = "C:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11.dll"
;
[Xdebug]
Xdebug.remote_enable = Off
Xdebug.profiler_enable = Off
Xdebug.profiler_enable_trigger = Off
Xdebug.profiler_output_name = cachegrind.out.%t.%p
Xdebug.profiler_output_dir = "C:/wamp/tmp"
Xdebug.show_local_vars=0

The information after the modified Xdebug is as follows (in fact, the xdebug.remote_enable is placed on):

; XDEBUG Extension

Zend_extension = "C:/wamp/bin/php/php5.5.12/zend_ext/php_xdebug-2.2.5-5.5-vc11.dll"
;
[Xdebug]
Xdebug.remote_enable = On
Xdebug.profiler_enable = Off
Xdebug.profiler_enable_trigger = Off
Xdebug.profiler_output_name = cachegrind.out.%t.%p
Xdebug.profiler_output_dir = "C:/wamp/tmp"
Xdebug.show_local_vars=0

Zendstudio End Xdebug Configuration

PHP Executables Settings
Open Zendstudio, select windows->preferences->php->php executables Add new PHP executables

As shown in the following:

Click Add

name:php Version Name
Executable Path:PHP.exe Location
PHP INI file (optional): php.ini location

At this point executable path selects Php.exe in bin->php->php 5.5.12 under the Wamp directory

You can then see that other information is automatically filled in, then click Next

Then click Finish

When the configuration is complete, we can see the PHP information in our new configuration.

PHP Servers Configuration
Next select window-preference-php Servers click New

Choose Apache

Select the location of the Apche service. Bin->apache->apache 2.4.9->conf in the Wamp directory, click Next

It's all the default content and doesn't make any changes. Click Finish

Select the newly created service and click Edit

Click on Finish to configure this

Test

Select just the hello.php file, right-click Debug. Select Debug in Console

The following screen appears, which represents the success of the Xdebug configuration

PHP Development Environment Configuration: Wampserver+zendstudio+xdebug

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.