{"id":865,"date":"2022-08-30T15:08:28","date_gmt":"2022-08-30T15:08:28","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/zend-framework-submit-contains-no-post-data-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:08:28","modified_gmt":"2022-08-30T15:08:28","slug":"zend-framework-submit-contains-no-post-data-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/zend-framework-submit-contains-no-post-data-collection-of-common-programming-errors\/","title":{"rendered":"Zend Framework &#8211; Submit contains no Post Data-Collection of common programming errors"},"content":{"rendered":"<p>My issue seems similiar to [Zend Framework] On submit the form don&#8217;t display its POST data. and related questions, but the suggested solutions do not apply to my project, so I am currently not using redirects.<\/p>\n<p>I am attempting to learn Zend Framework. The current project that I am working on has run into an issue where the the $_POST and $_GET superglobals passed from my form are returning empty. I have worked to simplify the issue to identify where it is being caused, but I seem to have hit a brick wall. It seems that no POST data is being sent at all&#8230;<\/p>\n<p>My View:<\/p>\n<pre><code>\n    \n    \n\n<\/code><\/pre>\n<p>My controller:<\/p>\n<pre><code>\n<\/code><\/pre>\n<p>By Navigating to the form, then submitting (by clicking on the submit button), I receive the following output:<\/p>\n<pre><code>object(Zend_Controller_Request_Http)#8 (15) {\n  [\"_paramSources:protected\"] =&gt; array(2) {\n    [0] =&gt; string(4) \"_GET\"\n    [1] =&gt; string(5) \"_POST\"\n  }\n  [\"_requestUri:protected\"] =&gt; string(20) \"\/character\/addsubmit\"\n  [\"_baseUrl:protected\"] =&gt; string(0) \"\"\n  [\"_basePath:protected\"] =&gt; NULL\n  [\"_pathInfo:protected\"] =&gt; string(20) \"\/character\/addsubmit\"\n  [\"_params:protected\"] =&gt; array(3) {\n    [\"controller\"] =&gt; string(9) \"character\"\n    [\"action\"] =&gt; string(9) \"addsubmit\"\n    [\"module\"] =&gt; string(7) \"default\"\n  }\n  [\"_rawBody:protected\"] =&gt; NULL\n  [\"_aliases:protected\"] =&gt; array(0) {\n  }\n  [\"_dispatched:protected\"] =&gt; bool(true)\n  [\"_module:protected\"] =&gt; string(7) \"default\"\n  [\"_moduleKey:protected\"] =&gt; string(6) \"module\"\n  [\"_controller:protected\"] =&gt; string(9) \"character\"\n  [\"_controllerKey:protected\"] =&gt; string(10) \"controller\"\n  [\"_action:protected\"] =&gt; string(9) \"addsubmit\"\n  [\"_actionKey:protected\"] =&gt; string(6) \"action\"\n}\n\n$_POST: \nArray ( ) \n$_GET: \nArray ( ) \n\n$_POST Not Found \n$_GET Found\n<\/code><\/pre>\n<p>The one thing that&#8217;s really throwing me for a loop is that the isGet function is returning true..<\/p>\n<p>Does anyone with more knowledge of Zend have any idea of why I&#8217;m having so much trouble submitting forms with this framework? Is there some configuration that I might have missed or may have set incorrectly that might cause this?<\/p>\n<p>Note: I am using Zend_Form for the actually application, as well as using more of the framework itself, but I have scaled it back in attempting to debug this issue. If you need any further information about my configuration, I will be able to provide it.<\/p>\n<p>Thanks!<\/p>\n<p>Edit:<\/p>\n<p>My .htaccess file&#8217;s contents:<\/p>\n<p>[I have removed these lines because it was the wrong file, I am still looking for the correct one.]<\/p>\n<ol>\n<li>\n<p>This thread is old, but the following tip may help other readers. I have just experienced this problem, and found the solution here:<\/p>\n<p>http:\/\/serverfault.com\/questions\/127674\/mysteriously-empty-post-array<\/p>\n<p>I had just set up a local LAMP development environment, and in populating my database via phpMyAdmin, changed the <code>post_max_size<\/code> directive of <code>php.ini<\/code> to permit the upload of a large SQL dump. Regrettably, I mistyped <code>1G<\/code> as <code>1GB<\/code> in the INI file. PHP interpreted this as a 1 byte limit, which naturally all of my POST submissions exceed, thus they were arriving as empty arrays.<\/p>\n<p>Check your server&#8217;s error log for something resembling the following:<\/p>\n<pre><code>[Sat Oct 01 17:08:07 2011] [error] [client 127.0.0.1] PHP Warning:  Unknown: POST Content-Length of 63 bytes exceeds the limit of 1 bytes in Unknown on line 0, referer: http:\/\/localhost\/[...]\n<\/code><\/pre>\n<\/li>\n<li>\n<p>Have you tried<\/p>\n<pre><code>$this-&gt;_request-&gt;getParams();\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:49:30. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>My issue seems similiar to [Zend Framework] On submit the form don&#8217;t display its POST data. and related questions, but the suggested solutions do not apply to my project, so I am currently not using redirects. I am attempting to learn Zend Framework. The current project that I am working on has run into an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,8],"tags":[],"class_list":["post-865","post","type-post","status-publish","format-standard","hentry","category-uncategorized","category-zend-framework"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/865","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=865"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/865\/revisions"}],"predecessor-version":[{"id":8888,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/865\/revisions\/8888"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=865"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=865"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=865"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}