[ Zend Studio 5.x ]
[ IBM System i, i5/OS ]
The way to use Studio for i5/OS with your i5 is to use Remote Debugging. This will allow you to compose a script on your PC and run it in Studio using the php engine running on your i5. You will need to do this to access the i5 Toolkit Functions such as i5_connect(), as well as the ibm_db2 extensions, such as db2_connect().
Before you can configure Studio to connect to your i5, you must first configure your i5 to allow your PC to act as a debug host. In the Zend Core Administrator, go to the Configuration -> Zend Debugger tab. Add an allowed host by clicking the Add New Allowed Hosts icon (it represents a document with a plus sign). Enter the ip address for your PC in the new host line. Click Save Settings. Stop and restart Zend Core.
Back in Studio, go to Tools -> Preferences -> Debug tab. Click the button for Debug Mode: Server. For the server URL, enter the ip and port for your i5, in the format:
where you would use your actual i5 ip address in place of the 999.999.999.999. Port 89 is the standard port, but if you have reconfigured your ILE Apache server to use another port, you would need to change it here.
Click OK, and then go to Tools -> Check Debug Server Connection, and click OK in the dialog box that appears. If the test is successful, you are ready to debug scripts in Studio using the PHP running on your i5.
Specify the Client IP Address
Sometimes it is necessary to specify the Client IP in the Studio Debug preferences. For example, if you use VPN to provide a secure remote connection to your internal network, you may need to specify this ip address in the Debug preferences.
Assuming you are running Studio in Windows, please open a Windows Command Prompt:
Start -> All Programs -> Accessories -> Command Prompt
Run this command:
If you show multiple ip addresses, you may need to specify the specific ip address to use in the Debug preferences tab. If you are not sure which address is for your VPN, you can try each one, or check with your network administrator. If you are using an assigned ip address, you will need to check it each time you reconnect to the VPN, since the address can change.
To specify the Client ip address, in Studio go to Tools -> Preferences -> Debug tab. By the Client IP heading, click the Customized button, and enter the ip address in the associated text box. Click OK to save, and test using Tools -> Check Debug Server Connection. Remember to verify that your specified ip is an Allowed Host.
Allowed Hosts Bit Mask
By using the bit mask, you can specify a range of IP addresses to be used as allowed hosts. This can be convenient if your assigned ip address changes at each reboot, but stays within a range.
When you update the Allowed Hosts in the Zend Core Administrator Configuration utility, the zend_debugger.allow_hosts directive is updated in the php.ini file. The directive will look something like this:
The hosts need to be specified as ip addresses/bit mask, and separated by commas. The bit mask can be 32, 24, 16, or 8, as follows:
192.168.23.165/32 means 192.168.23.165 only.
192.168.23.0/24 means any address starting with 192.168.23
192.168.0.0/16 means any address starting with 192.168
192.0.0.0/8 means any address starting with 192
In the Configuration Utility, there is a list box under the heading Net Mask that allows you to select one of the bit masks for your IP address. For this example, the list box would provide the follwing options:
Excerpt: The way to use Studio for i5/OS with your i5 is to use Remote Debugging. This will allow you to compose a script on your PC and run it in Studio using the php engine running on your i5. You will need to do this to access the i5 Toolkit Functions such as i5_connect(), as well as the ibm_db2 extensions, such as db2_connect().
Original Post Date: 2009-08-23 14:09:23
Zend Studio version 5 for i5/OS - Configure Remote Debugging for i5/OS