I'm trying to setup a simple Rest server and client, so to confirm things are working first I tried the example from the Zend Manual (
Zend Framework: Documentation).
However, when I try to run this code:
PHP Code:
<?php
/**
* Connect to framework.zend.com server and retrieve a greeting
*/
require_once 'Zend/Rest/Client.php';
$client = new Zend_Rest_Client('http://framework.zend.com/rest');
echo $client->sayHello('Davey', 'Day')->get(); // "Hello Davey, Good Day"
?>
I get the following errors:
Code:
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 95: parser error : Entity 'ldquo' not defined in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: “mash-up builder”, which extends the wiki concept in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 95: parser error : Entity 'rdquo' not defined in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: “mash-up builder”, which extends the wiki concept in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 118: parser error : Entity 'copy' not defined in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: Copyright © 2006-2007 by Zend Technologies, All rights reserved. in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 120: parser error : Opening and ending tag mismatch: img line 120 and a in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: 50%"><a href="/community/logo"><img src="/images/PoweredBy_ZF_4LightBG.png"></a> in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 120: parser error : Opening and ending tag mismatch: a line 120 and span in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: a href="/community/logo"><img src="/images/PoweredBy_ZF_4LightBG.png"></a></span in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 121: parser error : Opening and ending tag mismatch: span line 120 and div in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: </div> in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 141: parser error : Opening and ending tag mismatch: div line 116 and body in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: </body> in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 142: parser error : Opening and ending tag mismatch: body line 22 and html in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: </html> in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 143: parser error : Premature end of data in tag html line 2 in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Warning: simplexml_load_string() [function.simplexml-load-string]: ^ in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 43
Fatal error: Call to a member function xpath() on a non-object in C:\xampp\xampp\php\library\Zend\Rest\Client\Result.php on line 147
Surely this should work using Zend's example code?
I'm using ZFW 1.0.1 on PHP5.1.6 with all required extensions enabled.