Dig for Windows
May 30th, 2008 by Aaron
For those of us who develop on windows, we can sometimes feel linux tool envy. One particular tool is the ‘dig’ command. Well, luckily, you can get this to run on windows easily:
Download Bind from ISC
Visit the www.isc.org/sw/bind/index.php download page to download the Windows binary version.
Create folder and Extract necessary Files
Create a folder called ‘dig’ - or just push all the dlls and exe’s into your windows/system32 folder. Extract the following:
dig.exe libbind9.dll libdns.dll libisc.dll libisccfg.dll liblwres.dll
Run Dig
c:\>dig ; <<>> DiG 9.4.2 <<>> ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 752 ;; flags: qr rd ra; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 12 ;; QUESTION SECTION: ;. IN NS ;; ANSWER SECTION: . 4060 IN NS e.root-servers.net. . 4060 IN NS b.root-servers.net. . 4060 IN NS f.root-servers.net. . 4060 IN NS a.root-servers.net. . 4060 IN NS c.root-servers.net. . 4060 IN NS i.root-servers.net. . 4060 IN NS g.root-servers.net. . 4060 IN NS h.root-servers.net. . 4060 IN NS m.root-servers.net. . 4060 IN NS d.root-servers.net. . 4060 IN NS k.root-servers.net. . 4060 IN NS l.root-servers.net. . 4060 IN NS j.root-servers.net. ;; ADDITIONAL SECTION: e.root-servers.net. 71529 IN A 192.203.230.10 b.root-servers.net. 71529 IN A 192.228.79.201 f.root-servers.net. 85723 IN A 192.5.5.241 a.root-servers.net. 85723 IN A 198.41.0.4 c.root-servers.net. 71529 IN A 192.33.4.12 i.root-servers.net. 71529 IN A 192.36.148.17 g.root-servers.net. 71529 IN A 192.112.36.4 h.root-servers.net. 71529 IN A 128.63.2.53 m.root-servers.net. 25212 IN A 202.12.27.33 d.root-servers.net. 71529 IN A 128.8.10.90 k.root-servers.net. 85723 IN A 193.0.14.129 j.root-servers.net. 85723 IN A 192.58.128.30 ;; Query time: 15 msec ;; SERVER: 10.30.12.26#53(10.30.12.26) ;; WHEN: Tue May 27 10:49:05 2008 ;; MSG SIZE rcvd: 433
Yay!
Thanks to Todd Keup @ magnifisites for this tip.
XDebug and Eclipse PDT on Windows - From Start to Finish
May 20th, 2008 by Aaron
XDebug and Eclipse PDT on Windows - From Start to Finish
With our recent upgrade to php at “the triangle,” I felt it was time to start working on using a debugging and code profiling tool. When I say felt like it was time… I meant our PHP version finally supported it. *sigh*. Anyway, from start to finish, this is what I did in order to get Xdebug to integrate into my current eclipse PDT - as well as investigate the other features of xdebug. I tried to detail all of the mistakes I made as well as what I figured out. Let’s go:
Continue reading XDebug and Eclipse PDT on Windows - From Start to Finish
Use MySQL Gui tools to securely connect to remote database
October 27th, 2007 by Aaron
This particular example is going to be based on a connection from Windows XP using Putty, MySQL GUI tools and Dreamhost.
Quick summary of issue: I want to use MySQL Query Browser to access my database on my dreamhost account. The database allows connections from the webserver only - nothing external. I have an SSH account on the webserver.
Quick answer: This requires us to tunnel from our machine to the webserver and connect through this tunnel to the database server.
Lets take a look on how we can accomplish this:
Continue reading Use MySQL Gui tools to securely connect to remote database
Add Event Viewer to My Computer Right-Click
September 19th, 2007 by Aaron
Just wanted to note this awesome registry change that you could apply to get a right-click menu on my computer that allows direct access to the event viewer in windows xp.
eventviewer.reg
Windows Registry Editor Version 5.00
;Adds Add/Remove to right click of MY Computer
[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\Event Viewer\command]
@="eventvwr"
Force Log Messages using Tortoise SVN
July 25th, 2007 by Aaron
Everyone knows that standard SVN has its list of 6 or 8 standard hooks - but what if you’re 1) lazy, 2) busy, 3) don’t have access to the SVN server? Using one of the popular win32 shell integrated svn clients, TortoiseSVN, we can still force commit log messages easily:
Continue reading Force Log Messages using Tortoise SVN
Symbolic Linking in Windows?
July 21st, 2007 by Aaron
Be careful! Those of you who are trying to emulate a symbolic link in windows have probably come across the Windows Resource Kit tool linkd.exe. This creates junction points on the file system. However, before you have to find out the hard way, here’s my reminder… junction points are more akin to hardlinks than symbolic links: if you delete a junction point, it deletes the target as well!
Execute Windows Commands from PHP without blocking
July 21st, 2007 by Aaron
When researching for my live error reporting posting, I tried running some exec and passthru command tests by starting up calc.exe. While they executed the command correctly, I got some weird results in my script … which I suppose now make sense. Lets see how we can start programs in Windows, and not run into the same issues that I did.
Continue reading Execute Windows Commands from PHP without blocking
Send e-mail from outlook using PHP
July 6th, 2007 by Aaron
While working on some code at (”the triangle”), I run into some issues with the mail() function. On our linux qa and production servers, we can use the mail() function no problem - but on my development platform, windowsxp, I cannot with our current configuration. Normally, you can put in the smtp server in the php.ini file, but our setup doesn’t allow this. We have an exchange server who’s relaying settings restrict it to a few IPs within our organization. Our development boxes are on the same subnet as everyone else’s, therefore using the same DHCP pool. Because of security issues, networking doesn’t want to open up the relay to that subnet block, which is smart. However, they didn’t want to give me a static IP on a different subnet or they didn’t want to do my suggestion of reserving a pool for our dev boxes (why not? grrrr…). At any rate, we do use outlook with our exchange - so why not use PHP to send it out through outlook? Lets see how:
Continue reading Send e-mail from outlook using PHP
