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.
Internal Web Server 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.
External Web Server mode uses five main components - web server, PHP, dbg, dbg Listener, and PHPEdit. External Web Server 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.1.2 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.
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
extension=php_dbg.dll
extension_dir = "[PHP install directory]\ext"
[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
extension=php_dbg.dll
[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
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
extension=dbg.so-5.1.2 [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
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.