hi,
I'm trying to use simplexml to read an xml file and display the contents in a php web page.
My code however gives the error message in the subject.
I've scoured google and the answer you always seem to get is that it is loaded by default in PHP 5 and above.
i am running 5.2.8 but still get this error.
I can only assume that php-xml (? or something similar) has not been built properly in PHP.
PHP and Apache are running on a FreeBSD box.
i also have little to no experience in working on FreeBSD therefore any answers need to be in idiots guide format...
Help please!
Call to undefined function simplexml_load_file()
Moderator: General Moderators
- sunegtheoverlord
- Forum Commoner
- Posts: 28
- Joined: Thu Feb 18, 2010 5:02 am
- sunegtheoverlord
- Forum Commoner
- Posts: 28
- Joined: Thu Feb 18, 2010 5:02 am
Re: Call to undefined function simplexml_load_file()
Additional info:-
I can't see anything on phpinfo() that says anything about simplexml so i'm assuming its not loaded.
I can't see anything on phpinfo() that says anything about simplexml so i'm assuming its not loaded.
Re: Call to undefined function simplexml_load_file()
Look in your php.ini/config file for this
extension=simplexml.so
Remove the ; if there is one.
If you don't have that line you may need to add it. Google the Module name for how to.
Lee
extension=simplexml.so
Remove the ; if there is one.
If you don't have that line you may need to add it. Google the Module name for how to.
Lee
Re: Call to undefined function simplexml_load_file()
SimpleXML is built-in to PHP 5 by default and would have to be specifically disabled during compilation. It's not something you can simply enable - you have to rebuild PHP to get it.
It also requires libxml, so if you don't have that then you won't get SimpleXML.
It also requires libxml, so if you don't have that then you won't get SimpleXML.
Re: Call to undefined function simplexml_load_file()
I understand that under FreeBSD the game changes a little and loading the module could be an option due to a bug when running on FreeBSD and the fact it does not compile correctly when installing. Its been a while so this may have been fixed.