Page 1 of 1

PHP - Build For Debugging

Posted: Mon Apr 05, 2010 6:28 pm
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.

Re: PHP - Build For Debugging

Posted: Mon Apr 05, 2010 6:55 pm
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.

Re: PHP - Build For Debugging

Posted: Mon Apr 05, 2010 6:56 pm
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?

Re: PHP - Build For Debugging

Posted: Tue Apr 06, 2010 6:22 am
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.