Posts Tagged ‘Bugs’

IE7 fieldset input position bug

// December 1st, 2006 // No Comments » // HTML/CSS, Web Development

Whilst developing some view related material for a new project I’ve been working on I came across this rather puzzling that affects various types of input fields in Internet Explorer 7 (I haven’t checked to see if it occurs in lower versions of IE):

Basically, when an input tag is surrounded by a fieldset tag which is surrounded by a containing tag such as a div with a left margin, the input tag inherits the margin defined in the containing div. Here’s an example of what I mean:

(div style=”border: #ccc 1px solid”)
(div style=”margin: 50px; border: blue 1px solid”)       Container with 50px margin
(fieldset)
(legend)Fieldset(/legend)
(input type=”file” /)
(input type=”checkbox” value=”on” /) Checkbox is not affected
(/fieldset)
(/div)
(div)

If you try this in IE you’ll see that the file input box inherits the 50px margin. Very odd indeed!

Anyway, after a quick browse on the web I found the solution (and the cause of the problem):

Simply surround your input fields with a containing div (don’t use a p tag if it’s within a form tag as it will break page validation) and set the margin of that div to 0.

Issue with PHP 5.0.4 and MySQL 4.1+

// July 31st, 2006 // No Comments » // Databases, Web Development

Now, this is quite an interesting little issue, and one which I discovered whilst trying to set up this very blog – the famous 5 minute install turned into a much less famous, though equally prolific I’m sure, 3 hour install – I’m used to it though, I’m a software developer afterall!

Anyway, the issue revolves around the MySQL client version that’s bundled with versions of PHP prior to 5.1 (I’m not sure if this version suffers from the same problem). The client version is 3.23.58 and it turns out that it doesn’t support the new password encryption format being used in MySQL versions 4.1 and above. What a pain.

“So what options does one have?” I hear you cry.

  1. You can install MySQL v4.0.xx (I’ve invested enough time with v5.0 so not likely!)
  2. Try upgrading to the very latest version of PHP hoping that their MySQL client is an updated (I’m not 100% if this will solve the problem – certainly I tried this and had no success. MySQL is also disabled by default in PHP 5 so there is an extra level of configurmuration)
  3. Enable a flag telling MySQL to use the old password method (I chose this option in the end)

If you have MySQL Administrator GUI installed, you can use it to connect as ‘root’ and check the flag to use old password under the server configuration tab. Alternatively, you can run mysql with the –old-passwords flag, which does exactly the same thing.

Deep joy!