473,725 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Conceptual gap in debugging PHP

Windows XP, Apache 2.0.54, PHP 5.0.4, MySQL 4.1
running on my local machine

I want to migrate to more sophisticated debugging: setting breakpoints,
watching variables, step into/over, etc.

I installed PHPEdit 1.2.3.159 and discovered I have to install a
separate debugger. I downloaded dbg-2.11.32-win32-php5, copied the
file php_dbg.dll.5.0 .3 to c:\php5\ext\php _dbg.dll (I realize I'm
running 5.0.4 but 5.0.3 appears to be the latest dbg dll)

I update my php.ini file by including the following lines:
extension=php_d bg.dll

;;;;;;;;;;;;;;; ;;;;;;
; Debugger Settings ;
;;;;;;;;;;;;;;; ;;;;;;
[debugger]
debugger.enable d=on
debugger.profil er_enabled=on
debugger.hosts_ allow=localhost
debugger.hosts_ deny=ALL
debugger.ports= 7869, 10000/16

I restarted Apache.

I wrote the following script in PHPEdit:
<?php
debugger_on(loc alhost);
echo "hello world";
?>

When I click the "Run script with debugger" button I get:
An internal error has occured with code 0; Check if DBG listner is
launched

I clicked debug->Start Listner (nothing obvious happened).

* I have read all the help with PHPEdit and I cannot find a simple
example. Am I missing the boat completely? Do I browse to the php
file and the debugger "springs" into action? Am I dreaming to think
you can do with PHP what I'm use to using my Borland C++ Builder? Do I
need to start drinking *before* noon?

Many thanks...

Jul 21 '05 #1
2 1570

"Dale" <da***********@ gmail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
Windows XP, Apache 2.0.54, PHP 5.0.4, MySQL 4.1
running on my local machine

I want to migrate to more sophisticated debugging: setting breakpoints,
watching variables, step into/over, etc.

I installed PHPEdit 1.2.3.159 and discovered I have to install a
separate debugger. I downloaded dbg-2.11.32-win32-php5, copied the
file php_dbg.dll.5.0 .3 to c:\php5\ext\php _dbg.dll (I realize I'm
running 5.0.4 but 5.0.3 appears to be the latest dbg dll)

I update my php.ini file by including the following lines:
extension=php_d bg.dll

;;;;;;;;;;;;;;; ;;;;;;
; Debugger Settings ;
;;;;;;;;;;;;;;; ;;;;;;
[debugger]
debugger.enable d=on
debugger.profil er_enabled=on
debugger.hosts_ allow=localhost
debugger.hosts_ deny=ALL
debugger.ports= 7869, 10000/16

I restarted Apache.

I wrote the following script in PHPEdit:
<?php
debugger_on(loc alhost);
echo "hello world";
?>

When I click the "Run script with debugger" button I get:
An internal error has occured with code 0; Check if DBG listner is
launched

I clicked debug->Start Listner (nothing obvious happened).

* I have read all the help with PHPEdit and I cannot find a simple
example. Am I missing the boat completely? Do I browse to the php
file and the debugger "springs" into action? Am I dreaming to think
you can do with PHP what I'm use to using my Borland C++ Builder? Do I
need to start drinking *before* noon?

Many thanks...


I have been using PHPEdit for several years now, so here are some tips:
(1) Copy php_dbg.dll-5.0.3 to the php5/ext directory
(2) Modify your php.ini file to enable this extension thus:
extension=php_d bg.dll-5.0.3
(3) Start PHPEdit. Select Debugger->Debugger Settings. In the tab at the
bottom marked 'HTTP' set the following:
- HTTP server root URL: http://localhost/
- Local root directory: C:/Apache2/HTDOCS (or whatever you have called it)
- Remote root directory: (same as above)
(4) When you want to start debugging a script that you are running from your
web browser you must insert a debugbreak() command. This will activate the
debugger when it hits that line. You can then use the step in/out/over
options.

The debugger should be installed automatically when you install PHPEdit, and
when you start PHPEdit it should automatically start the listener which
inserts a little icon (a radio dish) into the system tray.

Hope this helps.

--
Tony Marston

http://www.tonymarston.net

Jul 21 '05 #2
Think I got it!

The trick was that, as Tony pointed out, an install tree of php.5.0.3
came with the installation. I just changed my apache config file to
load that php, rather than the 5.0.4 that I had installed, made a few
changes to the php.ini file, and it seems to be working.

Many Thanks,,,,

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3383
by: mACKnIFE | last post by:
Hi list! I've just finished reading the nice book: "Data Modeling and Relational Database Design Volume 1 - Student Guide", by Jan Speelpenning, Patrice Daux and Jeff Gallus, published by Oracle University. I really like the way they do their drawings for their conceptual models (see below for the features of Oracle's book's conceptual models). In fact, it's a notation that could apply to any RDBMS and that'S what I'd like to do. But I...
4
1743
by: Daniel Ladd | last post by:
Hi, I have a problem with a conceptual graph in c++. I have a oist of structures like this: typedef struct Conceptual { char* Name;//Rappresenta la parola da mettere nel grafo Conceptual* Next; Conceptual() {Next=NULL; Name=NULL; }
3
1334
by: M Davidson | last post by:
Hello all, Thank you in advance for any guidance. (The standard form/subform won't work because my users will mess up and not enter a value for a category. I don't mean to speak ill of them... I'm just being realistic.) Can I make a form display 30 times in a row (and then stop), each time creating a new record, but with each new instance of the form, increment the
1
1393
by: kuhni | last post by:
Hi everybody! Writing this time, I'm really desperate. Basically, I have a conceptual problem of how to solve a certain "problem" in MS Access 97. General objective: In order to categorise certain products, I need to know whether a specific product has been promoted in a specific week. To find this out, I have a linked table, which has all promotions for each period
0
1009
by: shirsoft | last post by:
I having some conceptual prob switching to c# I want to make a bitmap obj, and pass it to my func which will actually set its width, height and data ptr. But i am at loss as to how to do it Specifically there are 2 issues; 1. I tried setting the w,h,and Scan0 using UnlockBits(BitmapData); but the bitmap remains unaffected. 2. I can't access the default const of Bitmap. This forces me to
0
1362
by: omyomyomy | last post by:
i have been set a task which i having problems with. i have to carry out the task of: The task is expected to be completed before the end of the second laboratory session. A full account on the design at both conceptual and physical level, database normalisation, as well as the database implementation and results on table creation, data insertion and requested data searches, are to be presented in a form of a technical report (laboratory...
3
285
by: M_Mann | last post by:
Hello, Pls excuse if you consider this off-topic. Conceptual artists seek programmers here. We are authors of "Exhibition of Living Managers" (MANAGEX, www.managex.info) which is is global conceptual art project, performed in world's leading contemporary art centres. Art objects at MANAGEX are real employed managers, who volunteer to exhibit themselves in a galery setting. Our new project is "Exhibition of Living Programmers"
12
1309
by: RSH | last post by:
I am still trying to grasp the use of real world Objects and how to conceptualize them using a business scenerio. What I have below is an outline that I am wrestling with trying to figure out a class structure:\ Top level Objects: Companies Employees
6
1640
by: cppnow | last post by:
Hello. I have a strange conceptual problem I'm trying to think about. I would like to build a library that allows the user to do the following: 1) User defined types: The user defines their own types as needed for their particular application and registers them with the library. class ClassA {};
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8097
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.