I installed PHP 5.3.2 on my development machine yesterday and had a hard time trying to get PHPMyAdmin to work. I could get to the login screen, but after logging in it just left me at a blank white screen. Nothing in the errors logs. I ended up having to roll back to PHP 5.2. If anyone else has experienced this or can give me some help, I’d appreciate it!
Category Archives: My PHP / MySQL Life
PHP Session Error: Node no longer exists
7 Office Pranks to Lighten the Mood
Are things a little stressful around your office? Maybe try one of these pranks on your co-workers to lighten up the mood.
- Castrating the Mouse
This is a classic. There is nothing more frustrating than having your mouse jump all over the screen or simply not work at all. Most people can’t function with the keyboard alone. Simply remove the mouse ball from the bottom of the mouse and then put the mouse back together like normal. If your co-worker has a mouse with a laser, then you can place a piece of masking tape over the laser to get the same effect. I actually got suspended from my high school for doing this - Where is that sound coming from?
Did you know that you can setup a rule in Outlook to play a sound every time they receive an email? Download a really annoying sound clip and then access their Outlook Rules and Alerts. Create a new blank rule. Apply this rule after the message arrives, on this machine only, play a sound (select the sound clip from earlier), and then click Finish. If you want to drive them nuts, just turn their speakers down so they don’t know where the sound is coming from. To go over the top, turn their speakers way up so everyone else will get a chance to hear. - My Chair Just Isn’t Right
It’s always fun to mess with someone’s office chair. We used to make the height of the chair really low, and then put Vaseline or lotion on the handle used to raise it back up. That way when they go to adjust their chair, they get a nice little surprise. - My Desktop Broke
Get a screen shot of your co-workers screen while they are gone. Hide their task bar, minimize all their applications, and remove their desktop icons to a folder on their hard drive. Now put that earlier screen shot as their background. They will go nuts trying to figure out why nothing happens when they click on things. Even a reboot doesn’t solve the problem! - What’s wrong with my phone?
If you work in a call center, then placing a small piece of transparent tape over the microphone can really cause some hilarity. - My Computer Is Possessed
Using remote assistance software can really lead to some funny pranks. VCN works great and it’s free. Just remote into someone computer while they are gone, then when they come back start controlling the mouse and keyboard on their screen! They will think it’s possessed. - My Computer Is Possessed Part II
If two co-workers computer are in close proximity, switch the mouse or keyboard plugs on the back of the computers. That way they will each have some control of what’s happening on the other’s computer, but without knowing it.
5 Reasons People Still Use Internet Explorer 6
Cross-browser development can be a real pain. Every web developer that has ever had to do a hack to get some part of their website to work correctly in Internet Explorer 6 knows what I’m talking about. Even with IE7 being out for nearly two years, my analytics still show that half of my traffic is using IE6.
Here are 5 reasons they still use an outdated, Swiss cheese security, painfully slow browser.
- They don’t know what a browser is.
I love it when someone comes to me and says, “My internet is broken. When I open it up I see something I’ve never seen before.” Then you find out that all that happened is that their homepage changed. Many people think that the browser IS the internet. Until they can fundamentally grasp what the internet is, they will never have an appreciation for the browser they use. - They don’t know that there are alternative browsers.
Like number one, if they are even capable of identifying what the browser is, most people are unaware that they have choices. They other caveat is the person (like my dad) who, once he finds out he does have a choice, he installs 10 different browsers. If one browser by one company is good, 10 browsers by 10 companies must be even better. - They are afraid of change.
People fear what they can’t understand. They put so much effort into learning how to use a browser correctly that it’s just too much work to switch to something different, even though it could be faster, easier, or safer. - They thought the upgrade notice from Windows was a pop-up ad.
People are really paranoid out there. Going so far as to put multiple firewalls and virus scanning packages on their machines. If they do get a notice to upgrade, they are so distrusting of ad-ware or spy-ware that they typically just ignore it. - They don’t care about having a “good internet experience”.
Hey, they are just glad to be on the “internets”. This makes me wonder if they even care that my CSS doesn’t render properly when they look at my site. Unfortunately my boss uses IE6 and he DOES care if my CSS doesn’t render properly for him.
Please, if you’re viewing this with IE6, switch to a different browser. Even upgrading to IE7 is better than what you’re using now. You’d be doing every web developer a favor by installing Firefox, but Opera and Safari are ok too.
My PHP Sandwich
What if I could control my world the same way that I control a website? Even if you don’t program I think you can understand this:
<?php
// sandwich options
$meat = array('Ham', 'Turkey', 'Balogna', 'Tuna');
$bread = array('Whole Wheat', 'White', 'Potatoe');
$spread = array('Mayo', 'Mustard', 'French Dressing');
// get random sandwich ingredients
$randomMeat = $meat[rand(0,count($meat)-1)];
$randomBread = $bread[rand(0,count($bread)-1)];
$randomSpread = $spread[rand(0,count($spread)-1)];
// make a sandwich
makeSandwich($randomMeat, $randomBread, $randomSpread);
/**
* makes a sandwich out of the given ingredients
*
* @author Tim Golen (tg)
* 04/08/2008 - (tg) created function
* @param string $meat
* @param string $bread
* @param string $spread
* @return array
*/
function makeSandwich($meat, $bread, $spread){
$mySandwich = array(
$bread,
$spread,
$meat,
$bread);
return $mySandwich;
}
?>
Things I wish I would have been told when I started developing
Throughout the course of my development career I have come across my own pearls of wisdom. I wish that someone would have been there when I started developing to tell me these things and it probably would have saved me a lot of time and work. On the other hand, maybe it was learning these things on my own that helped me be the best developer I can be.
- If you write the same code more than once, you’re doing something wrong. Early on I can remember copying and pasting the same function into multiple files, then every time I had to change something in that function I had to update it in 20 different files. Today I still catch myself making notes in my code like “DUPLICATE FUNCTION EXISTS IN SUCH AND SUCH FILE”. Your code will be so much more efficient if you develop a way to never write the same code more than once.
- If you have the same information stored in different database tables, you’re doing something wrong. If you are storing the same kind of information in multiple tables, then your database is inefficient. Some people do this to hopefully speed up their queries, but there are much better solutions to that problem.
- If your database tables contain lots of null values, you’re doing something wrong. You should design your database in such a way that you never have any null values (unless they are unavoidable, which is hardly ever the case). Null values take up space and it’s inefficient to take up space with nothing.
- If you have the exact same data stored in more than one place, you’re doing something wrong. This is also taking up space unnecessarily and is poor database design.
- Learn how to code valid XHTML and do it. Standards aren’t standards unless everyone is trying to abide by them. With better standards in place, browsers can begin to be more compliant.
I hope these tips are useful to you.