In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Fedora Zend Studio how to configure the server, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
After a long time of learning Studio, so share with you, you may encounter Zend Studio problems, read this article you must have a lot of gains, here will introduce the solutions to Zend Studio problems, I hope this article can teach you more. Zend Studio is a very effective tool for our PHPer. With him, we can often get half the result with twice the effort. Today, let's record the configuration that is very useful in daily use to help more PHPer improve the efficiency of their work.
Configure the server.
If we want to be able to debug quickly, it is essential to integrate Server and Zend. There are many entrances to configure the server, for example, we can enter from Preferences/PHP/PHP Server, or we can find the configuration of Run Configuration/Server in the drop-down list of Run button. When creating a new Server, we need to specify the address for Server access. If we configure the server locally, we can set the domain name of the local project in (/ etc/httpd/conf.d/vhost). Of course, don't forget to set HOSTS (in / etc/hosts).
After the configuration is complete, if you need to debug the page, we just need to click on the "Run" icon, and then an address dialog box will pop up for us to confirm, and then click to view the running results of the code directly in Zend Studio, which is very practical for logically important pages, because we do not have to switch to the browser as usual and click F5 to refresh the results.
Create a PHP project.
I found that in Fedora, if you create a general project, the PHP function will not have automatic code hints, and then looked for a long time and did not find where to set it. But if we create the project as PHP Project, then we can enjoy the pleasure of code hints. One of the more important benefits of creating PHP Project is that as our project gets bigger and bigger, we can easily jump between classes and functions with only two keys "Ctrl+Left Click".
DEBUG .
Because it is an interpretive execution language, debugging of PHP has never been very convenient, but we can improve this situation through Zend Studio's Debug. The settings window for Debug can be found in Window/Preferences/PHP/Debug.
Some default configurations:
PHP Debugger: Zend Debugger is used by default and we need to install Zend Debugger before we can use it. Zend Studio 6.1.2 is installed by default and can be viewed through Window/Preference/PHP/Debug/Installed Debuggers. A dummy.php file is required during Zend Debugger configuration. The purpose of this file is to establish a debug script session (SESSION) on the specified server. The file name is not changed by default.
PHP Server: select the server we created earlier.
PHP Executable: select the appropriate PHP version. If you need to add a new project, you can find it in Window / Preference / PHP / PHP Executable.
* there are also two input and output character encoding configurations, which can be debugged by default.
Debugging of Zend Studio allows us to set breakpoints, execute step by step, and detect variables and parameters. Here are several different debugging methods.
PHP code local debugging (PHP Script Local Debugging).
Allows us to debug through Zend Studio's built-in Debugger, which we can use to check whether there are problems in the program before deploying to the server. Local debugging requires that the code exists in the working directory, and local debugging defaults to using the PHP Executable environment that comes with Zend Studio.
The general debugging process is to set a breakpoint in our code.
Save the file. Click the arrow next to Debug to configure Debug, or email to select Debug As... / Debug Configurations for configuration. If no breakpoint is set, you can also debug by selecting Break at first line in the configuration.
If necessary, we can also add variables to the debug code, and then the run jumps to debug view. In the debugging attempt, we can control the execution of the program by clicking "Resume", "Step Into" and so on. At the same time, we can also observe the changes of variables in the variable window.
PHP code remote debugging (PHP Script Remote Debugging).
This option allows us to debug files in the working directory using the Zend Debugger installed on the server. To use this feature, we must install Zend Debugger on the server.
The debugging process is basically similar to 3.1. now give some instructions for the Zend Debugger installation on the server.
To configure Remote Debugging, you first need to make sure that Zend Debugger is installed on your server, which you can download from the following address: http://www.zend.com/en/products/studio/downloads.
Choose the right distribution according to the environment of your system. I choose ZendDebugger-5.2.14-linux-glibc23-i386 here. After unpacking, there are several directories and a dummy.php file and other instructions. Choose the appropriate folder according to your current PHP version (what you don't know can be viewed with php-v, which requires that you have put the PHP command in the environment variable), find the path to ZendDebugger.so, and add it to php.ini in the format zend_extension=/usr/lib/php/modules/ZendDebugger.so.
Add the following two lines of code at the same time
Zend_debugger.allow_hosts=
Zend_debugger.expose_remotely=always
When you are done, copy the dummy.php to the working directory, and then restart the server. At this point, if we use phpinfo () to check the server again, we can see the Zend Debugger item.
Debug the PHP web page.
This option allows us to debug the code on the server so that we can fully test the health of the code.
URL Debugging .
It is used to debug the code on the remote server by entering a URL, so the file is not required to exist locally.
Toolbar debugging (Toolbar Debugging).
This item should be a relatively new product. At present, after installing Zend Studio, you will be prompted whether to install Firefox Toolbar. You can also easily call some debugging methods provided by Zend in the browser.
After reading the above, have you mastered how Fedora Zend Studio configures the server? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.