Losing POST data (was: mod_perl and XML::LibXML)
[prev]
[thread]
[next]
[Date index for 2005/03/19]
--=-N96rwZ5vB1jNe+hSAouH
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
On Fri, 2005-03-18 at 03:15 -0600, D. Hageman wrote:
> On Thu, 17 Mar 2005, Stas Bekman wrote:
>=20
> > James Orr wrote:
> >> Hi,
> >>=20
> >> I have an occaisional error happening with a module i'm using from a
> >> mod_perl script. This is in my "new" method ...
> >>=20
> >> my $ifh =3D IO::File->new($project_dir.'/info.xml') || die "Can't open
> >> info file: $!";
> >> $data->{'info'} =3D $parser->parse_fh($ifh);
> >>=20
> >> And the error it gives is ...
> >>=20
> >> read on filehandle failed: Can't use an undefined value as a symbol
> >> reference at /usr/lib/perl5/site_perl/5.8.4/i686-linux/XML/LibXML.pm
> >> line 336.
> >>=20
> >> By occaisional I mean that this error has occured 21 times in over
> >> 21,000 hits.
> >
> > James, assuming that you don't use any eval {} blocks, try to install:
> >
> > use Carp;
> > $SIG{__DIE__} =3D \&Carp::confess;
> >
> > (e.g. at the startup or your script)
> >
> > so the next time it fails you will see the exact calls trace. You can f=
urther=20
> > expand that sighandler to dump more information to figure out what trig=
gers=20
> > the problem, helping you to define a reproduceable at will test program=
which=20
> > can them be easily solved.
>=20
> Stas does have a good recommendation here, so please don't discount it. =
I=20
> should point out the XML::LibXML module can read directly from a file. I=
s=20
> there a specific reason why you don't use that method? Search for the=20
> parse_file( $filename ) method. I am interested in seeing if a specific=20
> problem exists in the XML::LibXML module though as it is a module I=20
> generally track and use quite often. Currently it is using methods that=20
> are deprecated in the C library and it needs to be transitioned to a new=20
> logic. As time permits of course ...
I used to use parse_file but I was running into problems with
XML::LibXML not closing the file properly. Using IO::File and then
parse_fh solved that problem.
I found out a little more about my problem ... it's not anything to do
with XML::LibXML at all. It seems that sometimes i'm losing my POST
data. A few times i'm seeing GETs where they should be POSTs as well,
this could also be explained by the user bookmarking and then trying to
return to the bookmark, but that doesn't explain the times it happens
with a POST request.
My mod_perl version is 1.29 running on apache 1.3.33.
--=20
James Orr <james@xxxxxxx.xxx>
--=-N96rwZ5vB1jNe+hSAouH
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQBCO3FakcMa/XGnIkgRAmzJAJ4rI/piyD34JAwstvK2sXPSlrebAwCfdkNz
dtkCLcpNUpNfAmppU/na1vM=
=nVWu
-----END PGP SIGNATURE-----
--=-N96rwZ5vB1jNe+hSAouH--