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.
PHP - Build For Debugging
Moderator: General Moderators
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: PHP - Build For Debugging
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
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?
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
Thanks Chris, will look into that.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.