All entries of my technical and business blog.

Force Log Messages using Tortoise SVN

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: (more…)

Symbolic Linking in Windows?

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! (more…)

How to use PHP to generate downloadable content

I was looking at some code I had written about 3 years ago - how sad! I was creating a PDF of my resume using PHP to grab my qualifications out of a database. Unfortunately, I never researched into the header php command, so I made my job harder. Instead of writing it with a php file, I made a php file, and renamed it as a .pdf file. I modified my .htaccess file to... (more…)

php

When is a PHP array not an array?

Arrays, return variables, expressions, OH MY! I recently learned a lesson about array functions in PHP not returning what I thought they would. I had a function that returned the value of array_shift()… and then used it in another function. Unfortunately, this generated a strict error and was causing some issues… As usual, I put together a proof of concept. Lets check out the code example, the error, and then why: (more…)

php

PHP developer's shortcut for optimizing mysql

PHP developers, raise your hand if you run an explain on each MySQL statement you write and use in your apps! Anyone? Ok… 1… 2… that’s it? Yah, I tend to forget that too, but luckily PHP allows us to cheat. Thanks PHP! (more…)

Execute Windows Commands from PHP without blocking

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. (more…)

A reminder about triggering errors not in the USER level

I had a function in some of my code that I wanted to trigger a notice error on certain occasions. Unfortunately, it kept halting my script with a Warning instead. Unfortunately, the error handler at that particular block of code was not properly capturing the error string. It runs out that I was triggering an E_NOTICE instead of an E_USER_NOTICE error… (if I would have reviewed the trigger_error manual page, I wouldn’t have made this... (more…)

php

Live Combined Error Reporting for Apache and PHP during Development

So many times during development, I’ve missed little PHP errors because they were 1) on a processing page that was redirected or 2) output inside of a html tag - and rendered invisible. From time to time, I have to go back to my file system and check the php error log to see what happened. The first step to solving this was implementing a custom error handler - which we did at (“the triangle”).... (more…)

Two New useful external tools for Eclipse

In my posting about Integrating PHPDocumentor into Eclipse, I touched on External Tools a bit. The combination of external batch files, the external tools extra options and the console has made my life easier. I’m using two new additional batch files that I’ve written myself and integrated as external tools. These include automated SVN release update and resource refresh and Apache application control (for those who can’t run apache as a service on w32): (more…)

⬅ Newer | Older ➡
Page 47 of 51
or use RSS