PHP - Build For Debugging

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Uist
Forum Newbie
Posts: 2
Joined: Mon Apr 05, 2010 6:21 pm

PHP - Build For Debugging

Post by Uist »

I am looking at building a debug system into my local server, to test my PHP scripts. I am not sure if it is at all possible, so thought I would ask the question anyway.

Basically, I would like the PHP Parser to output the PHP code to a text file and the Parsed Code to the browser. It might seem an odd request, but it is to test for security problems in code.. I know I can simply output the variables, but I would also like to output the entire PHP source to a text file.. This is for localhost use only.

If I can be pointed in the right direction I would very much appreciate it.. also if its impossible then do say so.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP - Build For Debugging

Post by Christopher »

Look into xdebug. There are a number of IDE that connect directly to it. You can also you valgrind (and it web version) to display information as I recall.
(#10850)
lunarnet76
Forum Commoner
Posts: 67
Joined: Sun Apr 04, 2010 2:07 pm
Location: Edinburgh

Re: PHP - Build For Debugging

Post by lunarnet76 »

hi,

I'm sorry but does "output the entire PHP source to a text file" isn't simply opening the PHP file!?
I don't really see what do you want to do : output the errors somewhere else, or the entire output but with errors, or something else?
Uist
Forum Newbie
Posts: 2
Joined: Mon Apr 05, 2010 6:21 pm

Re: PHP - Build For Debugging

Post by Uist »

Christopher wrote:Look into xdebug. There are a number of IDE that connect directly to it. You can also you valgrind (and it web version) to display information as I recall.
Thanks Chris, will look into that.
Post Reply