I am sending data using $.ajax and using the POST method. I cannot use GET because the data is long in the MB range. But on the receiving php script, it always seems that the $_POST is empty. This is not the case with I run my app in the browser with my localhost XAMPP.
I thought that it could probably be because of some PHP.INI settings. All I found was always_populate_raw_post_data and turned that On. But still doesn’t work. Any ideas?
Hmm… did you var_dump($_POST) on your PHP page?
If the data is too big, maybe PHP timed out… try to put set_time_limit(0); on the first line of your PHP page (so it will never time out) and make sure upload_max_filesize (for input with type as “file”) and post_max_size are set properly in your php.ini file with the size of your posted data
Keep me updated
BTW it will be great if you can show us some codes.
By the way, I have all my php.ini settings correct I believe.
memory_limit = 128M
post_max_size = 100M
And I don’t think it’s because of timeout because this is data sent from local to local. Even a short data set failed.
My further testing, I found out that the server always treat the Ajax POST as GET instead. I sent back phpinfo() this time and the receiving Javascript simply document.write(data) and there’s not POST information.
Yep, thanks for testing this for me jayd. My actual software I am building, yes, deals with some MB of data. I was trying that at first. And when I encounter this problem, I tested with just about 100 byte, and still it fails. Plus, the data has been downloaded successfully before I try this Ajax-POST. So it’s more like local-to-local data transfer.
By the way, Form-POST works… just Ajax-POST that’s not working right now. My temporary alternative is to use a form in an iframe for now.
Answered your request by email too.
$_POST works fine except with AJAX in Chromium.
We have a workaround explained in the General Demo that ships with ExeOutput. Please refer to it for the solution.
I have the same problem as well. Ajax workaround worked successfully in version 1.5 and 1.6, but in 1.7 this is not the case. Now what I can see in Developer Tools is that if I send two or more posts to the same address, only the first one is actually sent, and for the next posts “success” part of “$.ajax” is executed, but the return message stays the same as in the first post to this address. In other words, I can only do POST with “$.ajax” in Chromium once.
Now I must return to version 1.5 or 1.6…
It would be great if in the next version this bug can be fixed. I hope that ajax will work normally in Chromium, without workarounds.
I’m currently finding this to be a show-stopper issue, I’m unable to get any of our web applications to work with ExeOutput for PHP unless it is possible to achieve an AJAX-style POST-method request in Chromium one way or another without reloading the page. Any news of the next major release with the CEF upgrade?
Also could not find a “general demo” bundled with v1.7? Where can I find this to experiment with the ajax workaround discussed earlier in this topic?
Has anyone found any way to achieve an AJAX post or equivalent in v1.7? Thank you.