Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: PHP and MySQL 24-Hour Trainer
This is the forum to discuss the Wrox book PHP and MySQL 24-Hour Trainer by Andrea Tarr ; ISBN: 978-1-1180-6688-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: PHP and MySQL 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 14th, 2011, 01:22 PM
Tarrconsulting's Avatar
Wrox Author
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2011
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Welcome

Thanks for buying my book! I hope you are finding it useful. This is a good place to ask questions as you work your way through the examples in the book.

Thanks,
Andy
Reply With Quote
  #2 (permalink)  
Old December 29th, 2011, 01:15 PM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Troubleshooting Debug in Eclipse

Hi,
I am thoroughly enjoying this book! However, I am having difficulty accessing the debug features mentioned in the book. I have tried both Eclipse Helios and Indigo.

When I right-click on a file and choose Debug => Debug as PHP Web Application (the only option in Indigo) or Debug as PHP Web Page (in Helios), xDebug opens, however the Variables tab is a blank white box and the icons for the Debug tab are grayed out so I don't have access to 'Resume,' 'Step Into,' etc.

I appreciate any suggestions
Reply With Quote
  #3 (permalink)  
Old January 28th, 2012, 11:51 AM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello.

I am also having some issues using the debugger. I've made it to the "Try It" section of Lesson #5 -- and the debugger does seem to run -- it outputs the web page. Problem is: it does not stop on any breakpoints. It just runs.

I have verified that it is set to "Break At First Line" and I have also added my own PHP code (an Echo Statement) and set that as a break-point. Still, it does not stop.

I'm wondering if maybe something in the "Configuring Xdebug" section was wrong. That section was not fully clear to me, especially editing the PHP.INI. It only shows the changes for the MAC, not the PC.

CRZY: You posted a few weeks back. Have you had any luck since then?

Thanks,
Gary
Reply With Quote
  #4 (permalink)  
Old January 30th, 2012, 08:00 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Configuring Xdebug

Quote:
Originally Posted by GaryW View Post

CRZY: You posted a few weeks back. Have you had any luck since then?

Thanks,
Gary
Gary: Since my post I have found references to this in Eclipse and Xdebug forums. It seems to be an issue for some people running Windows 7 64-bit; however, I have a 32-bit system. Apparently there are several versions of Xdebug and the appropriate one may not download with an Eclipse package. I found a reference to a site that will determine which version of Xdebug is appropriate for any given system and let you download it from there. I haven't tried it because it wants to collect more information about my computer than I am comfortable transmitting to a site I am not familiar with. I have not researched the site any further.

I am also confused about how to correctly edit PHP.INI. I have seen references of a PHP.INI file that show a separate section for Xdebug configuration. My PHP.INI file does not have an area like that - so I definitely have something configured incorrectly somewhere.

I haven't spent a lot of time on this recently, but I hope to find a solution soon. If I do, I'll post it.
Reply With Quote
  #5 (permalink)  
Old January 31st, 2012, 11:12 PM
Registered User
Points: 9, Level: 1
Points: 9, Level: 1 Points: 9, Level: 1 Points: 9, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by crzy4tux View Post
Gary: Since my post I have found references...

Hi CRZY,

Thanks for the information. I do have Windows 7 64-Bit, so maybe that
is part of my debugger problem. I'll do some searching using the information
you provided -- thanks!

I'm up to Lesson 22 now. I'm cruising thorough this quick just to get a rough
draft of it into my head. Also, I've been around other languages, so most of
the concepts are familiar. I've been skipping most of the "Try It" sections to
save time. I figure that when I'm done with the book, I'll make up some
project of my own and try everything then.

Anyway, just saying that I'm getting into this stuff, so lets keep in touch and
maybe we can help each other over any rough spots.

Cheers,
Reply With Quote
  #6 (permalink)  
Old February 1st, 2012, 01:13 AM
Tarrconsulting's Avatar
Wrox Author
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2011
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by crzy4tux View Post
I am also confused about how to correctly edit PHP.INI. I have seen references of a PHP.INI file that show a separate section for Xdebug configuration. My PHP.INI file does not have an area like that - so I definitely have something configured incorrectly somewhere.
That section is something you can add to the bottom of your php.ini file. It isn't necessarily there already.

Getting XDebug and Eclipse to work together can be tricky because there are so many variables between the php version and set up, the os, and the exact versions of xdebug and eclipse.
Reply With Quote
  #7 (permalink)  
Old February 16th, 2012, 08:27 PM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Default Notice wouldn't pop up

Hi guys - This may help with debugging:

i couldn't get the notice message to pop up to show errors even after i added Andrea's xdebug configuration code.
The PHP.ini file was blocking the notices from popping up in this line:

"error_reporting = E_ALL & ~E_NOTICE" without qoutations.
I changed it to say this:
"error_reporting = E_ALL" again without quotations.
My notices now pop up!
hope this helps someone.
Reply With Quote
  #8 (permalink)  
Old February 24th, 2012, 02:32 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Tarrconsulting View Post
Thanks for buying my book! I hope you are finding it useful. This is a good place to ask questions as you work your way through the examples in the book.
I just started on the book tonight and I'm looking forward to learning PHP!

Thank you for the book and the resources. I also look forward to interacting with other students of PHP here on the forum.

I am just getting started and getting my (linux) system set up. If anyone else is using linux (ubuntu here) drop me a line and let me know how it is going for you. If I run in to anything worth sharing I'll post a note too.

Good luck guys!

CB
Reply With Quote
  #9 (permalink)  
Old February 28th, 2012, 07:46 PM
Registered User
Points: 26, Level: 1
Points: 26, Level: 1 Points: 26, Level: 1 Points: 26, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What is wrong with this coding? If I use the following path:

C:\Users\chuck\Desktop\Documents\php\xampp\htdocs\ php24\testhtmldate.html

The response is:

Welcome
Today is

The DATE function in the coding does not work.

The source code for this testhtmldate.html is:
Code:
<p>Today is <?php echo date('M j, Y'); ?></p>
I thought the source code should reflect today's date:

Code:
<p>Today is Feb 28, 2012</p>

The INCLUDE function does not work either when I try to include a file.


Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>testhtmldate</title>
</head>

<body>

<h1>Welcome</h1>
<p>Today is <?php echo date('M j, Y'); ?></p>

</body>
</html>
Reply With Quote
  #10 (permalink)  
Old February 28th, 2012, 07:59 PM
Tarrconsulting's Avatar
Wrox Author
Points: 50, Level: 1
Points: 50, Level: 1 Points: 50, Level: 1 Points: 50, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2011
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default It works for me

I copy/pasted your code into a text file, saved it as testphp.php and called it from my browser and it worked fine.

I'd recommend setting your php.ini error reporting to show all errors. You might not have a correct time zone set so the date() isn't able to work.

Andy
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off




All times are GMT -4. The time now is 10:05 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.