Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-07-2007, 11:22 AM
Junior Member
 
Join Date: Sep 2007
Posts: 1
Default Zend_Rest_Client won't work

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]: &ldquo;mash-up builder&rdquo;, 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]: &ldquo;mash-up builder&rdquo;, 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 &copy; 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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:26 PM.