Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T. PHP (incl PhpMyAdmin)
php mysql extension not loading/Quick Install of a WIMP stack (PHP, MySQL, PHPMyAdmin on Windows XP and IIS)
On a fresh php installation (on WinXP using IIS 5) the mysql extension did not load. This turned out to be because php could not find the libmysql.dll library - to resolve just put the php dir (eg "c:\xampp\php) and the ext dir (c:\xampp\php\ext) into the PATH environment variable (and restart iis). To verify your php configuration, create a php file with the following content: <?php phpinfo(); ?> Save this as something like info.php into your web root dir and navigate to it with a browser ......

Posted On Wednesday, February 4, 2009 12:47 PM

Firefox 3 ignores cache control http headers - security risk for online apps!
If a user, using Firefox 3, signs out of a web site and does not close the browser, anyone else using that browser subsequently can view the content of pages loaded by the previous user (eg in an internet cafe, or any place where workstations are shared eg universities) - exposing private/confidential data. This only affects HTTP post requests (not gets) and only Firefox version 3 - earlier versions (1.5, 2 etc), and IE, are not affected. The main points are: This is definately a bug: a violation ......

Posted On Friday, September 26, 2008 3:17 PM

CSS Absolute positioning in Firefox and IE
A couple of notes regarding absolute positioning in FF and IE... Specifying position values: IE allows you to omit the unit of measurement for Left and Top. It assumes pixels eg: obj.style.Left = 10; However FF requires that you specify the unit of measurement eg: obj.style.Left = "10px"; Using other elements parents to calculate your object's position: The scenario might be you have a div that you want to position over or by another object - but that object has no position values. In this case I ......

Posted On Saturday, September 6, 2008 9:57 AM

Web development client side debugging - display area, javascript injection and accessing the dom at runtime
For those of you who don't have access to IE or FF dev toolbars - this is how we used to do client side runtime debugging... Drop the following code into your web page (preferrably at the bottom): <script> function log(text){ document.getElementById("lo... = text; } function dump(){ log(document.body.innerHTML); } function logProps(obj){ var msg = ""; for(var i=0;i<obj.attributes.len... { msg+=obj.attributes[i].node... + ": " + obj.attributes[i].nodeValue + "\r\n"; } log(msg); ......

Posted On Friday, July 11, 2008 10:52 AM

Scuttle import bookmarks not working
With a clean install of Scuttle I found that both the import bookmarks pages (importNetscape.php and import.php) do not work - instead the both display the source of the PHP files. This is caused by both files not having the correct php declaration at the beginning of the file eg -both of these files first line was: <? However they should have been: <?php So just simply update these files. HTH Tim ......

Posted On Friday, July 4, 2008 12:14 PM

Scuttle throwing PHP errors: Passing locale category name as string is deprecated. and Invalid locale category name LC_MESSAGES, must be one of LC_ALL,...
I got the following error on a fresh install of Scuttle (0.7.2) on a newly created Windows Server 2003 with PHP (5.2.6), MySQL5.0.51b) and IIS 6: Warning: setlocale() [function.setlocale]: Passing locale category name as string is deprecated. Use the LC_* -constants instead in C:\Inetpub\Scuttle\includes... on line 131 Warning: setlocale() [function.setlocale]: Invalid locale category name LC_MESSAGES, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME ......

Posted On Friday, July 4, 2008 8:15 AM

IE and Firefox compatible javascript to reference a single object or a collection of child objects in the DOM
To obtain an object or a 'all' collection of child objects somewhere in the DOM you can use something like this: var all, myObj; if (document.all) { // IE; all = document.all["myParentObj"]... myObj=document.all["myFormE... } else{ if(document.getElementById(... && document.getElementById("my... all = document.getElementById("my... myObj=document.getElementBy... } else alert("Error: This application does not ......

Posted On Wednesday, January 18, 2006 11:43 AM

Getting PHP 5.2.6 and MySQL (and PHPMyAdmin) working on IIS 6 Windows 2003 Server
It seems every time I try to install PHP and MySQL something doesn't work - usually there's either a file missing from the PHP distro or something in the install notes is missing or incorrect. This time it was both. I first tried the PHP msi install - first mistake. As it does not include the MySQL extensions - neither does the 5.2.6 PECL zip file (I mistakenly thought this would include all the extensions). So if you've installed PHP using the MSI installer - uninstall it (via Control Panel - Add/Remove ......

Posted On Wednesday, July 2, 2008 9:18 AM

Centering div tags using CSS
As text-align doesn't work I use a simple work around: .mydiv{ width: 100%; left: 50%; } It's not perfect - but very simple and easy to understand - and you can modify it to suit. Seems to work ok in IE 6 & FF 2.0. Here's another method (http://www.andybudd.com/ar... - but I found it not obvious/simple enough (expecially for others who may have to maintain the css down the track - KISS) HTH Tim ......

Posted On Tuesday, May 15, 2007 5:11 PM

Printing nicely from the web: Printing web pages or alternate documents
Many web pages are not designed with any consideration for printing - this is one of those annoying things that one comes across more often than not. Here are a couple of simple ways to make sure your pages are printed in a formatted way: Use a specific print style sheet. This is the most common approach used on the web. The idea being you create another stylesheet that is specifically for formatting your web page(s) for printer output. There are many examples on the web of how to do CSS so I won't ......

Posted On Tuesday, October 31, 2006 12:30 PM

DOM Inspector missing from Firefox 2.0
If you've just installed Firefox 2.0 and found that the DOM Inspector is missing, here's how to add it: Run the Firefox 2.0 install again. Choose to do a Custom install (not the default of Standard) Make sure DOM Inspector is selected. Complete the install. I had previously posted a solution for missing DOM Inspector for Firefox 1.x here. However that solution does not work with Firefox 2.0. HTH Tim ......

Posted On Wednesday, October 25, 2006 12:46 PM

Error using client certs: The page requires a valid client certificate (403.13). How to turn off CRL checks in IIS.
The following error may occur when trying to use a client cert for the first time (this error is from IIS 5): The page requires a valid client certificate The page you are trying to view requires the use of a valid client certificate. Your client certificate was revoked, or the revocation status could not be determined. The certificate is used for authenticating you as a valid user of the resource. HTTP 403.13 - Forbidden: Client certificate revoked The cause of this is usually "the revocation status ......

Posted On Monday, June 12, 2006 9:57 AM

CSS nowrap alternative
To achieve the same results as a TD nowrap (<td nowrap="true">) using cascading style sheets, use the following: white-space: nowrap; This style attribute only applies at the TD element level ie needs to be applied to each TD, ie not the the TR or TBODY. If you're desparate to not apply it to each TD, then you can get away with only applying it to the TD's of the first row - but this is only effective if applied to the cells containing thelongest data (so IMHO is a half-baked approach - ie ......

Posted On Sunday, April 16, 2006 4:48 PM

IE bug: HTTP POST with zero content-length (content-length = 0) (even though there is data in the post request)
This little gem comes to us courtesy of MS's IE, whereby it resets the connection and sets content-length to 0 (zero), even though there is data in the post request, when the keep-alive timeout expires. Fortunately this only occurs when using HTTPS, and apparently it's limited to a particular version of IE (although I'm not 100% convinced about this). This bug is documented very well here and by ibm here, and an typically difficult to understand MS solution here. Another solution I think may work ......

Posted On Thursday, January 26, 2006 2:35 PM

IE and Firefox compatible javascript to enable or disable an anchor tag
IE supports provides a half-baked implementation of the non-standard attribute 'disabled' on anchor tags (ie it changes it's color -even though it does not actually disable the anchor (if it has an href value). Firefox does not provide any support for it. To add full 'disable' functionality to both browsers there are a couple of work arounds (hacks): Override the onclick event of the anchor (to do nothing) and override the visual settings. or, more simply Add or remove the href attribute (both browsers ......

Posted On Thursday, January 19, 2006 12:54 PM

IE and Firefox compatible javascript to reference innerText/text attribute
function getObjInnerText(obj){ if (document.all) { // IE; return obj.innerText; } else{ if (obj.text) { return obj.text; } else alert("Error: This application does not support your browser. Try again using IE or Firefox."); }} ......

Posted On Thursday, January 19, 2006 11:12 AM

Cheatsheet: Quick install PHP and PhpMyAdmin
These notes apply to PhpMyAdmin 2.6.4-pl3 on a Windows box (in my case XP Pro). PHP v 5 (5.1.4): Unzip download eg into c:\php Add the php dir to the PATH environment variable. Copy php.ini-dist into windows dir (eg c:\windows) as php.ini (the php install docs incorrectly state that you only need to add the php dir to the PATH env var - and dont have to move any files into the windows dirs - however that's bollocks - at a bear minimum you need the ini in your windows dir.) NOTE: This is the development ......

Posted On Monday, October 31, 2005 3:25 PM

PHPMyAdmin - Client does not support authentication protocol requested by server; consider upgrading MySQL client
This seems to be quite a common error for many people installing PhpMyAdmin for the first time. The phpmyadmin (pma) docs mention it - basically stating that the mysql client is out of date. In the past I've solved this by updating my version php, and also by using the manual install as the windows installer package uses (well it used to) an old version of the mysql client library. However today I discovered a simple workaround here (thanks a million to Ram Prasad who posted it!!!!) - and what a ......

Posted On Monday, October 31, 2005 6:39 AM

Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net