Archives for the ‘php’ Category

Building somethng scalable: language / frameworks aka use ror or php

By admin • Nov 13th, 2008 • Category: Building Something Scalable, php
If you’re new here, you may want to subscribe to my RSS feed. Thanks for visiting!When I first started this experiment I planned on using a custom php framework. Recently I realized that its kinda pointless to attempt to do something like this and at the same time lock myself into something that may […]


Php: Displaying errors

By admin • Sep 21st, 2008 • Category: php, programming, rants
Today I got into a wonderful debate about php errors. I myself prefer to have the system handle the suppression of errors at system init (turn error displaying to off), and only use error suppression (@function) when needed. Why? @function is slower than function. Why add a performance decrease when its not needed? Anyways wondering what others think […]


framework: progress - alpha 0.02

By admin • Sep 21st, 2008 • Category: Projects, news, php, programming, rants
So after years of partial frameworks, and various concepts, I’ve finally started my framework. First off there is NO windows support. I’m sure that’s not the best way to go, but I can’t think of one reason to host a php app on windows. As noted windows isn’t supported, but I’m working on a linux […]


php tip: securing .inc include files

By admin • Aug 17th, 2008 • Category: php, programming
just a quick tip for anyone using .inc files via apache. add the following to your apache configuration to prevent viewing of .inc files via the web. This will not prevent php from including the files locally <FilesMatch “\.inc$”> Deny From All </FilesMatch> There ya go, now feel free to use .inc files as much as you’d like. Also an […]


regex for extracting root domain

By admin • Aug 15th, 2008 • Category: php, programming
I don’t remember if i’ve already posted this. Sometimes you need to extract a domain name from a url. The following regex will do just that regardless of subdomains, etc. /^[a-z0-9.-]*?[.]{0,1}([a-z0-9-]*?\.[a-z.]{2,7})$/i


php: holy T_PAAMAYIM_NEKUDOTAYIM error batman

By admin • Aug 6th, 2008 • Category: php, programming
I got a T_PAAMAYIM_NEKUDOTAYIM error in php a few days ago. I feel special as this appears to be considered an elusive error, but then again I’ve been feeling special since yellow buses. heres what created my error : if(empty(SOME_SYSTEM_DEFINED_CONST)) You can find out more here: www.johnlamansky.com/blog/t_paamayim_nekudotayim/


Your not crazy: Ubuntu doesn’t provide complete gd support in php5-gd

By admin • Jul 15th, 2008 • Category: linux, php
After thinking I was merely going crazy I’ve found out why php doesn’t seem to support all image functions. Ubuntu’s php5-gd package uses an older version of gd. So uninstall php, and build from source More on this issue: bugs.launchpad.net/ubuntu/+source/php5/+bug/74647


Good phpbit wise tutorial with easy to remember way to count binary

By admin • Jun 16th, 2008 • Category: php
Jim Plush has written a pretty decent overview of php’s bitwise functions. My only complaint is I wish he’d also used even numbers so readers could understand flag systems, but you can’t win them all As an added bonus, he’s included a comic that explains binary counting in a way you’ll never forget ( If only […]


php: Serpent encryption class

By admin • May 13th, 2008 • Category: encryption, php
Php Serpent class using mcrypt. requires two md5 keys for encryption You can download from: http://gregsidberry.com/wp-content/uploads/2008/05/Serpent.inc


php: aes Rijndael encryption class

By admin • May 13th, 2008 • Category: encryption, php
Php aes [ Rijndael ] class using mcrypt. requires two md5 keys for encryption You can download from: http://gregsidberry.com/wp-content/uploads/2008/05/Rijndael.inc