Put your message here! Contact me for more information
 
 








 

After reading my buddy’s blog (http://blog.tvlgiao.com/) about the PHPEclipse, I decided to give it a shot. I’ve been using the Zend IDE because I love the intellisense feature (a.k.a. auto-complete) of this nice IDE. The only thing is that it’s very slow to start and I had a hard time installing the debugger. Well, now the PHPEclipse package also provides the same functionalities with a complete debugger for FREE.

This is the first time I try Eclipse. My impression: impressive! The IDE loads faster than the Zend 5.1.0 IDE, eventhough both run on Java VM. The GUI of Eclipse is also slicker and it gives me the feeling of working in Visual Studio again. Installing the PHPEclipse was a breeze via the Find & Install featured under the Software Update menu. However, installing the php_dbg with Xampp wasn’t that straightforward.

At the time of writing, the php_dbg.dll is only available upto PHP engine version 5.1.2. The newest Xampp is 1.5.4, which bundles the PHP version 5.1.4. I would recommend you to install the older version of Xampp instead. Xampp 1.5.2 is the one with the correct PHP engine to work with php_dbg.

First of all, copy the php_dbg.dll-5.1.2 to the [installed xampp’s dir]/php/ext/. Then add the following lines to the php.ini file. the php.ini file that Xampp’s Apache is using is in the [installed xampp’s dir]/apache/bin/php.ini. You can see the actual path if you do a quick phpinfo().

[debugger]
extension=php_dbg.dll
debugger.enabled = true
debugger.profiler_enabled = true
debugger.JIT_host = clienthost
debugger.JIT_port = 7869

However, the default configuration of the php.ini will crash your Apache because of the loaded ZendExtensionManager.dll. What I did to solve the problem was to comment out the zend_extension_ts lines towards the end of the php.ini file like this…

;zend_extension_ts = "I:\Program Files\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
;zend_extension_manager.optimizer_ts = "I:\Program Files\xampp\php\zendOptimizer\lib\Optimizer"
;zend_optimizer.enable_loader = 0
;zend_optimizer.optimization_level=15
;zend_optimizer.license_path =
; Local Variables:
; tab-width: 4
; End:

After all the zend_ lines have been commented out, Apache started just fine and the phpinfo() dump confirmed that the php_dbg has been loaded.

Hope this help. Now it’s time to do some serious php apps with PHPEclipse. Ah by the way, CakePHP with PHPEclips is beautiful! We now have full code auto-complete for the CakePHP’s library! How amazing! And my friend Giao has just told me that Jseclipse for Javascript now support autocomplete for OOP-JS (prototypes and all that good stuff). Ha, it looks like that I’m hooked with Eclipse already.


 

3 Responses to “Eclipse, Xampp 1.5.2 & php_dbg.dll for PHP5.1.2



ornythorink
10:42 am
March 17, 2007
#18982

I have all done
It seems work but the variables does not display
Do you have an explication ;)
thanks i apologize for my english i’m french ;)

I have this on my phpinfo()
DBG php debugger, version 2.13.1, Copyright 2001, 2006, Dmitri Dmitrienko, http://www.nusphere.com

Version 2.13.1
Linked as a shared library.
Profiler compiled, enabled

Directive Local Value Master Value
debugger.enable_session_cookie On On
debugger.enabled On On
debugger.fail_silently On On
debugger.ignore_nops Off Off
debugger.JIT_enabled Off Off
debugger.JIT_host clienthost clienthost
debugger.JIT_level 3 3
debugger.JIT_port 7869 7869
debugger.profiler_enabled On On
debugger.session_nocache On On
debugger.timeout_seconds 300 300




Dan Doyon
12:50 am
July 22, 2007
#46719

I’ve tried on a couple of occasions to get this damn dbg thing going and apache get being trashed. I was just about to give up until I saw your blog item on ZendExtensionManager.dll. The dbg website is sorely missing this very import tidbit of info.

Thanks and Kudos!




7:12 am
September 14, 2007
#57058

You can load DBG via the Zend section instead if you like, allowing for the Zend Optimizer to ALSO run.

Place this line first in the [Zend] section of php.ini:
zend_extension_ts = “C:\xampp\php\ext\php_dbg.dll-5.2.x”




 

Leave a Reply