Zend Studio Remote Debugging PHP

Source: Internet
Author: User
Tags download zend php write phpinfo zend

zendstudio configuration of SFTP, combined with Zend Debugger for remote debugging of PHP code2012-12-24 09:14 1780 people read comments (0) favorite reports Classification:PHP (+)

I. Configuration of SFTP

Feature Description:

Develop PHP project in Zend Studio, modify *.php file automatically, modify server side corresponding *.php file (should be the corresponding file in any format, not just PHP)

Farewell need to click on the Esftp plugin to upload files to the server-side history, improve development efficiency

Configuration process:

1. Local and server Deployment project code

2.zend Studio Configuration Ssh/ftp

3. Test Pass

Open dry:

1. First create/import your own project in Zend Studio (the project needs to correspond to the directory structure on the server, the server deployment code is slightly)

2. Right-click a PHP project in the PHP Explorer window (i.e. Project Code window)

-->properties

-->remote Server Support

--Select Enable Remote connection properties

-->manage

Host Name: Set Connection Note name

System Type:ssh/ftp

-->finish

-->host Name: Server IP Port: port number

Username: Account Number

Password: password

Initial directory: Server project code corresponding path (for example:/var/www/html/project name)//path must already exist, fill in the correct, otherwise will also report connection failure

-->test Connection test the success of the Unicom return connection successful

-->finish

Project directory:/(relative path, general/)//path must already exist, fill in the correct

Upload files:on Save (sync to server when local PHP is saved)

-When the server has no code, you can choose Yes to upload all local code to the server, the server has already deployed code to select No

--Take care

3. Test open your project under any PHP write any content to save, and then to the server to compare whether this file is consistent with the local.

Additional precautions:

1.8.0 SSH or FTP the first time you use the default synchronization of all directories, you do not choose to synchronize all the directories.

This will not be synchronized with all directories, and you will save a file in the future.

2.8.0 It's very efficient for you to have a development machine.

3. Not recommended as an on-line tool to use, network problems need to try several times test connect can be

Zend 8.0 and 6.0 in the case of a panic, the main points

1. When uploading files to the server process, the network is not stable with packet loss

2. When uploading files to the server process, a computer program suddenly consumes too much memory such as some program updates

3. When uploading a file to the server process, you re-save a or upload a file

Do not like to use Zend with secure CRT directly under the SSH with the VI programming, hand-cooked far more efficient than Zend, because in the computer room or Linux environment no one to you installed Zend

Second, the combination of Zend Debugger PHP code remote debugging

1. Download and install Zend Studio to Windows. For example Zend Studio 8.0.

2. Download Zend Debugger to Linux. Note that the system is differentiated, with 32-bit and 64-bit.

3. Expand the compressed package, for example, TAR–ZXVF zenddebugger-5.2.15-linux-glibc23-x86_64.tar.gz.

4. Use Phpinfo to view the PHP version and enter the corresponding directory according to the PHP version. For example, the PHP version is 5.2.5, then enter 5_2_x_comp/. Locate the zenddebugger.so, and copy to the directory that Zend can access, such as/usr/lib64/php/modules/.

5. Copy the dummy.php file to the root directory of the Apache virtual server. If there are multiple virtual hosts, the root directory of each virtual host is placed below.

6. Locate the php.ini file in the system. Note that there may be more than one php.ini file, note the distinction. For example, in my system,/usr/local/php/lib/php.ini is valid, and/etc/php.ini is invalid. sudo vim php.ini, add a few lines at the end:

[Zend Debugger]

zend_extension= "/usr/lib64/php/modules/zenddebugger.so"

Zend_debugger.allow_hosts=127.0.0.1/32,192.168.33.72/24

Zend_debugger.expose_remotely=always

Online Find the Description:

# Load Debugger

Zend_extension=<full_path_to_zenddebugger.so>

# Configure Authorization List

Zend_debugger.allow_hosts=

# The IP address can be in CIDR format, or you can use the prefix

# multiple IP addresses used between <strong> comma </strong> delimited

# Configure remote Authorization (set this if you want Zend Studio Browser toolbar to determine which pages can be debugged)

Zend_debugger.expose_remotely=always

# Valid values can be: Always, never, allowed_hosts

7. Restart Apache

8. Use the PHP–M command or use the Web page to view Phpinfo to see if the Zend Debugger extension has been successfully installed.

9. Open Zend Studio 8.0, select the Run->debug URL, enter the URL of the remote virtual host, for example http://www.abc.com/(modify the Windows host file in advance), tick the break at the FIR St Line, click Debug, so the code will automatically stop to the first row.

Zend Studio Remote Debugging PHP

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.