Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Debugging PHP4 With Dbg, Gdb, And Ddd


I want to create a debugging environment for PHP. I running Debian
Woody and installed PHP4 from Debian's packaging system.

I downloaded precompiled DBG from the webside and placed dbg.so in the
same directory as mysql.so, Since MySQL works under PHP, I'm assuming
I've got the right directory. I've updated php.ini per the DBG website.

phpinfo() reports:

1. --disable-debug was part of the ./configure command.
2. ZEND_DEBUG=disabled, but the report does indicate that dbg is part
of the Zend engine setup.
3. In the section on dbg, it reports dbg version 2.11.23, linked as a
shared library; profiler compiled,enabled; debugger.enabled=on; etc.

If I want to debug with dbg and gdb, do I have any options other than to
recompile PHP omitting the "--disable-debug" switch?

Once I do (or don't do) that, how does one hook gdb into dbg?

How do most PHP developers who don't own a commercial IDE debug their
programs?




View Complete Forum Thread with Replies

Related Forum Messages:
Debugging PHP
My boss and I are fairly new to PHP and would love to hear suggestions on how to debug PHP with ease and efficiency. Thank you for your time and consideration.

View Replies !
PHP Debugging
I have been programming in php for few years but have never used anything but free hosting to run php. My programming requirements have evolved and now I am in need of a debugger to understand how code is functioning (so I want to be able to step through the lines of code, watch variable values and object contents etc.)Code:

View Replies !
Debugging In Php
What is the best way to debug in php? What is the best way to see the value of your variables? I'm coming from the Flash MX world, and in there, you can do a trace() and it traces out the value of your variables to the message window. PHP has print and echo but that seems to mess up the page layouts too much. Is there a way to print variables to a log file?

View Replies !
Debugging PHP In OS X
if there are any other mac users out there who have managed to get a debugger up and running in OS X. Im not finding any decent tutorials that let you use a stand alone debugger (i.e. not integrated with zend studio or komodo). I generally use textmate for
editing and would like to find something i can use along with that.

View Replies !
Debugging
how to set the error handling in the ini file to E_ALL, E_ERROR, E_WARNING etc.

We had everything setup and working then we had to restart the server and it for some reason, reset the ini file back to the way it was. SO we went back to the ini file and set it back up but now it does not work.

We even set it to just E_ALL. And nothing. We just get a white page. Code:

View Replies !
Help Debugging Query
I was wondering if anyone can help me here? The following code sends out an email alert to members of my site when a matching result is found....

View Replies !
Debugging Query
I can't for the life of me work out why I keep getting this error:

ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE username='billybob')' at line 76 PHP Code:

View Replies !
Installation Debugging
1)I get startup error messages:
"Unable to load dynamic library c:phpphp_curl.dll - the specified
file cannot be found"
although the file is very much there at exactly that location
Not only for this file but for many extension files like php_mysql.dll,
php_oracle.dll, php_mssql.dll, php_exif.dll etc.

2)the extensions_dir setting is "c:php" without an ending backslash.

3)The php.ini file is residing at c:php

4)The php.ini file in c:windows has all extensions disabled so it does
not look as though that php.ini file is the source of the messages

5)There is a extension entry for php_win32api.dll which also gives a
not found error.
Is it the older version of php_win32std.dll, php_win32service.dll and
php_win32scheduler.dll files which are present but
their names are not there by default in the php.ini ?

************************************************** ************************************************
6)How do I debug PHP like you can debug Java in Eclipse or NetBeans and
C/C++ in MS Visual Studio - with breakpoints and stepping?
************************************************** ************************************************

7)database access through odbc works.

8)How do I install PHP as both a CGI extension under Apache 2.0.5x and
as a module (php5apache2.dll with a LoadModule in httpd.conf) - Apd
which is a part of PEAR requires that php be installed as a CGI binary
- is apd good for interactive debugging?

View Replies !
Debugging In Komodo
Does anyone use Komodo from activestate to write their PHP? If so, have you used the debugger? I'm new to debugging with an actual debugger (I'm kinda old school and have always relied on echo and print...). When I'm running it, the debugger stops at EVERY SINGLE line of PHP code... I'm debugging a pretty long script and it just takes WAY too long. Is there a way to tell the debugger to just execute the code up to a certain point?

View Replies !
XOOPS Debugging
I am working with this XOOPS CMS and started having problems. Everything was working fine all pages, modules displayed, then it just went blank.

Now I tried doing some trouble shooting following the advice on their site about what to do if I am ending up with blank pages. The thing is I cannot even get to the admin login page to set the debugging options from there. Anyway I changed the debugging options via the database and still no errors are being displayed.. just the blank page.

I look at the error logs form the server and went through each module folder and looked to see if there was any error logs. 2 of the error logs state that that there was an unexpected $ in one the XOOPS common.php file and it pointed out the line number.

I have looked there and see nothing and I know that the error does have to occoured there it's just where the script halted. My question is that the error could have orignated from any module.. How can I get some errors to show on screen so i ca do a trace. I here it could be possible via .htaccess.

View Replies !
Debugging FPDF
Does it have a debugging mode? I keep getting "... data already sent".

View Replies !
PHP Error Debugging
I have been working with PHP for a while, but never gone through getting a good debugger - or debugging methodology.

Can someone send me links to suggestions and possibly good (free) software?

I am not hosting the website, so I cannot tell it to report all errors directly from the installation.

I tried error_reporting(E_ALL ^ E_NOTICE); on top of the page, but that does nothing. So it always takes a while for me to fix the errors.

View Replies !
Debugging My Functions
I wrote this code to validate a few fields on a form which will be submitted when a customer wants a refill of their prescription medication.

The first problem is none of the functions actually work properly. Both of the functions that validate names should throw an error if a name has less than 2 characters inputted in the field. Yet, it doesn't throw any errors if I insert only one letter in the field.

The next function should verify a phone number. I can put a phone number with 6 numbers in it and it won't throw an error even though it is to short based on my regular expressions requirements which says it needs 7 to 14.

The last function doesn't throw an error if I put <a href="bob"> in the comment box and it should throw an error if it finds a <a> tag. Code:

View Replies !
Debugging Error
I'm getting this error message after submitting a form in PHP:

Fatal error: Call to undefined function sql_errno() in /home/jplane/
certcent/phpweb/phpnuke/html/admin/modules/quiz.php on line 542

It's suppose to write information to some sql tables. I'd like to
further debug this message, maybe in mysql?

View Replies !
Installation, Debugging
(I am posting from a web interface- google groups, yet the message is
not appearing on the group, so am posting again, if you get two of the
same kindly ignore one)

1)I get startup error messages:

"cannot load c:phpphp_curl.dll - the specified file cannot be found"
although the file is very much there at exactly that location
Not only for this file but for many extension files like php_mysql.dll,
php_oracle.dll, php_mssql.dll, php_exif.dll etc. Code:

View Replies !
Debugging Charset
We've been building a pretty big web app here for internal use. SMS text messages come in from an aggregator and are stored in a MySQL 4 db. Our operators then deal with them using a web interface. The db is queried using PHP4 and the results output as XML which is then transformed using XSLT into XHTML.

Now, in our testing environment everything works just fine. However, when we try and run it with actual live data, any incoming SMS message that contains a non-ASCII character breaks the system at the Sablotron stage (invalid token). Now the aggregating service is sending us the incoming messages UTF-8 encoded. The XML and XSL is all set up to be UTF-8.

However, somewhere along the lines something is getting screwed up so that Sablotron barfs (typical examples are pound signs or euro signs). I'm having a hard time debugging this because as far as I can tell everything is set to be using UTF-8 by default. Clearly something isn't (MySQL possibly). I'd really appreciate some pointers for things to check.

View Replies !
Debugging Advice
syntax highlighting what methods or programs do people on here use to debug their php? I'm using linux so foss programs that run on both win and linux.

View Replies !
Debugging Rapidly
is there any program which shows all variable assignments during the running of a php script. im getting sick and tired of using echo $myvar to debug.

View Replies !
Debugging Scripts The Easy Way.
i found some ways to debug scripts like useing the error_reporting( E_ALL );
which will display any small bugs in your script and give you a warning about them.

but the most common of them is ones like this:

Warning: Use of undefined constant _jobdepartment - assumed '_jobdepartment' in c:foxservwww\_roguemodulesphprofessionadminindex.php on line 82
Warning: Use of undefined constant _joblisting - assumed '_joblisting' in c:foxservwww\_roguemodulesphprofessionadminindex.php on line 82

the line to fix is this: PHP Code:

View Replies !
Does Anyone Know Any Good Debugging Techniques.
Does anyone know any good debugging techniques. Especially for mysql
queries, and global variables. My php IDE's (Glimmer, and Bluefish)
supposedly have debugging functions but I cant figure out how they work.
So any help would be excellent.

View Replies !
Debugging Blank PHP Page.
How can I debug a blank PHP page? I've turned on all logging in my
php.ini, bu the page just turns blank.

View Replies !
Outputing Headers For Debugging
I am wondering if there is a way that I can output all of the information of which gets sent to a header within php?

As I have got a problem where I can not set a cookie due to information being sent to the header and I have worked out where about in the script this is happening and have disabled all major coding (apart from when I am starting a new function) but I am still getting this problem. So I need to output all header information to see if I can work out what I am missing.

View Replies !
PHPEclipse And Remote Debugging
I'm trying to get remote debugging working with phpeclipse. I think i've
installed
everything correctly, and the debugger in eclipse starts, but breakpoints
are ignored
and nothing seems to happen :(

Is there some way to simply check if the debug plugin for php is correctly
installed
(can I use dbglistener.exe to check if something happens when a php script
is executed?)

In the PHP Debug log i get a PHPLaunchingPlugin.InternalErrorOccured with
the following
stacktrace:

java.net.SocketException: Software caused connection abort: socket write
error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at
net.sourceforge.phpdt.internal.debug.core.PHPDBGPa cket.sendPacket(PHPDBGPacket.java:40)
at
net.sourceforge.phpdt.internal.debug.core.PHPDBGIn terface.continueExecution(PHPDBGInterface.java:184 )
at
net.sourceforge.phpdt.internal.debug.core.PHPDBGPr oxy$PHPLoop.run(PHPDBGProxy.java:384)

Is there something i can do to fix this? It could be that this is why it
doesn't work.

My files are all on the server, I open them from there with eclipse (so no
local copy's).
Webroot on server is c:/inetpub/wwwroot
Share to this path on client is called Y:

My debug configuration:
environment > remote debug set to on
working directory set to: Y:kernel_3site
remote sourcepath set to c:/inetpub/wwwroot/kernel_3/site

My setup:
client (ip 192.168.1.200)
eclipse 3.0.1
phpeclipse 1.1.3
DbgListener.exe (from dbg-2.11.32-cli-w32 package) is running

server (ip 192.168.1.100)
apache 1.3.29 (installed via nusphere tech platform 3.2)
php 4.3.4
dbg v2.11.32 (shows in php_info(), so it should be installed correctly)

View Replies !
Debugging SOAP Web-Service In Php.
I am trying to debug a client/server combination using NUSOAP,
but I am not able to find a way to do that!

I have spent days playing with Zend, but I haven't found a way to debug
it without a start page.

How can I do this?
(Know there are some other environments, but it takes a long time to
figure them out, while keeping what I have).

Also, is there some simple way to VIEW and ANALYZE what goes throug the
http-port?
Tried Ethereal, but it doesn't work locally with XP.

Can use both IIS and Apache, PHP 4* and 5*

View Replies !
Formal Debugging, Why Do You Think It Doesn't Exist?
First of all, I feel that the debate between ASP and PHP is irrelevent, I think they are different enough that there is no comparrison or need for comparrison. However, what the article did bring up about debugging made me wonder why PHP doesn't have any. Why do you think the Zend Engine doesn't spit back more information for debugging?

I have never really found a need for more debugging options in PHP, good old "echo" and trial and error work for me, but I can imagine that it would be nice for those who are new to the language etc... Besides, would it take that much more time to include some kind of decent debugging? Just wanted to see what the community had to say about it.

View Replies !
Debugging - Conditional Expression
I have a conditional expression that looks like this:

if (($mtf->nntp_id || $mtf->mlist_id) && !$mtf->mlist_msg_id) {


I want to get it to output the values of $mtf->nntp_id and $id variables.....

View Replies !
Debugging Column Logic
In a table displaying data on products in a given category I am trying to print table columns only if that column will be needed. However not all products in the category will have data for every cell, so for each product I want to display a table cell with data if it exists, otherwise display an empty cell. PHP Code:

View Replies !
Debugging DomDocument Objects
What is the best way to view the contents of a DomDocument Object? print_r() and var_dump() just give me empty objects. Here is my code, if you're curious:

$dom = new DOMDocument();
$dom->loadHTML("<html><body><p>Hello World</p></body></html>");
print_r($dom);

View Replies !
Debugging Slow Sites?
In my new job I have inherited quite a large and complex (an in a few places badly written) PHP & MySQL website. It also handles a lot more traffic than I have been used to in my other jobs.

The problem I have now is chasing down performance bottlenecks and slow queries, and other glitches that cause the site to hang, be unavailable or have weird load average / memory usage spikes on the webservers and the mysql servers

I was wondering what other people use for sniffing out these problems, I was thinking about Zend platform, but that is looking like it might be too expensive (we are mostly advertisement funded, so margins are low despite high traffic).

View Replies !
Debugging / Logging Library
I could use some direction / suggestions on where to begin a debug / logging library. Basically instead of

mysql_query($sql) or die('query failed '.mysql_error());

and anywhere else where mistakes can happen I want that event logged (in detail) to disk return 0 to the calling function and let the application deal with what it wants to tell the user / how to crash. Specifically any articles, tutorials or libraries that already do this type of thing.

View Replies !
Debugging Message Script
I'm working on a gmail like private messaging script is anyone interested in testing it with me and giving me feedback?

View Replies !
Debugging - See A List Of All My Variables (without Specifying Them All By Name).
I have windows. I do all my coding on my local PC. I upload my files using FTP onto my Linux host. From there, I call my page and see if it worked, what changes to make, etc. I make changes on my PC, upload them again, etc.

Right now, I would just like to see a list of all my variables (without specifying them all by name). How can I do that? I don't understand how the debuggers work and I'd be willing to learn, but it seems as though they have to be installed on the host. Code:

View Replies !
Need Third-party Debugging Tools
PHP has some pretty funky error messages:

"parse error, unexpected T_IF";
"Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING";

Humans often see these - shouldn't they be more human readable and why are there no stack backtraces? When a problem arises, I am often interested in knowing where the problem code was called from.

It seems as though - with PHP - I need third-party debugging tools.

View Replies !
Class With Some Debugging Functions
I'm writing a class with some debugging functions, but it doesn't work. This is a simplified version, but the error is still showing up:

Fatal error: Using $this when not in object context in * on line 20

<?

class A {

var $debug = array();

function setDebug ($var) {
$this->debug[microtime()] = $var;
}

function getDebug () {
return $this->debug;
}.

View Replies !
Debugging This Spell Checker
I know I can do more with it, but that's all I want right now. For some reason it thinks every word is misspelled. Eventually I'll want to highlight mispelled words and next to the word have a drop down box with all the possibilites in it. PHP Code:

class spell_checker {

        var $personal_path = "/speller/";
        var $skip_len      = 3;
        var $mode = PSPELL_NORMAL;

        var $pspell_handle;
        var $pspell_cfg_handle;
        var $personal = false;
...

View Replies !
Debugging Php Mail - On Fedora, Using Php5
On Fedora, using php5. The mail() function returns a success - but the
mail itself is not actually sent.

How do I go about debugging this? Do I need to do this at the linux
command level to ensure mail is working? any logs i need to look at?...

View Replies !
Debugging - Wrong Parameter Count
I've got somehow a little peculiar problem and can't seem to find the right
solution so I could use a hand/hint or two.

On toppings.php I have - among others:
<a href="toppingremove.php?product=$productId&top=".$top1."">$top1</a>

which on toppingremove.php gives me, i.e.:
http://development.traders.dk/area5...%20alm.%20pizza

In toppingsremove.php I have - among others:
$price_topping = mysql_result(mysql_query("SELECT pricesmall ".
"FROM esperia ".
"WHERE top1 = '$topping'"));

Prior to retrieving $price_topping I retrieve another single value with
almost the exact same syntax and that doesn't give me any problem.

Attempting to retrieve the value $price_topping unfortunately ends up in:

"Warning: Wrong parameter count for mysql_result() in toppingremove.php on
line 78"

Where line 78 exactly and solely contains: "WHERE top1 = '$topping'"));

This problem occurs only when the string passed over as top either contains
danish special characters or a longer string with spaces and those special
danish characters. I haven't encountered this problem with ASCII based
strings.

However, I have a page toppingsadd.php that performs the similar procedure
just reversed and doesn't encounter this peculiar problem.
The main difference is that for toppingadd.php I use urlencode($top) as top
while toppingremove.php just passes the string itself as is.
I have attempted to use urlencode for toppingremove.php as well to see if
that would solve the problem however, it didn't make any difference.

I've been around php.net to see if I could locate some hints as to what
caused this and what could solve it,

View Replies !
Debugging An Authenticated Mail Function
My email server requires authentication, so I wrote (stole) some code that used the fsockopen()/fputs() functions to open a connection and write what I need manually to the smtp server.

It worked fine for months, but we changed our network a bit and now the mail function I wrote works on one machine, but not on the webserver. I added in some error checking, but they return nothing.

I would be grateful if someone could let me know the best/easiest way to debug this code and find out why I'm not sending email anymore: PHP Code:

View Replies !
Warning! PHP Is Not Configured For Debugging - In Komodo
I am looking for some assistance in 'fine-tuning' my preferences as I set-up
my system to learn PHP.

I am running Komodo professional, version 3.5.3, build 262321, platform
win32-x86.

Under Preferences/Language/PHP in debugger configuration, I am getting the
following error message:
WARNING! PHP is not configured for debugging. You can use the configuration
wizard to configure PHP for debugging.

When I try and run the Debugger Config Wizard I get to the point where it
asks me to choose the PHP extension directory.

I currently have e:/Program Files/perl/php/ext but when I try and click
Next>, nothing happens. It will not accept this choice.

What is it looking for?
How should I be configuring the system for PHP Debugger support?

View Replies !
Debugging User Define Functions
when i was coding my own functions, it comes a time that i don't know if what part of my code was the bug, pls tell me how to best debug my own functions, if it is returning the right value or not.

View Replies !
Remote Debugging With Quanta+ On Linux
I am trying to remotely debug a PHP application.

I have the following setup:
- Web server A (application accessed via https, PHP with XDebug
extension installed)
- Development server B (location of the php scripts)
- Remote workstation C (with Quanta+)

After a lot of searching for infos and trial and error I have not been
able to configure my environment on workstation C so I can remotely
debug PHP scripts executed on server B.

Does anybody use a similar configuration and know how to configure
Quanta+?
What other options for remote debugging do I have?

View Replies !
Debugging: Output Code Line?
Is it possible to output the line of some given code, particularly for debugging?

Pseuso-code:
showLine();//output 1
showLine();//output 2
showLine();//output 3
//etc...

View Replies !
Web Hosting For Script Testing And Debugging
I would like to test some of my PHP scripts. Does anyone know of a free web hosting service that offers some PHP support (and maybe mySQL support). A long shot I know. But perhaps worth asking. Replies by stickymail please - no ads (even for free services) in the forum. P.S I will get paid PHP hosting in time. But just for this small interim period anyone know of a free service? Or perhaps even just an online PHP script tester/debugger.

View Replies !
Debugging Correct Mysql Statement
"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1" But i have sevral on die statments in my page, is there anyway to try and distinguise which mysql statement it is. I notice the code is or die (mysql_error()) can i put anything inthe () to try and show which error it is like a number, i did try a number but that just errored or is it a simple remove the on die and try again till you find the one thats erroring.

View Replies !
Form Problem, Need Debugging Tips
The page is blank. It is called to edit info in database. The form is not showing up at all. When I enter text before the first IF statement it does show up. When I echo in the elseiff section, I still get a blank page. Code:

View Replies !
Long Post About PHPEclipse Session Debugging
debugging PHP applications interactively is possible, easy and free. I
am talking about PHPEclipse and using it for debugging over several
scripts or debugging through a session. Since I have wasted a lot of
time writing echo statements all over the code in order to confirm
program flow and watch variables, I feel I must share this with others
who will be facing similar problems.
PHPEclispe users can go to Step 5 directly.
(People who already have software which does all this or feel that
their software is the best suited, please ignore this post :-))

1)
First you need to get PHP and Apache.
(My OS is Windows XP Pro.) The best choice IMHO is XAMPP, as it allows
you to do many things - my version is 1.4.15 and it has, apart from
Apache2.0.54 and PHP5.0.4, phpMyAdmin2.6.3, FileZilla FTP, Webalizer
and many more things. It also allows you to switch between PHP4 and
PHP5!
So, get XAMPP at http://apachefriends.org.

2)
Second, you need to get PHPEclipse.
For that you need Eclipse first. Eclipse can be got from
http://eclipse.org. There are two releases of Eclipse - Eclipse 3.0 and
Eclipse 3.1 (although I use 3.0, it seems 3.1 is the better one - also,
there are other free products like JSEclipse which need 3.1 - sooner or
later you will need Javascript in your PHP application, for that, you
need Eclipse 3.1) Installing Eclipse 3.0 on windows was as simple as
unpacking the zip into a folder, say c:eclipse and double-clicking on
eclipse.exe to start. I've not tried 3.1 but I believe the installation
should not be any more difficult.
**********
Before downloading anything first read up the PHPEClipse related wiki
page at http://www.plog4u.org/index.php/Using_PHPEclipse
**********
Also read up http://www.plog4u.org/index.php/PHPEclipse_FAQ
NOTE: PHPEclipse runs from within Eclipse as module ("plugin").

3)
After you install Eclipse and PHPEclipse, comes the important part. I'm
just writing the steps which confuse most - since you have all the
necessary help needed available at
http://www.plog4u.org/index.php/Using_PHPEclipse in detail. Assuming
you have PHP files ready which you want to debug, you need to create a
new project in PHPEclipse. Go to Window->Show View->Navigator. This
shows the navigator pane. Now right-click to get a pop up menu which
gives among other options New->Project. Click that and choose PHP->PHP
Project in the next form in the wizard. Click Next to get the New
Project (PHP Project) form. There you have a place to give your project
a name and a place to specify the folder (you will miss this one if you
do not look closely as you need to uncheck a checkbox labelled "Use
default"). Now specify the folder location in the folder selection box.
This step troubled me for quite some time.

5)
Follow http://www.plog4u.org/index.php/Using_PHPEclipse for
intermediate steps like getting and installing the DBG debugger

6)
For debugging, you start by first setting up the environment by setting
paths and options in PHPEclipse. Click on Run menu in Eclipse, then
"Debug ..." (Debug dot dot dot). A window appears with a
navigator/explorer pane on the left and many tabs on the right. Give a
name (anything) to the debug configuration. Enter the paths in the File
tab and the Envirnment tab. Environment has two sub-tabs - Remote Debug
and Interpreter. In Remote Debug, check the Remote Debug checkbox and
(MOST IMPORTANT) uncheck the "Open DBGSESSION url in internal browser"
checkbox. This is needed, we will soon see why. Also, set the Remote
SourcePath to be a part of the full path to your php script. The rule
about the RemoteSourcePath is that
(RemoteSourcePath in the Environment tab) + (File path in the File tab)
= actual full path to your php file.
On the Interpreter sub-tab, if you have set things up correctly (with
XAMPP) you should see a php and a php5 option. Choose either. If
nothing is shown, you can add an interprter by setting a name for it
and the path for it from the adjoining "New..." button. Try a few
things and you should be able to start a debug session in about an hour
if not in a few minutes.

7)
Finally, run the Debug configuration (i.e., start the debugger) It will
now switch the window layout and show an active red button in the debug
toolbar with a few debug details in a prominent debug pane. It is now
_waiting_ for a request from any browser application. Set a breakpoint
in your PHP code (double clicking on the thin margin at the left of the
source code window, next to the text area). Also, set a breakpoint in
the next file that will get called when the user performs a form
submission in you first page.
Now, open your favorite webbrowser (independent of PHPEclipse) and
enter the url :
http://localhost/myproject/myfile.p...localhost:10001 or
http://localhost/myproject/myfile.p...lienthost:10003 One
of these should work. A moment or two after you enter this (PHPEclipse
must be in the waiting-to-debug mode) you will see control switching to
PHPEClipse and the line in your first page where you set a breakpoint
will get highlighted by the debugger. Step through to the end. and
switch back to your web browser (where page two is now being
displayed). Click on a form submit and see how control switches back to
PHPEclipse on the line in the second page where you had put a
breakpoint.

Thus you continually switch between your web browser and PHPEclipse.
The process can go on to as many number of files as you wish - just set
breakpoints in all the files before starting debugging. Trust me, it is
a good alternative to writing echo statements all over the place to
trap errors in a 15-20 page PHP application.

NOTE: On Windows, when control is switched to PHPEclipse, the Windows
taskbar button for PHPEclipse blinks, indicating that that program
demands interaction. I dont know how it is on Linux.

The important thing is to not start the debugger in the internal
browser. For that you must uncheck the checkbox saying "Open DBGSESSION
url in internal browser" which can be found in
Run->"Debug..."->Environment tab->Remote Debug tab. Somehow, (on my
machine at least) the internal browser does not support debuging over
multiple pages.

Hope this helps someone, because I've wasted a lot of time adding
echo's and exits to see the state of variables in various places in my
scripts and it is quite tedious. That kind of debugging has its merits,
though - you become really well versed with your code!

View Replies !
PHPMailer Debugging (Failed To Connect To Server)
I have a problem using PHPMailer. On my local development machine, the script works fine and sends emails. On amy staging server, when I try to use PHPMailer to send() I see the error:

SMTP -> ERROR: Failed to connect to server: Permission denied (13)
Can anyone think of why my staging server is preventing my connection...

View Replies !
Help Debugging Flat File Picture Gallery
I have compiled some code, some written by me, some compiled from
various sources online, and basically i've got a very simple flat file
photo gallery. An upload form, to upload the photos and give them a
caption, storing the caption and filename in a text file. It's a bit
buggy when removing the photos and captions from the file, and also in
displaying them on the delete page. you can see it in action at
www.4am.com.au/gallery/upload.php - read.php - delete.php.
You can download the source at www.patoncreative.com.au/gallery.zip, and
I have posted it here below... i would appreciate some help in debugging
it.. i'm not the best with the 'foolproofing' of it before putting it
into use.

UPLOAD.PHP######################################## #

<form action="upload.php" method="post" enctype="multipart/form-data">
Select a Photo to Upload:<br>
<input type="file" name="filetoupload" size=&#3950;' class='form'><br><br>
Enter Photo Caption:<br>
<input type="text" name="caption" size=&#3950;' class='form'><br>
<input type="hidden" name="MAX_FILE_SIZE" value="<?echo $size_bytes; ?>">
<br>
<input type="Submit" value="Upload File" class='form'>
</form>

<br><br>

<?php

/* Description -----------------------------------------------------
The Super Global Variable $_FILES is used in PHP 4.x.x.
$_FILES['upload']['size'] ==> Get the Size of the File in Bytes.
$_FILES['upload']['tmp_name'] ==> Returns the Temporary Name of the File.
$_FILES['upload']['name'] ==> Returns the Actual Name of the File.
$_FILES['upload']['type'] ==> Returns the Type of the File.

So if I filetoupload the file 'test.doc', the $_FILES['upload']['name']
would be 'phptut.doc' and $_FILES['upload']['type'] would be
'application/msword'.
---------------------------------------------------------------------*/

View Replies !
Install Debugging Feature Ton Zend Studio
i am using Zend studio 5.2.0. i heard that Zend studio have great debugging facilities if we install a debugger on the server. (all our project files reside in developement server on our LAN, and our individual machines don't have apache/php installed)

View Replies !
Debugging - Get A Stack Trace Or Function Call List.
I would like to get a stack trace or function call list. when an error occurs in a php script. what are most of you doing? Writing your own debugging or using things like xdebug (which i couldn't get working)? And if you write your own is there a way to get the filename and line number? Also, are people using try/catch statements? Coming from C++/java that is what i am used to, just curious as to what people are doing with php and any tips you might have.

View Replies !
Php4
I'm wanting to work with php4 and want to know which version of mysql to
download that works great with php4 api version 3.23.x?

View Replies !
PHP4 Ignored With IIS
I am attempting to get PHP4 working with IIS but the php script is ignored.
I installed Apache and it works with the Apache server so it is obviously a
configuration error on my part but I can't find it. I have a test.php file
that I run with each configuration.

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved