I’m currently using a mix of extJS4 and Zend Framework 1.9 (the user interface for the file upload page is programmed with extJS4, while the application itself is programmed with Zend Framework 1.9).
I’m currently running into the phenomenon, that the data I’m getting from the user interface looks correct, but the only way to even get zend framework to acknowledge that data has been sent to the php page is by using getRawBody().
isPost() results in true, but getPost() returns no data, also $_REQUEST returns no data at all.
I’m using $upload=new \Zend_File_Transfer_Adapter_Http(); in the program to process the incoming files.
But: $upload->getFileInfo(); also returns no data at all
(error logs of apache and php show nothing out of the ordinary.)
getRawBody returns me the following string (I’ve put it into the log file so can be that string(776) is part of my logging function):
string(776) "Content-Type: multipart/form-data; boundary=---------------------------2384732604503
Content-Length: 667
-----------------------------2384732604503
Content-Disposition: form-data; name="combobox-1327-inputEl"
2
-----------------------------2384732604503
Content-Disposition: form-data; name="filefield-1328-inputEl"; filename="mytest. - Kopie.txt"
Content-Type: text/plain
testtest
-----------------------------2384732604503
Content-Disposition: form-data; name="filefield-1329-inputEl"; filename="mytest..txt"
Content-Type: text/plain
testtest
-----------------------------2384732604503
Content-Disposition: form-data; name="filefield-1330-inputEl"; filename=""
Content-Type: application/octet-stream
-----------------------------2384732604503--
"
My question here is what the reason for this behaviour could be (or if I’m doing something wrong here).
(As a Note: I’m using XAMPP with PHP 5.4 as Webserver)
I’ve now tried it out with another variant:
<html>
<body>
<form action="/uploadmodule/index/save-upload/" method="post" enctype="multipart/form-data">
Name: <input type="text" name="imageName" />
Image: <input type="file" name="image" />
<input type="submit" value="submit" />
</form>
</body>
</html>
When I use this….all functions as it should…only when I use extJS4 uploadvariant it does not function.
Thanks
The problem is solved now. It was not a problem from the php side / zend framework side as I had originally suspected, but instead was caused by a parameter in the extJS code.
The phenomenon that $_REQUEST, $_POST, $_GET was empty and only getRawBody() got the “Post” was caused by the following parameter set true:
As soon as the parameter was set to false:
The $_POST, … was filled again.