Hello all
I’ve been running a local LAMP server for development purposes and have hit a rather embarrassing snag. I can’t get the XML parser to run.
I would be very grateful for step by step instructions on the enabling of the parser module.
Hello all
I’ve been running a local LAMP server for development purposes and have hit a rather embarrassing snag. I can’t get the XML parser to run.
I would be very grateful for step by step instructions on the enabling of the parser module.
Which XML parser is this? Show us the PHP function call.
I didn’t realise php had more than one xml parser. It’s invoked thus: $this->xmlParser = xml_parser_create();
Oh, there are XML parsers and XML parsers. There are SAX style parsers and DOM style parsers, and others. Anyway, putting xml_parser_create into the search box at PHP: PHP Manual - Manual shows that these XML parser functions are built-in by default. And a quick CLI PHP program doesn’t give any errors when run.
<?php
$x = xml_parser_create();
print_r($x);
?>
What’s not working for you?
Until now, invoking this function has caused the php parser to exit. However I’ve kept fiddling and just now I installed xml_reader - with that in place the php parser doesn’t terminate, but neither will the xml (an rss feed) parse, it seems.
I’m using someone else’s script, under the GPL. The code seeks to parse the RSS, check the version and go from there. Unfortunately the version variable stays null and from my investigations of a couple of minutes so does everything else. It’s not extracting any information.
I could give you a link to where I got this code, but I’d be happier with a “use this, it’s flawless” kind of answer
Maybe ask the author of the code?
Indeed, now that the thing isn’t throwing a wobbly at every request to create a parser instance, that seems reasonable. Although I’m perplexed at a core function crashing until I added a module.
Thank you for your efforts.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
That’s fairly standard with a lot of software. The function literally
didn’t exist until you added the module. This is nice because there are
potentially hundreds of modules. With most of those not installed your
server is faster, has fewer potential issues with interoperability,
fewer potential attack surfaces, etc.
Good luck.
Solar Granulation wrote:
| Indeed, now that the thing isn’t throwing a wobbly at every request to
| create a parser instance, that seems reasonable. Although I’m
| perplexed at a core function crashing until I added a module.
|
| Thank you for your efforts.
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIlwhW3s42bA80+9kRAkitAJ9TS2GhD4WtMBBiQ7ZZpmU0fuNRhACfeDwN
NbRsybFrcE0k0lVmSdQhP6k=
=sC8Y
-----END PGP SIGNATURE-----