0

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!

Lugubrious
  • 380
  • 1
  • 3
  • 16
  • your server? did you change anything ? –  Oct 10 '13 at 23:21
  • The server is managed by dozens of people. I am working remotely and it could be anything. – Lugubrious Oct 10 '13 at 23:22
  • 3
    @Lugubrious That is a flaw on it's own. All the server "managers"/administrators should log all changes and keep others in the loop. – Daryl Gill Oct 10 '13 at 23:23
  • I am not the boss, I'm looking for help. If you are going to help, please go ahead. Otherwise, go elsewhere. – Lugubrious Oct 10 '13 at 23:24
  • Perhaps http://www.php.net/manual/en/ini.core.php#ini.variables-order. Beyond that, I'm not seeing much that would affect superglobals. – Pete Scott Oct 10 '13 at 23:24
  • 1
    I would say let us see the script, but if it hasn't changed since it was working... Have you checked your .htaccess? (Look for anything like `RewriteCond %{REQUEST_METHOD} POST`) Also, suggest implementing a VCS, maybe you'll get bonus points. Or singled-out for making your co-workers do it the _right_ way. – Jason Oct 10 '13 at 23:25
  • Is there any way that my server would block post requests somehow? – Lugubrious Oct 10 '13 at 23:25
  • 1
    I'd start with the rewrites as well, rewriting for example to a full url (http://...) would cause POST information to get lost. – jeroen Oct 10 '13 at 23:29
  • Jeroen, could you elaborate? You guys could all post an answer so it isn't just in the comments. And I'm just an intern, they could not care less about it. I host one file on this server to access their db. – Lugubrious Oct 10 '13 at 23:31
  • check your server logs... – webduvet Oct 10 '13 at 23:31
  • 1
    This is all just speculation. If you post the `.htaccess` file, it might turn into a real answer. Or not if the problem is not there. – jeroen Oct 10 '13 at 23:33
  • 1
    Jeroen please answer, yours was correct. They finally installed an ssl certificate and the url changed to https. (and didn't tell me) – Lugubrious Oct 10 '13 at 23:34

1 Answers1

2

I'd start with the rewrites. Rewriting for example to a full url (http://...) would cause POST information to get lost.

jeroen
  • 91,079
  • 21
  • 114
  • 132