(PHP5 on Apache Mac OSX.4 local server)
I tried
$xml = simplexml_load_file('test.xml');
and my script kept failing :bemused:
so I resorted to
$string = <<<XML
<?xml version='1.0'?>
<document>
<title>Forty What?</title>
<from>Joe</from>
<to>Jane</to>
<body>
I know that's the answer -- but what's the question?
</body>
</document>
XML;
$xml = simplexml_load_string($string);
This also failed. :xbones: So I uploaded to my Freedon to surf website and got error messages ...
Can anyone help me move on here ? How does your script fail?(with a simple file xxx.xml uploaded) I receive
Fatal error: Call to undefined function: simplexml_load_file() in /web/sites/242/rd2/www.rd2.f2s.com/triv.php on line 23
The script checks that the .xml file is found by the script <!-- m --><a class="postlink" href="http://www.rd2.f2s.com/triv.php">http://www.rd2.f2s.com/triv.php</a><!-- m -->
[Many thanks for your interest]It's entirely possible that the simplexml extension is not compiled in / loaded on your web server's instance of Apache.
Because simplexml is enabled by default in PHP5, it seems likely that they're not running PHP5. Have you checked the output of phpinfo() and/or your hosting provider's blurb?
If you create an application for PHP 5, you will need a host to be running PHP5 to be able to run it.
MarkOK on my webhost (F2S) PHP 4.3.10
However on local server PHP 5.0.4 ... I've run the script again locally I don't get an error message but var-dump() doesn't return anything to the screen and an echo to suggest the script is still alive returns nothing ... so is this the way Apache is set ?See the list of requirements (all one of them) that the PHP manual lists for SimpleXML.Well those requirements sure look complicated ... I've searched my http.conf file and there is no mention of simpleXML let alone disable so I'm still puzzeledWell those requirements sure look complicated ... Which bit ofRequirements
The SimpleXML extension requires PHP 5.are you having trouble with?I have PHP 5 on my own machine ... so I can't understand why my simple call failsstart with phpinfo(). does it show that simplexml is in fact installed. PHP5 alone does not a simplexml setup make.I have PHP 5 on my own machineYes, but your host doesn't. I thought that would be relevant.
I tried
$xml = simplexml_load_file('test.xml');
and my script kept failing :bemused:
so I resorted to
$string = <<<XML
<?xml version='1.0'?>
<document>
<title>Forty What?</title>
<from>Joe</from>
<to>Jane</to>
<body>
I know that's the answer -- but what's the question?
</body>
</document>
XML;
$xml = simplexml_load_string($string);
This also failed. :xbones: So I uploaded to my Freedon to surf website and got error messages ...
Can anyone help me move on here ? How does your script fail?(with a simple file xxx.xml uploaded) I receive
Fatal error: Call to undefined function: simplexml_load_file() in /web/sites/242/rd2/www.rd2.f2s.com/triv.php on line 23
The script checks that the .xml file is found by the script <!-- m --><a class="postlink" href="http://www.rd2.f2s.com/triv.php">http://www.rd2.f2s.com/triv.php</a><!-- m -->
[Many thanks for your interest]It's entirely possible that the simplexml extension is not compiled in / loaded on your web server's instance of Apache.
Because simplexml is enabled by default in PHP5, it seems likely that they're not running PHP5. Have you checked the output of phpinfo() and/or your hosting provider's blurb?
If you create an application for PHP 5, you will need a host to be running PHP5 to be able to run it.
MarkOK on my webhost (F2S) PHP 4.3.10
However on local server PHP 5.0.4 ... I've run the script again locally I don't get an error message but var-dump() doesn't return anything to the screen and an echo to suggest the script is still alive returns nothing ... so is this the way Apache is set ?See the list of requirements (all one of them) that the PHP manual lists for SimpleXML.Well those requirements sure look complicated ... I've searched my http.conf file and there is no mention of simpleXML let alone disable so I'm still puzzeledWell those requirements sure look complicated ... Which bit ofRequirements
The SimpleXML extension requires PHP 5.are you having trouble with?I have PHP 5 on my own machine ... so I can't understand why my simple call failsstart with phpinfo(). does it show that simplexml is in fact installed. PHP5 alone does not a simplexml setup make.I have PHP 5 on my own machineYes, but your host doesn't. I thought that would be relevant.