Cant instantiate XMLReader for Windows

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
xsaero00
Forum Newbie
Posts: 6
Joined: Mon Sep 19, 2005 6:23 pm

Cant instantiate XMLReader for Windows

Post by xsaero00 »

Have any one tried to use XML Reader with Windows. I tried 5.1 Release Candidate 1 and also some latest snapshots but I can’t get XMLReader to work. It seems like all you have to do to enable XMLReader is to add a new line to php.ini: extension=php_xmlreader.dll and it should work. But instead it gives me a class not found error.

The documentation for XMLReader is really scarce and since all development is done on other platforms I am having trouble finding out what is the reason for the problem.

XMLReader is supposed to be a very fast and light weight XML parser and comes prepakaged with 5.1
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Do you have other classes (other than the out-of-the-box ones) enabled and working?

Is the extension_dir directive set correctly?

I've found with some extensions I have to put the files in the system32 folder, they just will not work anywhere else not matter what I put in php.ini.

HTH :)
User avatar
n00b Saibot
DevNet Resident
Posts: 1452
Joined: Fri Dec 24, 2004 2:59 am
Location: Lucknow, UP, India
Contact:

Post by n00b Saibot »

Jenk wrote:I've found with some extensions I have to put the files in the system32 folder, they just will not work anywhere else not matter what I put in php.ini.
Yeah, other day I was trying to enable cURL on my localend when I saw it in the manual that I had to copy two dlls to my system32 folder otherwise it just wouldn't load.
xsaero00
Forum Newbie
Posts: 6
Joined: Mon Sep 19, 2005 6:23 pm

Post by xsaero00 »

Jenk wrote:Do you have other classes (other than the out-of-the-box ones) enabled and working?
Yes. I have my own classes plus some of built in, like Tidy, working. I'll try putting extension in System32, but it does not seem like an elegant solution to me.
xsaero00
Forum Newbie
Posts: 6
Joined: Mon Sep 19, 2005 6:23 pm

Post by xsaero00 »

Nope. Putting dll in System32 did not help.

This XMLReader is supposed to be very nice and, judging by description, is exactly what I need for my project but with such poor documentation and support it is no use. I wonder if anybody at all was able to use it under Windows.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

do you have libxml installed? it's listed as a dependant of the library....
xsaero00
Forum Newbie
Posts: 6
Joined: Mon Sep 19, 2005 6:23 pm

Post by xsaero00 »

I got it to work. I reverted to PHP v 5.0.5 and downloaded precompiled dll from snaps.php.net.

Thanks for help.
Post Reply