473,395 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Best Debug method for Windows98

I've got PHP5, Apache & MySQL running on win98. I want to know if
there is a debugger available, other than from Zend?

Jul 17 '05 #1
5 1613
beebee wrote:
I've got PHP5, Apache & MySQL running on win98. I want to know if
there is a debugger available, other than from Zend?


I find the Apache error log quite useful for catching PHP errors. It's
at <install path>\Apache2\logs\error.log.

For MySQL, while developing I use a debug flag that I can set/clear to
print SQL statements to the browser immediately before sending them to
the MySQL server. I find many poorly formed queries this way. You can
also copy the SQL from the browser and paste into the MySQL Query
Browser to see what the query's actually doing. Also, ALWAYS check the
return status of MySQL calls/methods and if there's an error, print it.
E.g.:

// create SQL query
$sql = "SELECT blah, blah, blah";
if ($debug)
{
echo "<p>$sql</p>\n";
}

// execute/check the query
if (!$result = $dbo->query($sql))
{
echo "<p>output_search_results: error inserting track:<br />\n";
echo $dbo->error ."</p>\n";
exit();
}

// check for an empty result set
if ($result->num_rows == 0 )
{
blah
blah
blah

Hope that helps!

NM

--
convert uppercase WORDS to single keystrokes to reply
Jul 17 '05 #2

News Me wrote:
beebee wrote:
I've got PHP5, Apache & MySQL running on win98. I want to know if
there is a debugger available, other than from Zend?

I find the Apache error log quite useful for catching PHP errors.

It's at <install path>\Apache2\logs\error.log.

For MySQL, while developing I use a debug flag that I can set/clear to print SQL statements to the browser immediately before sending them to the MySQL server. I find many poorly formed queries this way. You can also copy the SQL from the browser and paste into the MySQL Query
Browser to see what the query's actually doing. Also, ALWAYS check the return status of MySQL calls/methods and if there's an error, print it. E.g.:

// create SQL query
$sql = "SELECT blah, blah, blah";
if ($debug)
{
echo "<p>$sql</p>\n";
}

// execute/check the query
if (!$result = $dbo->query($sql))
{
echo "<p>output_search_results: error inserting track:<br />\n";
echo $dbo->error ."</p>\n";
exit();
}

// check for an empty result set
if ($result->num_rows == 0 )
{
blah
blah
blah

Hope that helps!

NM

--
convert uppercase WORDS to single keystrokes to reply


Jul 17 '05 #3
News Me wrote:
beebee wrote:
I've got PHP5, Apache & MySQL running on win98. I want to know if
there is a debugger available, other than from Zend?

I find the Apache error log quite useful for catching PHP errors.

It's at <install path>\Apache2\logs\error.log.

For MySQL, while developing I use a debug flag that I can set/clear to print SQL statements to the browser immediately before sending them to the MySQL server. I find many poorly formed queries this way. You can also copy the SQL from the browser and paste into the MySQL Query
Browser to see what the query's actually doing. Also, ALWAYS check the return status of MySQL calls/methods and if there's an error, print it. E.g.:

// create SQL query
$sql = "SELECT blah, blah, blah";
if ($debug)
{
echo "<p>$sql</p>\n";
}

// execute/check the query
if (!$result = $dbo->query($sql))
{
echo "<p>output_search_results: error inserting track:<br />\n";
echo $dbo->error ."</p>\n";
exit();
}

// check for an empty result set
if ($result->num_rows == 0 )
{
blah
blah
blah

Hope that helps!

NM

--
convert uppercase WORDS to single keystrokes to reply

Thanks for the info.
Looks like I've been spoiled rotten. Having been buried for the last 7
years programming in COBOL/400 with its interactive source debugger I'm
finding the learning curve for this endeavor ever so jagged.

Jul 17 '05 #4
beebee wrote:
[snip]
Thanks for the info.
Looks like I've been spoiled rotten. Having been buried for the last 7
years programming in COBOL/400 with its interactive source debugger I'm
finding the learning curve for this endeavor ever so jagged.


There are better ways, some of which cost money. I'm doing PHP/MySQL
for fun, not profit, so I prefer to keep things free. There was a
thread a week or two ago about PHP and IDEs that mentioned a lot of
alternatives. You might try a Google Groups search for this group.

NM

--
convert uppercase WORDS to single keystrokes to reply
Jul 17 '05 #5
Try this for debugging:
http://dd.cron.ru/dbg/
And this for an IDE:
http://www.waterproof.fr/

Jul 17 '05 #6

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

Similar topics

5
by: Matthew Louden | last post by:
I want to know what's the best way to debug ASP pages? Now, I just put the following code when I got run-time error, but sounds like not efficient. Please advice! Thanks! Response.Write "Here"...
1
by: Krijn Saman | last post by:
A part of our users still work on windows98 and another part on Windows NT4.0. We soon get a new server and this new server will be based on DOT.NET technology. We have a group of app. 500...
1
by: Andy | last post by:
Which is the better method to retrieve data from a database (SQL Server 2000 or Oracle 9i)? Does one of the following methods perform better than the other? 'METHOD 1 Dim strSql, strValue...
4
by: emma middlebrook | last post by:
I have a question regarding asserting ... here's some code: string GetAssertMessage() { ... prepare a message string and return it... } void SomeMethod() { ...
1
by: Sunil Menon | last post by:
Dear All, My client machine's OS is Windows 98 and IE6.0 sometimes while loading an aspx page the client gets a message "Operation Aborted" and the page does not open...on other machines that are...
6
by: Philip Warner | last post by:
I have a set of classes: C (base) C1 (inherits C) C2 (inherits C) ... Cn (inherits C) (the C1..Cn also have subclasses, but thats not really relevant to the question)
4
by: Darren Mar-Elia \(MVP\) | last post by:
So, I have my little .Net 2.0 C# utilities out in the wild and occasionally they have bugs(!). Often the bugs are easy to troubleshoot remotely but occasionally I would like to write detailed trace...
1
by: =?Utf-8?B?Q2hhcmxlcyBSUEIgQnJvd24=?= | last post by:
In attempting to defrag my system my computer does not display the %complete or the colored matrix like it used to. I can hear the system operating but all it get is a blank screen or when I post...
0
by: hemant kamble | last post by:
Hi all, I had written one code for opening Exe file after copying the file folder specifyby me. This code is worked on Window Xp but it gives error on Windows98 as error 5 Help me.Code is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.