I have been running a web service off of a php file. For no apparent reason (possibly some settings changes?), it now suddenly does not "notice" the posted request.
When I echo var_dump($_POST), I get a 0-length array. If I post the same request the same way on a different script, it works fine. This different script is hosted on a different server.
Do you guys have any idea what configuration may have been accidentally changed s.t. my php script does not get the post requests?
Thanks!
I'd start with the rewrites. Rewriting for example to a full url (http://...) would cause POST information to get lost.
Related
An external application is calling my PHP script and passing URL parameters and a SOAP envelope. I can access the URL parameters in the $_GET array. However I cannot access the SOAP envelope. I was expecting it in the $_POST array, but that is empty.
The IIS log clearly shows that the SOAP envelope is being received by IIS but somehow I cannot access it in PHP - or I am using the wrong methods/variables.
When I check the "failed requests log" in IIS, I see the SOAP data as "GENERAL_REQUEST_ENTITY".
However I am at a loss when trying to access said data from within my PHP script. Is this kind of content stored in a different variable (other than $_GET, $_POST or $_REQUEST)? Or is IIS not forwarding this to my script and if so, why not?
Edit: I am not tied to PHP if PHP is not capable of doing this, I am open to any language that gets the job done. However my knowledge of ASP.NET is more limited than that of PHP. Is there a better language for capturing the missing data from the request?
This problem is not going away and I need to find a solution. So far no matter how much I search via Google, I keep running into dead ends.
Edit #2: Here is a screenshot of the log file for clarification. It clearly shows the XML and so does Fiddler, which I have also just now tested:
How can I capture this XML with PHP (or ASP.NET for that matter)?
Best regards
Max
I have a webportal (laravel code base) running on a Cloudlinux based server with PHP 7.2.
Due to some capacity problems we need to love to another server, also Cloudlinux, but PHP 7.3.
I try now to use the new server, but that give me a problem. For some of the parts I need to call a secondary platform (same server). I use for this a GET curl.
On the old server this works perfect, on the new one however I have issues. The data that I pass in the body isn’t read by the new server. When I do a dump of all request data it is not included.
If I run the same system over POST, then somehow it is working perfect.
I know that I can change all requests to POST, but that is a big job, and why does it work then on the old server. I have the impression reading the PHP://input doesn’t work on GET, but don’t know if this is a setting or not.
Switching to another PHP version didn’t help btw
I'm currently experiencing an interessting Problem. I made my own way of auto deploying Websites from GitHub, but I ran into one issue. GitHub sends the payload over the webhook obviously as a POST Request. I have an .htaccess which encodes the url for me. So that it gets transformed to a GET Request, doesn't it? This is the line in my .htaccess:
RewriteRule v1/(.*)$ index.php?request=$1 [QSA,NC,L]
And I need the variables from there... I continue in PHP by making an array out of the GET Parameters with:
$url = explode("/", $_GET['request']);
In the processing I also make some GET requests to GitHubs API.
Now onto the the think that I don't understand. If I run the Webhook, my files don't get uploaded. If I open the site myself, everything gets updated as it should.
Maybe someone has an Idea of the cause and how to fix it?
I just solved my own problem. After waiting for good ~5 Minutes, I executed the Webhook again and the changes were on the Webspace. So probably the GitHub API is at the moment just slow, or it doesn't updates that often.
I have a form that collects data and may take several hours to complete since it has an editor where users can add creative elements. If the form is submitted after an hour or so, the site redirects to a 404 Not Found, the URL was not found on this server. I tested this using a very simple form processing script that prints out POST data and still got the error. This seems to only happen on our linux server. I have a WAMP local server running the same script and the POST data sends through fine, no matter how long the form is idle for. Any clues as to what I can try change on the Apache config or PHP side. Thanks
my XAMPP is activated but the Ajax scripts are not working. It should really work because I got it from a book and double checked the codes and the connections for the database but it didn't work.
Whats the problem anyhow?
The code is located on Chapter 5 http://www.myphpbook.com/download
I just started to programming so I dont have any idea how to make this work.
I assume you have JavaScript code making a request from PHP code. Is the JavaScript making the request? You can use Firebug to set breakpoints and see network requests.
Is the PHP code that serves the request running?
Was everything going well before Chapter 5?