Suppress PHP Errors

The other day I was checking out some tools on a popular site and got the following PHP error in my browser:

Warning: mysql_connect() [function.mysql-connect]: Too many connections in /****/*****/***/*****.php on line ***

It is important to suppress PHP errors.I blocked out specific directories and line numbers in this post, but the real error message laid it out for all the world to see. PHP developers will be familiar with this and similar errors that PHP kicks out.

The site I visited was relatively high profile and this could be potentially embarrassing, not to mention the problems it could cause. There are many reasons you should suppress PHP errors, except when in development and testing phases. Read more on Suppress PHP Errors…

Read more »

Detect User-Agents: Cloak and Dagger for Web Sites – Part 2

“I’ve heard of User-Agents…”

In a previous post, I introduced you to User-Agents. Now let’s find out why you need to detect them, and how. Read more on Detect User-Agents: Cloak and Dagger for Web Sites – Part 2…

Read more »

Create Random Text in PHP

Want to put a random quote on your site? Or randomize some other aspect of your site? It’s easy. Read more on Create Random Text in PHP…

Read more »

PHP-Based User Authentication

There comes a time for every web designer when it’s necessary to password protect a page. It you’ve never done it before, it can be a daunting task. There’s a lot of options…too many in fact. Do you do it in JavaScript, PHP, ASP, ColdFusion, Perl(CGI), .htaccess, etc? Read more on PHP-Based User Authentication…

Read more »