Hello Janice,
in the beginngin I've stumbled across the same questions you have, so here's my try to sum up the steps I went through to have the debugger running fine on my WinXP, hope this helps a little.
With the recent posts there's been some confusion to what kind of form you had Apache installed, e.g.
* Apache as
standalone installation
(which might install itself directly into "c:\apache" root directory)
or
* as part of an Apache/MySQL/PHP "
package"
One of these "packaged" solutions Dmitrie was referring to is called "
XAMPP" (a freely available distribution for Windows) which installs into a "xampp" called directory to your specification.
Just lets assume for now as an example that you had indeed installed XAMPP:
In the case of being part of a "packaged" solution, any configuration files related to Apache and/or PHP are coming "pre-configured" and reside
somewhere in that directory structure where you installed it. So any existing "php.ini" file in "c:\windows" is destined to interfere with your installation and should therefore at least be renamed to "
php.ini.old" (example) or removed.
In the case of XAMPP this "
somewhere" location of the "
php.ini" file is the
xampp\apache\bin directory (which has precedence over the file "xampp\php\php.ini").
For debugging on a local WinXP platform I have the following lines in it (note that I use my laptop's static local IP address instead of "localhost", depends on whatever works best with your Apache):
[debugger]
debugger.enabled=on
debugger.profiler_enabled=on
debugger.hosts_allow=127.0.0.1 mywebserver
debugger.hosts_deny=ALL
debugger.ports=7869, 10000/16
|
There is most likely also a "
Zend" section below, so comment out all entries there (putting ";" in front of each line).
Moving on to the phpEd debugger files installation:
Note: the target directory depends on the "
extension_dir=" in
php.ini, for example:
extension_dir = "e:\xampp\php\ext\" |
There should be a larger list of "
extension=" entries in the php.ini.
In case of a PHP v
5.1 version add this line below the existing entries:
extension=php_dbg.dll-5.1.x |
This name has to exactly match the name of the to-be-used file, specific for your PHP version.
It is safe to just copy over all files from the phpEd directory "
phped\debugger\server\Win32\i686"
into the e.g. "
e:\xampp\php\ext\" directory (adapt this accordingly).
When you have applied these changes and saved the
php.ini file, I'd recommend to copy it afterwards into the "
xampp\php\" directory as well in order to have the same configuration under any circumstance.
One more hint about Apache on WinXP (SP2):
for XAMPP it is highly recommended to add below line to your Apache configuration file
(for my example here located in "xampp\apache\conf\httpd.conf") or otherwise you might not be able to open anything in your browser:
You should stop and restart Apache after having applied any configuration changes (either using the "Services" control panel or some batch files).
phpEd project mapping example
I'll stick to my example using XAMPP and static IP address, so please adapt my example to your environment accordingly.
Project
Root directory: e:\xampp\htdocs
Mapping
Run mode: HTTP mode (3rd party WEB server)
Root URL: http://mywebserver/
(this should be "http://localhost/" normally, doesn't work for me, though)
Remote root directory: e:\xampp\htdocs
Files
Default file to run: e:\xampp\htdocs\index.php
Replace this with the "entry" point of your website/php program you'd like to debug.
For example if you would like to debug a content management system residing in a subfolder "cms" with startpage "mycms.php", the entry would be: "e:\xampp\htdocs\cms\mycms.php"; or "e:\xampp\htdocs\phpmyadmin\index.php" if you'd be up to debug phpMyAdmin, you name it...
Some other hints
Menu Tools|Settings, branch Tools|Debugger
The default values set by phpEd should work in most cases.
In my case, as I don't use "localhost", I activated the "Use custom port..." option and set "Debugger host" to my static IP address, leaving the port as it was (7869).
Depending on your debugger usage, the "
Stop on first line after run" option may be better deactivated if you will debug one php file not directly tied to your start page, e.g. you'd need several clicks from the start page to get to your functionality you'd like to debug.
In case I made any mistakes, Dmitrie hopefully will point these out, thanks.
Best regards,
Tobias