my life

day to day

Archive for June, 2006

Segmentation Fault

Friday, June 30th, 2006

Came across by accident something you shouldn’t do in PHP5. Try and construct yourself in your constructor (silly little typo led me to this one).

http://bugs.php.net/bug.php?id=37976

Where upon they reply…

30 Jun 9:50pm UTC] judas dot iscariote at gmail dot com

this is the expected behaviuor, if you want recursion control to aid development or something, install xdebug.
[30 Jun 10:08pm UTC] tony2001@php.net    

Yes, endless recursion is likely to eat all the RAM and/or cause a crash.  That was already reported thousands of times.

To say that segmentation faulting is the expected behavior is a copout. The problem is with the with zend_str_tolower_copy(…) not gracefully handling a memory allocation failure and deliberately aborting. Using the operating system as an “Exception” handler is IMHO sloppy and not a best practice. Sure, the problem is the fault of the developer (as is usually the case) — two fold. The problem is with the implementation of the PHP interpreter and on the PHP developer for creating the recursion.

add to del.icio.us    add to technorati favs   email this

Referrer Spam

Monday, June 26th, 2006

Blocking referrer (aka referer) SPAM using mod_rewrite is nothing original. But for what it’s worth, here is my conf. It’s a symlink to my current copy, so it will always be up-to-date.

referrer-spam.conf

 If you’re running Debian, just put it in /etc/apache2/conf.d and run

apache2ctl restart

A nice updated list of spam referrers can be found at

http://www.glop.org/referrers/faking-referrers.txt

 You can test it by clicking on http://osterman.com/test-referrer-spam

 

add to del.icio.us    add to technorati favs   email this

XP Shadows

Saturday, June 24th, 2006

Free application to get window shadows in XP.

http://www.osx-e.com/downloads/utilities/yzshadow.html

add to del.icio.us    add to technorati favs   email this

XP Docker

Saturday, June 24th, 2006

After being just reminded how cool the Apple docker app is, I decided to install one for XP. Here’s a nice one:

http://www.punksoftware.com/download?project=RocketDock

 

add to del.icio.us    add to technorati favs   email this

Windows XP Themes

Saturday, June 24th, 2006

Windows Xp themes are controlled by uxtheme.dll. Problem is, that it is locked by default so you have to purchase themes from Microsoft. In other words non-Microsoft visual styles cannot be used. Fortunately, it is easy to unlock uxtheme.dll to allow the use of non-Microsoft visual styles.

http://www.neowin.net/forum/index.php?showtopic=339820

Then go get your XP all tripped out over at deviantART

http://browse.deviantart.com/customization/skins/windows/visualstyle/?order=9&alltime=yes

add to del.icio.us    add to technorati favs   email this

DIV Maddness

Thursday, June 22nd, 2006

Did you know you can render a image in pure HTML/CSS? Just a stupid proof of concept that might crash your browser. Check it out http://osterman.com/div-maddness/

 

add to del.icio.us    add to technorati favs   email this

Rat Zapper

Thursday, June 22nd, 2006

Rat ZapperSay goodbye to the age old Victor Mouse traps and welcome the new generation of traps. They’re essentially an electric chair, but designed to electricute the unsuspecting rat or mouse. Designed by AgriZap, you can findout where to buy them at http://www.ratzapper.com/

All I did was set the trap in the morning by placing some dog food at the far end of the device. I checked it in the afternoon and had already killed my first rat. Felt bad I had to kill the cute little bugger.

 

 

add to del.icio.us    add to technorati favs   email this