zend framework - Zend_Http_Client::PUT not working -


Trying to update your records via the PUT method

  $ client = New Zend_Http_Client (); $ Customer & gt; SetMethod (Zend_Http_Client :: PUT); $ Customer & gt; SetUri ('http://example.com/api/type/'); $ Client- & gt; SetParameterPost (array ('useremail' = & gt; '***** @ *******', 'apikey' = & gt; secretcanc, 'expenseid ='> & gt; 4 ',' description ' = & Gt; 'Test Web API', 'Zodiac' = & gt; 5000.00 ',));  

However this does not seem to work. The same applies to Zend_Http_Client :: DELETE . It only works Zend_Http_Client :: POST and Zend_Http_Client :: GET .

What am I missing?

I am not yet familiar with the implementation of the Zend Framework, but you can check that you Apache is configured to allow Put and Delay requests. / P>

Assume that you are using virtual hosts and userdirs, see the following file:
... / apache / conf / extra / httpd-userdir.conf

In that file, make sure that you have PUT and delete in the list of allowed HTTP methods for your directory.

  & lt; Directory "... / path-to-your-vhost-directory-here" & gt; AllowRoundRide FileInfo AuthConfig limit coordinate optionsMultivize indexSyMLinksIfOwnerMatch is included in the nozzack & lt; Receive limited head posts Deleted options & gt; Decline order, deny permission to all Allow from local host & lt; / Limit & gt; & Lt; Limit first remove mail received option & gt; Decline order, reject all & lt; / LimitExcept & gt; & Lt; / Directory & gt;  

Edit: You can find the official document for instructions here:


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -