Redirect URL, no $_POST data?

Archived from the Transloadit support forum. Originally posted on December 28, 2011; details may be outdated, see our docs for current behavior. Original thread

Hi there

I’ve got a test area where I’ve setup the image upload, which works fine, but I’m not getting any $_POST data to my redirect URL ?

Here is the latest one I just did. Assembly ID - REDACTED

I’ve used the code from your minimal integration on the second processing page (which is just test.php), and no results were displayed.. So I basically did a print_r($_POST); to see what was posting and its an empty array.

Not sure if I’m doing something wrong here, but everything seems to be working fine apart from that?

Rob

Is your form set to multipart/formdata? Do you have this online somewhere where i can see it?

Hi there

Thanks for the help.

http://www.wtfnews.org/rob/index.php

Please delete the other tickets, it was bugging out when I was submitting this so they obviously went through, just didnt confirm on my end..

And sorry, yes form set to multipart/formdata

I don’t see any problem with how you integrate transloadit.

Do you have anything else that could filter your $_POST array? Are you using a php framework? If not, can you paste the php code that you use?

I checked firebug and the transloadit assembly results are properly added to the form with a < textarea name=“transloadit” > [[JSON here]] < /textarea >

Hey Tim, heres the output in the test.php (which its where its redirected):


As you can see, after your sample script from the site I dumped all the $_POST info and its blank.

It has me totally stumped..

There is a framework/CMS that operates wtfnews.org root, but it shouldn’t have an impact on the /rob/ level.. To verify, I made another quick form and tested its output and it was fine.

I’ve got my server guy to check the firewall, which has been disabled (just in case) and is still disabled.

It has me totally stumped.

Rob

Code didnt display .. I’ve attached it

Just to add some more info.. I’ve loaded test forms from other servers and tested the output on my wtf server to that same test.php file (where transloadit scripts are) and the $_POST dump in that test.php dumps $_POST variables from other sites/servers fine

What happens if you do print_r($_POST) before all of that code?

Same thing unfortunately.

Your webserver redirects all requests without leading www.:

curl -i -X POST -F transloadit='{}' http://wtfnews.org/rob/test.php
HTTP/1.1 301 Moved Permanently
Date: Thu, 29 Dec 2011 13:04:00 GMT
Server: Apache
Location: http://www.wtfnews.org/rob/test.php
Cache-Control: max-age=86400
Expires: Fri, 30 Dec 2011 13:04:00 GMT
Vary: Accept-Encoding
Content-Length: 243
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.wtfnews.org/rob/test.php">here</a>.</p>
</body></html>

Fixing this is as easy as adding the www. to your redirect_url.

--fg