Just another WordPress weblog
Hobbies
Posts about hobbies.
PHP Debugger – NetBeans & xdebug – Awesome!
Dec 10th
Yesterday while browsing the Internet I came across www.netbeans.org. Now, I already have netbeans installed as I use it for JAVA development, however I never realised there was an IDE for PHP! So there I was waiting for the 200mb download to finish, so I could replace my old NetBeans with the newer 6.5 version and things got even better. NetBeans can communicate with xdebug! I’ve played with xdebug before, but I could never get along with it, there was so much setting up you had to do, so many little things to change that could effect the end result – it just didn’t seem practical, so I kept to my own debugging methods. NetBeans, however changed this! Their website directed me to a local web server that has MySQL and PHP5 preinstalled (I do work on a Mac so I’ve both those installed anyway, but getting them setup is a pain in the backside) called xampp. After the download had finished I read the documentation which told me to add 4 lines to my PHP.ini (Spotlight found that one for me!) and I was off. Next was to install xdebug. Again I downloaded the source, placed it in the xampp PHP folder, phpized it and then compiled it to run along side PHP5. Easy as pie! No sooner had I restarted xampp NetBeans picked up on the change and enabled the debug button.
Below is a screen shot of NetBeans IDE helping me with remembering was methods are available to me in the Db class – neat, huh? It even lists the comments I have made above the method for easy understanding.
This tool is fantastic! Close to 5 years I have been developing in PHP and not once have I come close to using anything as good as NetBeans. The interface is clean and concise. It’s fast with no lag when you need to see the method list *cough* Visual Studio *cough*. And it has a debugger! Need I say anymore?! It’s a perfect tool for anyone who uses PHP, what ever their level, I am going to suggest NetBeans to all of my friends and hopefully you will too!
New Network Attached Storage (NAS) – IB-NAS2001-B – Icy Box
May 31st
Last week I purchased a NAS box, and a 500gb hard disk to go with it. I’ve wanted one for a while now and decided it’s a good time to get one. After a lot of browsing round online computers shops such as www.overclockers.co.uk and www.novatech.co.uk I decided on the Icy Box 2001 series from www.novatech.co.uk. It seemed like it was perfect for what I need, and it is. It’s fantastic! I’ll list the servers it has on it:
- Samba (Windows file sharing)
- FTP
- NFS
- DHCP
- Print Server
- iTunes Media
Currently i’m using Samba within my parents house, and FTP from Uni. I’ve set up a nice cronjob on my iMac to FTP all my uni work to it in a tar file once a night. It works really well for my parents too. They have a mapped network drive, so it looks like any other windows drive on their Microsoft Vista machine. To which they keep backups of their photos and emails. The iTunes server is really good too. It transmits all your music to a shared folder in your iTunes without you having to do anything, all you need to do is search for the song you want and double click it to play.
One issue I have had with it is the online admin page crashing and not responding until the server is hard rebooted. However, to overcome this issue I found a nice hack to enable telnet, and the program that fires the http daemon off. For anyone who has the IB-NAS1000/NAS2000/NAS2001 Icy Box here is a little tutorial for you:
- In your web browser go to: http://<ip_of_your_nas>/cgi/telnet/telnet.cgi. Here is a hidden admin page for telnet. Tick the check box and then the submit button.
- Open up a telnet client, or Windows Command Prompt and type telnet <ip_of_your_nas>
- Login with user name: root and password: raidsonic. (These logins should work! If not try a google search)
- In the command line type /etc/rc.d/S97thttpd.sh start (This will start you thttpd server! (Obviously))
And that’s how you enable telnet and restart your httpd daemon. If you’re confident with cronjobs, add the command to a 15min cron and you’ll never need to send the command again!
So over all I’m very happy with my NAS. I’m lucky I know something about Linux and the way samba works, other wise I probably wouldn’t have been able to fix the issues, however over all it’s a very good piece of kit.
