These instructions are for new installs of WebSmart 11.3 ILE, PHP (on IBM i) and Clover (or higher) only. Please log in to myFreschesolutions.com to access the New Features and Upgrade Guide as well as the User Guide. If you don't have an IBM i, use these instructions to install WebSmart PHP on your PC.
Step 10: Set up the PHP Debugger (for single or multiple users)
This is only required for WebSmart PHP installs. If you intend to develop PHP programs, you may want to use WebSmart's PHP debugger. If you will only use WebSmart ILE, you can skip this step.
The install directory for Zend Server varies depending on the version. Here is a list of where each version installs to.
|Server Version||Install Directory|
|Zend Server 5||/usr/local/zendsvr/|
|Zend Server 6 to 8||/usr/local/zendsvr6/|
|Zend Server 9 and up||/usr/local/zendphp7/|
We're going to use paths relative to the install directory in these instructions to try to prevent confusion (e.g.
etc/php.ini would refer to
/usr/local/zendphp7/etc/php.ini for Zend Server 9).
If you're running Zend Server 9 or later you can skip step 1 as xdebug.so is included with these versions of Zend Server.
Copy the xdebug.so file to your Zend IFS directory. When you install WebSmart on the server the file xdebug.so is created in your IFS, in the folder
Open your IFS and copy the file xdebug.so that matches your version of PHP to
lib/debugger/. You will add configuration details to this file in Step 4.
Steps 2 and 3 are only required if you are setting up the PHP debugger for multiple developers. If you are setting up the debugger for a single user, continue with step 4.
Start pydbgpproxy.exe on the proxy server machine. To run the PHP debugger for multiple developers you must set up a a thirdparty proxy server for the WebSmart IDEs to connect to. This is typically installed on a server PC that is always running.
Your WebSmart IDE installation folder includes the debug proxy server in a folder by default installed to
C:\esdi\websmart\bin\pydbgpproxy\. Copy the folder pydbgpproxy to the machine you will set up as the proxy server.
Within this folder, we also include a sample batch file named pydbgpproxy.bat that makes it easier to launch the proxy server. Open a command prompt and run the sample batch file pydbgpproxy.bat. This file runs this command string:
pydbgpproxy -i :9001 -d :9000
This starts the proxy listening for Xdebug conversations from the PHP server on port 9000 and listening for WebSmart IDEs on port 9001.
Configure WebSmart PHP's initial settings. The WebSmart PHP debugger is by default configured in the IDE for a single user. To configure the debugger for multiple users, launch the WebSmart IDE and go to the Tools/Options menu.
Select the PHP/Debugging section to present these options:
For multi-user debugging configuration, these values are important:
Debugger IDE key The IDE key can be anything, as long as it is unique for each IDE that is connecting to the proxy server. Use Proxy Server Check this option to use a proxy server for the debugger, to enable multiple users. Proxy Address The IP address where the proxy is running. If you are hosting the debugger on your PC, use 127.0.0.1 Proxy Port The port that the proxy is listening on.
These options are discussed in detail in the section "PHP Debugging" on page 1224 of Chapter 29 of the WebSmart User Guide.
Update your php.ini file. In your IFS, open the file
etc/conf.d/xdebug.inifor Zend Server 8 or later). Add these lines (omit
[xdebug]if adding it to xdebug.ini):
Confirm the filename in zend_extension matches the name you use when you copied xdebug.so.
If you're running Zend Server 9 or later, modify the line for zend_extension to
In your php.ini or xdebug.ini configuration, set the xdebug.remote_host value. The single and multi-user setup instructions here are slightly different:
- Single User Setup. To configure the PHP debugger for a single user, replace the value IP_ADDRESS with the IP address of the PC on which you are running WebSmart.
- Multi User Setup. To configure the PHP debugger for multiple users, replace the value IP_ADDRESS with the IP address of the PC on which you are running the proxy server.
One way to find your IP address is by going to Start > Control Panel and selecting Network Connections. In the list of network connections, right-click the Local Area Connection icon and select the Status option. In the Support tab you can find your IP address. Note that these instructions may vary by PC operating system. You can also just ask your Network Admin!
Now you can save and close php.ini.
etc/conf.d/debugger.ini, disable the Zend debugger. Zend's debugger only works with Zend Studio and can't be used with other IDEs. To disable Zend's debugger, find the line below in the file (if present) and insert a semi-colon at the start of it to comment it out:
Note: If you can't find this file, try looking for this line in
If you haven't already, end and restart the WebSmart IDE.
Restart your WebSmart HTTP server.
You can use the following commands on the IBM i to stop and start the server:
ENDTCPSVR SERVER(*HTTP) HTTPSVR(WEBSMART)
STRTCPSVR SERVER(*HTTP) HTTPSVR(WEBSMART)
Confirm your settings. To confirm your settings, you can execute the phpinfo function.
An easy way to display this information is by creating a new WebSmart PHP program using the "A Simple Page" template and inserting the line "
phpinfo();". Then press F6 to save, generate, and run your program.
At the phpinfo page, search for "xdebug.remote_enable"; this option should be set to On. Then search for "xdebug.remote_host"; this should show your computer's IP address.
? At the phpinfo page, search for "xdebug.remote_enable"; this option should be set to On. Then search for "xdebug.remote_host"; this should show your computer's IP address.
At this point, you are done with the installation and configuration of WebSmart and/or Clover. The next two steps contain useful trouble-shooting and educational information accordingly.