07 Mar 2012

Xedebug with Cakephp and Netbeans

I’m using Debian and Xedebug is available via the package manager.

apt-get install php5-xdebug

Configure PHP to use xdebug.

vi /etc/php5/conf.d/xdebug.ini

; configuration for php xdebug module
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so

xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_host = 10.11.228.223 ; [Remote address if debugging from a remote client]
xdebug.remote_port = 9000
xdebug.max_nesting_level = 500 ; [This may be needed for larger scripts]
xdebug.profiler_enable_trigger = 1 ; [Use trigger to enable with something like chrome/firefox extensions]
;xdebug.profiler_enable = 1

Configure netbeans under Tool > Options. Make sure PHP is configured with the proper port. You can remove the option to stop at first line. You must also make sure the project has the webroot defined under sources. Without this setting the debugger will not stop at the breakpoints.

19 Feb 2012

Find and Delete Files

If you need to find and delete files you can execute the following command.

find /path/to/search -name 'file-to-search-for' -exec rm -f \;

If you want to be prompted for each file you can use -i instead of -f

13 Oct 2009

Hello world!

If you are seeing this it is because I’m trying to create this site pretty much in real time. I started creating this minimalistic theme and decided I’d upload changes as I go rather than only testing from my development machine. This theme will have nothing very fancy, but I do plan to actually start blogging about things I do as an IT Pro and Web Developer. Hopefully the majority of this blog will be completed over the next week or two.