Ampere's Law states that
[tex]
\oint B dl = \mu_{o}I_{enc}[/tex]
If you look at the expression for Ampere's Law (as it is written above) and compare it with Gauss's Theorem in Electrostatics which states that
[tex]
\oint E dS = \frac{Q_{enc}}{\epsilon}[/tex]
you will find the degree of closeness in these expressions. This closeness is explained mathematically using very important theorems in Vector Calculus (Green's Theorem or Gauss's Theorem). These theorems hold for vector functions in general and there is nothing very special about electric field or magnetic fields except one extremely special property of electrostatic electric fields, which is that the line integral of E taken over a closed path is zero, i.e.
[tex]
\oint E dl = 0[/tex]
If you understand these basic facts, you should have no trouble in understanding why the Gauss's Theorem is "inaccurate" from the point of view that you have. Suppose I want to determine the electric field due to an infinite line of charge. Let's say I do this using Gauss's Law. Utilizing the fact that the electric field is radial and uniform, I choose a Gaussian surface which is a cylinder of radius r and length L concentric with the wire. If [tex]\lambda[/tex] be the linear charge density associated with the wire, then [tex]Q_{enc} = \lambda L[/tex] is the charge enclosed by it. The integral,
[tex]
\oint E dS = \frac{Q_{enc}}{\epsilon}[/tex]
simplifies to
[tex]
E \oint dS = \frac{\lambda L }{\epsilon}[/tex]
The surface integral is simply the surface area of the cylinder S where
[tex]
2\pi r LE = \frac{\lambda L}{\epsilon}[/tex]
At this stage you should see a funny thing: I choose L to be the length of my Gaussian surface, but L cancels out and the expression I get for E after that is what I call E for the entire wire! How can I say THAT? When I didn't integrate over the length of the wire! Most of all, WHY DID I CANCEL L? L is supposed to be infinite isn't it! How can I cancel a quantity that is infinite, on both sides of an equation?
Thats what you should be worrying about. Now try and use this idea in Ampere's Law to find the magnetic field outside an infinite conducting wire carrying a current I. You will reach a similar conclusion.
If you're still wondering why this "paradox" has crept in into Physics, you should know that it isn't a paradox if I write dL instead of L, because mathematically I am allowed to subdivide an infinite length into infinitesimal elements of size dL. After all dL is neither zero nor infinity! It tends to zero but it isn't quite zero you see. Calculus is correct here. I should write EdS = (1/epsilon)*dQ and write dQ = lambda * dL and dS = 2*pi*r*dL. That way, dL cancels out and I get a correct expression.
Alternatively I could define L as a very small quantity that is not zero (nor infinite). This seems a hardly convincing explanation but cancelling out L is the only reason which makes you think Ampere's Law--or for that matter Gauss's Law--does not involve the length of the conductor. It doesn't :-)...
Cheers
Vivek