I could not make the then current versions of Apache and PHP work together last time I tried to install everything separately. So I abandoned that idea and installed XAMPP instead. Much easier. Besides, you are using a very outdated version of PHP. 5.2 was released in 2006 and support for it ended 3 years ago. XAMPP has current versions of Apache, PHP, MySQL, and more.
I am too tired to give an in-depth response right now. I am heading off to bed momentarily. I wanted to look at this thread because I happened to upgrade to Netbeans 8 earlier this morning. I am not very knowledgeable about Netbeans. But maybe I can be helpful anyway.
Do yourself a favor and download XAMPP. It's great. And here is what I have in my XAMPP installation's php.ini file:
zend_extension = "C:\\xampp\\php\\ext\\php_xdebug.dll"
;xdebug.profiler_append = 0
xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\\xampp\ mp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
;xdebug.trace_output_dir = "C:\\xampp\ mp"
A line beginning with a semi-colon denotes a line that has been commented out and is not processed. Install XAMPP, put that in your php.ini file, and see if it works. It works for me.