I had one of those ‘gotcha’ moments yesterday when testing a contact form I had made for a client. The issue (and fix) is painfully obvious once you see it, but it did leave me scratching my head for about an hour so I thought it was worth writing down.
The form worked as expected in Firefox, Safari and Opera (I develop on a mac), but when I tested in IE 6 & 7 nothing happened - you’d click the submit button but the form would not be processed… a rather serious usability issue you might say.
Read the rest of this entry »
I like to give my hosting clients the ability to check their website statistics without having to log into cPanel. There is no native way to do this through WHM or cPanel so I have created a little Perl script to automatically make Webalizer stats public when a new account is created. If you would like to offer stats outside of cPanel, copy the following code into a file called postwwwacctuser and upload to your scripts folder, remembering to make the script executable. For more information on postwwwacctuser please see the cPanel/WHM Hooks page.
Read the rest of this entry »
Add this to the .htaccess file if you are having troubles with php scripts timing out.
<IfModule mod_php4.c>
php_value max_execution_time 120
</IfModule>
IE can sometimes display a very confusing 3px gap (as described here). If the Holly Hack (height: 1%) won’t work try:
/* hide from MacIE */
* html #sidebar { margin-right: -3px; }
* html #content { margin-left: 0; }
/* end hide */
While looking at a site the other day I noticed a PHPSESSID token appended to the URL, here’s how to get rid of it… in the .htaccess file tell php to store the token in cookies, rather than pass the variable through the URL:
## add to .htaccess
php_value session.use_only_cookies 1
php_value session.use_trans_sid 0