  We investigate the influence of the matter along the line of sight and in the
lens environment on the image configurations, relative time delays, and the
resulting models of strong gravitational lensing. The distribution of matter in
space and properties of gravitationally bound haloes are based on the
Millennium Simulation. In our numerical experiments we consider isolated lens
in a uniform universe model and the same lens surrounded by close neighbours
and/or objects close to the line of sight which gives four different
descriptions of the light propagation. We compare the results of the lens
modeling which neglects effects of the environment and line of sight, when
applied to image configurations resulting from approaches partially or fully
taking into account these effects. We show that for a source at the redshift
z=2 the effects are indeed important and may prevent successful fitting of lens
models in a substantial part of simulated image configurations, especially when
the relative time delays are taken into account. To have good constraints on
the models we limit ourselves to configurations of four images. We consider
eighty lenses and large number of source positions in each case. The influence
of the lens neighbourhood and the line of sight introduces the spread into the
fitted values of the deflection angles which translates into the spread in the
lens velocity dispersion of 4 per cent. Similarly for the lens axis ratio we
get the spread of 10 per cent and for the Hubble's constant of 6 per cent. When
averaged over all lenses and all image configurations considered, the median
fitted values of the parameters (including the Hubble's constant) do not differ
more than 1 per cent from their values used in simulations.
