Warning: You're looking at a styleless page because your browser is ignoring CSS styles. You're probably using a very old browser, or you disabled CSS support by purpose. We suggest you to download a modern browser such as Firefox or Internet Explorer.
Local CGI mode uses four components - PHP, dbg, dbg Listener, and PHPEdit. It has the advantage of not requiring a web server to operate. On a typical installation of PHPEdit, no further programs need to be installed, and all configuration can be done from the IDE.
In the Local CGI tab, CGI PHP executable should be left at the default setting, normally C:\Program Files\WaterProof\PHPEdit\1.2\php-5.0.3\php-cgi.exe.
If PHP was not installed along with PHPEdit, or if the user wishes to use a different version of the PHP CGI executable, this setting should be set to the location of php-cgi.exe. If the defaults setting is not used, PHP and dbg will need to be manually installed and configured using the instructions in the HTTP Configuration section below.
HTTP mode uses five main components - web server, PHP, dbg, dbg Listener, and PHPEdit. HTTP mode can be used on one machine, or on two. Using two machines places the web server, PHP, and dbg on the server machine, while dbg Listener and PHPEdit are on the client machine.
For these instructions it is assumed that the web server is Apache HTTP Server with PHP 5.0.3 installed. It is also assumed that the user has installed and configured Apache and PHP correctly, as those installations are beyond the scope of this document.
It is recommended to use the same version of PHP for both Local CGI and HTTP debugging, however, this is not required.
To test installation it is recommended to create a php file called info.php that contains the following:
<?php echo phpinfo(); ?>
Using one machine is the most secure way of testing your scripts, and the most convenient method for editing. However, since most websites are hosted on Linux/Unix based machines, this may not represent the most accurate testing environment.
[PHP install directory] is typically c:\php or c:\php5
[PHP ini path] is most commonly c:\windows
Edit [PHP ini path]\php.ini and add the following to the section labeled Windows extensions:
extension=php_dbg.dll
Verify that the following line is in php.ini, or add if necessary:
extension_dir = "[PHP install directory]\ext"
Add the following to the end of php.ini:
[debugger] debugger.enabled = true debugger.profiler_enabled = true debugger.JIT_enabled = true debugger.JIT_host = clienthost debugger.JIT_port = 7869
[PHP install directory] is typically c:\php or c:\php5
When using two machines, PHPEdit and dbg Listener will always be on a Windows machine. Apache, PHP, and the dbg module may be on either another Windows machine, or a Linux machine. Care must be taken to configure dbg to only connect to trusted clients. Otherwise, important information about the code could be exposed to the public.
Perform the following steps on the server.
[PHP install directory] is typically c:\php or c:\php5
[PHP ini path] is most commonly c:\windows
Edit [PHP ini path]\php.ini and add the following to the section labeled Windows extensions:
extension=php_dbg.dll
Add the following to the end of php.ini:
[debugger] debugger.enabled = true debugger.profiler_enabled = true debugger.hosts_allow=host1 host2 host3 debugger.hosts_deny=ALLThe debugger.hosts_allow setting should contain the IP addresses of all of the client machines that will be allowed to debug the scripts.
Perform the following steps on the client.
[PHP install directory] is typically c:\php or c:\php5
In the Local CGI tab, CGI PHP executable should be left at the default setting, normally C:\Program Files\WaterProof\PHPEdit\1.2\php-5.0.3\php-cgi.exe.
If PHP was not installed along with PHPEdit, or if the user wishes to use a different version of the PHP CGI executable, this setting should be set to the location of php-cgi.exe on the client machine. If the defaults setting is not used, PHP and dbg will need to be manually installed and configured.
Note: If the server and client are running on the same network it may be convienant to map the server's root directory to a network drive. For instance, if the server's root directoy is \\Server\apache\htdocs\ and it is mapped to drive z:, the setting for Local Root directory would be z:\. When set up this way, changes to the local copies opened by the debugger will modify the scripts directly on the server. Without this network drive mapping, after editing a script, it must be uploaded to the server before further debugging.
Perform the following steps on the server.
[PHP extension directory] is typically /var/php/extensions
Edit /etc/php.ini (on some installations this file may be in a different directory) and add the following:
extension=dbg.so-5.0.3 [debugger] debugger.enabled=on debugger.profiler_enabled=on debugger.hosts_allow=host1 host2 host3 debugger.hosts_deny=ALL debugger.ports=7869, 10000/16The debugger.hosts_allow setting should contain the IP addresses of all of the client machines that will be allowed to debug the scripts.
Perform the following steps on the client.
[PHP install directory] is typically c:\php or c:\php5
In the Local CGI tab, CGI PHP executable should be left at the default setting, normally C:\Program Files\WaterProof\PHPEdit\1.2\php-5.0.3\php-cgi.exe.
If PHP was not installed along with PHPEdit, or if the user wishes to use a different version of the PHP CGI executable, this setting should be set to the location of php-cgi.exe on the client machine. If the defaults setting is not used, PHP and dbg will need to be manually installed and configured.
Note: If the server and client are running on the same network and the server is running samba, it may be convienant to map the server's root directory to a network drive. For instance, if the server's root directoy is \\sambaserver\var\www\ and it is mapped to drive z:, the setting for Local Root directory would be z:\. When set up this way, changes to the local copies opened by the debugger will modify the scripts directly on the server. Without this network drive mapping, after editing a script, it must be uploaded to the server before further debugging.